|
@@ -61,12 +61,13 @@ export default class CustomAxiosInstance {
|
|
|
this.instance.interceptors.response.use(
|
|
|
(async response => {
|
|
|
const { status } = response;
|
|
|
- if (status === 200 || status < 300 || status === 304) {
|
|
|
+ if (status === 200 || status < 300 || status === 304 || response.status === 200) {
|
|
|
const backend = response.data;
|
|
|
- console.log(response);
|
|
|
const { codeKey, dataKey, successCode } = this.backendConfig;
|
|
|
// 请求成功
|
|
|
- if (backend.msg === "操作成功") {
|
|
|
+ console.log(response.status);
|
|
|
+ if (backend[codeKey] === successCode || response.status === 200) {
|
|
|
+ console.log('fanhui');
|
|
|
return handleServiceResult(null, backend[dataKey]);
|
|
|
}
|
|
|
|