pref: 允许忽略自签证书校验

This commit is contained in:
xiaojunnuo
2024-10-22 18:46:29 +08:00
parent 18ee87daff
commit 09847ce074
5 changed files with 30 additions and 14 deletions
+4 -2
View File
@@ -53,7 +53,9 @@ function createService() {
// @ts-ignore
response.config.onError(new Error(errorMessage));
}
errorCreate(`${errorMessage}: ${response.config.url}`);
//@ts-ignore
const showErrorNotify = response?.config?.showErrorNotify;
errorCreate(`${errorMessage}: ${response.config.url}`, showErrorNotify);
return dataAxios;
}
}
@@ -97,7 +99,7 @@ function createService() {
default:
break;
}
errorLog(error);
errorLog(error, error?.response?.config?.showErrorNotify);
if (status === 401) {
const userStore = useUserStore();
userStore.logout();