|
@@ -5,6 +5,7 @@ import _ from 'lodash';
|
|
|
import Axios from 'axios';
|
|
|
import { Util, Error } from 'naf-core';
|
|
|
// import { Indicator } from 'mint-ui';
|
|
|
+import { Toast } from 'vant';
|
|
|
import util from './user-util';
|
|
|
|
|
|
const { trimData, isNullOrUndefined } = Util;
|
|
@@ -64,6 +65,10 @@ export default class AxiosWrapper {
|
|
|
// Indicator.open({
|
|
|
// spinnerType: 'fading-circle',
|
|
|
// });
|
|
|
+ let toast = Toast.loading({
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true,
|
|
|
+ });
|
|
|
|
|
|
try {
|
|
|
const axios = Axios.create({
|
|
@@ -105,12 +110,13 @@ export default class AxiosWrapper {
|
|
|
);
|
|
|
return { errcode: ErrorCode.SERVICE_FAULT, errmsg, details: err.message };
|
|
|
} finally {
|
|
|
- /* eslint-disable */
|
|
|
+ /* eslint-disable */
|
|
|
currentRequests -= 1;
|
|
|
if (currentRequests <= 0) {
|
|
|
currentRequests = 0;
|
|
|
// Indicator.close();
|
|
|
}
|
|
|
+ toast.clear();
|
|
|
}
|
|
|
}
|
|
|
}
|