mirror of https://github.com/certd/certd
fix: 修复宝塔授权测试按钮显示错误的bug
parent
27a405fb1d
commit
048696ee93
|
@ -69,12 +69,10 @@ function createService() {
|
||||||
const err = new CodeError(errorMessage, dataAxios.code, dataAxios.data);
|
const err = new CodeError(errorMessage, dataAxios.code, dataAxios.data);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
response.config.onError(err);
|
response.config.onError(err);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const showErrorNotify = response?.config?.showErrorNotify;
|
const showErrorNotify = response?.config?.showErrorNotify;
|
||||||
errorCreate(`${errorMessage}: ${response.config.url}`, showErrorNotify, dataAxios);
|
errorCreate(`${errorMessage}: ${response.config.url}`, showErrorNotify, dataAxios);
|
||||||
return dataAxios;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|
|
@ -67,7 +67,6 @@ export function errorLog(error: any, notify = true) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 创建一个错误
|
* @description 创建一个错误
|
||||||
* @param {String} msg 错误信息
|
|
||||||
*/
|
*/
|
||||||
export function errorCreate(msg: string, notify = true, data?: any) {
|
export function errorCreate(msg: string, notify = true, data?: any) {
|
||||||
const err = new CodeError(msg, data.code, data.data);
|
const err = new CodeError(msg, data.code, data.data);
|
||||||
|
|
Loading…
Reference in New Issue