fix(sj_1.0.0_beta4): 修复接口失败提示问题
This commit is contained in:
parent
d239e2f249
commit
bab219f429
@ -19,7 +19,7 @@ export function setupAppVersionNotification() {
|
|||||||
n?.destroy();
|
n?.destroy();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
$t('system.updateCancel')
|
() => $t('system.updateCancel')
|
||||||
),
|
),
|
||||||
h(
|
h(
|
||||||
NButton,
|
NButton,
|
||||||
@ -29,7 +29,7 @@ export function setupAppVersionNotification() {
|
|||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
$t('system.updateConfirm')
|
() => $t('system.updateConfirm')
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { AxiosResponse } from 'axios';
|
import type { AxiosResponse } from 'axios';
|
||||||
import { BACKEND_ERROR_CODE, createFlatRequest } from '@sa/axios';
|
import { createFlatRequest } from '@sa/axios';
|
||||||
import { useAuthStore } from '@/store/modules/auth';
|
import { useAuthStore } from '@/store/modules/auth';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { localStg } from '@/utils/storage';
|
import { localStg } from '@/utils/storage';
|
||||||
@ -115,10 +115,8 @@ export const request = createFlatRequest<App.Service.Response, RequestInstanceSt
|
|||||||
let backendErrorCode = '';
|
let backendErrorCode = '';
|
||||||
|
|
||||||
// get backend error message and code
|
// get backend error message and code
|
||||||
if (error.code === BACKEND_ERROR_CODE) {
|
|
||||||
message = error.response?.data?.message || message;
|
message = error.response?.data?.message || message;
|
||||||
backendErrorCode = error.response?.data?.status || '';
|
backendErrorCode = error.response?.data?.status.toString() || '';
|
||||||
}
|
|
||||||
|
|
||||||
// the error message is displayed in the modal
|
// the error message is displayed in the modal
|
||||||
const modalLogoutCodes = import.meta.env.VITE_SERVICE_MODAL_LOGOUT_CODES?.split(',') || [];
|
const modalLogoutCodes = import.meta.env.VITE_SERVICE_MODAL_LOGOUT_CODES?.split(',') || [];
|
||||||
|
Loading…
Reference in New Issue
Block a user