perf: 优化宝塔网站部署插件远程获取数据的提示

This commit is contained in:
xiaojunnuo
2024-10-10 14:28:46 +08:00
parent cbd6abb29d
commit 2a3ca9f552
6 changed files with 49 additions and 29 deletions
+7 -1
View File
@@ -47,7 +47,13 @@ function createService() {
return dataAxios.data;
default:
// 不是正确的 code
errorCreate(`${dataAxios.msg}: ${response.config.url}`);
const errorMessage = dataAxios.msg;
// @ts-ignore
if (response?.config?.onError) {
// @ts-ignore
response.config.onError(new Error(errorMessage));
}
errorCreate(`${errorMessage}: ${response.config.url}`);
return dataAxios;
}
}