Commit 714ab977 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复切换了语言,但是请求错误还是中文的问题

parent 7c2c0351
......@@ -27,7 +27,6 @@ type httpStatus = {
[key: number]: string
}
const intl = getIntl()
const errorMessage: httpStatus = {
400: "发出的请求有错误,服务器没有进行新建或修改数据的操作。",
401: "用户没有权限(令牌、用户名、密码错误)。",
......@@ -129,6 +128,8 @@ class ApiRequest {
createRequest<T>(url: string, options: IApiRequest = { ctlType: 'none' }): Promise<IRequestSuccess<T>> {
return new Promise((resolve, reject) => {
const intl = getIntl()
baseRequest<IRequestSuccess<T>>(url, options).then(res => {
// 登录验证
if (res.code === 1101) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment