From 5851a70aaedf69f8ae1d51135e1d946a8b8b2c1f Mon Sep 17 00:00:00 2001 From: yangzhe Date: Tue, 15 Jul 2025 11:53:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=B3=E9=97=AD=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=AF=B7=E6=B1=82loading...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ common/http.interceptor.js | 8 ++++---- uview-ui/libs/request/index.js | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..60a614d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# 忽略 unpackage 文件夹 +/unpackage/ diff --git a/common/http.interceptor.js b/common/http.interceptor.js index a80b05f..10c99f9 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -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) { diff --git a/uview-ui/libs/request/index.js b/uview-ui/libs/request/index.js index 1f5f471..8bf38b0 100644 --- a/uview-ui/libs/request/index.js +++ b/uview-ui/libs/request/index.js @@ -109,7 +109,7 @@ class Request { dataType: 'json', // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可 responseType: 'text', - showLoading: true, // 是否显示请求中的loading + showLoading: false, // 是否显示请求中的loading loadingText: '请求中...', loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms timer: null, // 定时器