Commit 2ca7b535 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

test: 控制台打印请求信息

See merge request !130
parents 8f94e01a 76c0727f
......@@ -73,6 +73,7 @@ service.interceptors.request.use(
service.interceptors.response.use(
(response: AxiosResponse) => {
console.log('response', response)
if (response.status === 200) {
return response.data
}
......@@ -100,6 +101,7 @@ function http<T>(
) {
/* 请求成功处理函数 */
const successHandler = (res: Response<T>): Promise<Response<T>> | Response<T> => {
console.log('successHandler', res)
if (res.code === 0 || options?.ignoreErrorCheck) return res
if (res.code === -10) {
......
......@@ -131,7 +131,7 @@ async function handleExportAPIChannelPointUsageData() {
})
.then((res) => {
console.log(res)
const excelUrl = window.URL.createObjectURL(new Blob([res.data as any], { type: 'application/vnd.ms-excel' }))
const excelUrl = window.URL.createObjectURL(new Blob([res as any], { type: 'application/vnd.ms-excel' }))
window.open(excelUrl)
window.$message.success(t('common_module.export_successfully'))
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment