fix: 关闭接口请求loading...
This commit is contained in:
parent
c27caa607e
commit
5851a70aae
|
@ -0,0 +1,2 @@
|
|||
# 忽略 unpackage 文件夹
|
||||
/unpackage/
|
|
@ -33,9 +33,9 @@ const install = (Vue, vm) => {
|
|||
// config.header.token = token;
|
||||
|
||||
// 注释 7/15
|
||||
uni.showLoading({
|
||||
title: '请求中...'
|
||||
});
|
||||
// uni.showLoading({
|
||||
// title: '请求中...'
|
||||
// });
|
||||
// 注释
|
||||
|
||||
// setTimeout(function () {
|
||||
|
@ -46,7 +46,7 @@ const install = (Vue, vm) => {
|
|||
}
|
||||
// 响应拦截,判断状态码是否通过
|
||||
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||
uni.hideLoading();
|
||||
// uni.hideLoading();
|
||||
|
||||
// 检查是否为401未授权错误
|
||||
if (res.statusCode === 401) {
|
||||
|
|
|
@ -109,7 +109,7 @@ class Request {
|
|||
dataType: 'json',
|
||||
// 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
|
||||
responseType: 'text',
|
||||
showLoading: true, // 是否显示请求中的loading
|
||||
showLoading: false, // 是否显示请求中的loading
|
||||
loadingText: '请求中...',
|
||||
loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
|
||||
timer: null, // 定时器
|
||||
|
|
Loading…
Reference in New Issue