feat: 部门联调

This commit is contained in:
xuziqiang
2024-06-04 19:22:11 +08:00
parent bd89f7973d
commit 61218104d3
11 changed files with 237 additions and 170 deletions

View File

@@ -87,12 +87,17 @@ export class NSAxios {
// config.url = newUrl;
return config;
}, undefined);
const errCodeArr = [13, 1];
this.instance.interceptors.response.use(
(res: AxiosResponse) => {
console.log('success', res);
// todo
const code = res?.data?.retcode;
const msg = res?.data?.msg;
if (errCodeArr.includes(code)) {
NsMessage.error({ content: msg, key: this.errorMsgKey });
return Promise.reject(res);
}
return res;
},
(error: any) => {