|
@@ -69,6 +69,7 @@ const allowRequest = function (reqList, url) {
|
|
|
|
|
|
// request拦截器
|
|
|
service.interceptors.request.use(config => {
|
|
|
+ Vue.prototype.$layer.loading({ content: '请稍等!' });
|
|
|
let cancel = null;
|
|
|
// 设置cancelToken对象
|
|
|
config.cancelToken = new axios.CancelToken(function (c) {
|
|
@@ -78,7 +79,6 @@ service.interceptors.request.use(config => {
|
|
|
stopRepeatRequest(reqList, config.url, cancel, `${config.url} 请求被中断`)
|
|
|
// ++count;
|
|
|
|
|
|
- Vue.prototype.$layer.loading({ content: '请稍等!' });
|
|
|
// 是否需要设置 token
|
|
|
const isToken = (config.headers || {}).isToken === false
|
|
|
// 是否需要防止数据重复提交
|