...
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
import type {
|
||||
HttpError,
|
||||
HttpRequestConfig,
|
||||
HttpResponse
|
||||
} from 'uview-plus/libs/luch-request';
|
||||
import type { HttpError, HttpRequestConfig, HttpResponse } from 'uview-plus/libs/luch-request';
|
||||
import { showMessage } from './status';
|
||||
import { getCompanyId, getToken } from '@/utils/auth';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
@@ -57,7 +53,7 @@ function responseInterceptors() {
|
||||
}
|
||||
|
||||
// 请求成功则返回结果
|
||||
if(data.code === 200) {
|
||||
if(data.code === 200 || data?.retcode == 0) {
|
||||
return data || {};
|
||||
}
|
||||
|
||||
@@ -87,7 +83,7 @@ function responseInterceptors() {
|
||||
|
||||
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
|
||||
if(custom?.toast !== false) {
|
||||
uni.$u.toast(data.message);
|
||||
uni.$u.toast(data.message || data.retinfo);
|
||||
}
|
||||
|
||||
// 如果需要catch返回,则进行reject
|
||||
|
Reference in New Issue
Block a user