From 00a7a61df86db969f2ba61c508d02ba4709ce3d4 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 05 六月 2026 10:09:06 +0800
Subject: [PATCH] 改bug
---
app/utils/http.interceptor.js | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/app/utils/http.interceptor.js b/app/utils/http.interceptor.js
index ecd04a2..0444afc 100644
--- a/app/utils/http.interceptor.js
+++ b/app/utils/http.interceptor.js
@@ -1,6 +1,13 @@
const install = (Vue, vm) => {
+ let arr = [
+ 'web/driverInfo/updateLocation',
+ 'web/driverInfo/activeOrderCount'
+ ]
// 璇锋眰鎷︽埅鍣�
uni.$u.http.interceptors.request.use((config) => {
+ if (!arr.includes(config.url)) {
+ uni.showLoading({ title: '鍔犺浇涓�' });
+ }
const Headtoken = vm.$store.state.token
// 鍒ゆ柇鏈夋棤token锛屾湁鍒欏姞鍏ヨ姹傚ご涓�
if (Headtoken) {
@@ -13,7 +20,9 @@
// 鍝嶅簲鎷︽埅鍣�
uni.$u.http.interceptors.response.use((response) => {
- // console.log(response)
+ if (!arr.includes(response.config.url)) {
+ uni.hideLoading();
+ }
// 鏈櫥褰�/鐧诲綍杩囨湡
if ([5112, 5113].includes(response.data.code)) {
vm.$store.commit('clearAll')
--
Gitblit v1.9.3