From 47d56a8b0f22fb15a46b69dfd46fac23560ad2cd Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 12 五月 2026 09:07:49 +0800
Subject: [PATCH] 改bug
---
mini-program/utils/http.interceptor.js | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/mini-program/utils/http.interceptor.js b/mini-program/utils/http.interceptor.js
index aa7c2d6..036f72f 100644
--- a/mini-program/utils/http.interceptor.js
+++ b/mini-program/utils/http.interceptor.js
@@ -6,7 +6,7 @@
// 璇锋眰鎷︽埅鍣�
uni.$u.http.interceptors.request.use((config) => {
- console.log(config)
+ // console.log(config)
if(config.data && config.data.tokenType===1){
config.header['tokenType'] = config.data.tokenType;
const HeadShoptoken = vm.$store.state.shopToken
@@ -34,6 +34,7 @@
uni.$u.http.interceptors.response.use((response) => {
// 鐧诲綍杩囨湡
if ([5111, 5112].includes(response.data.code)) {
+ vm.$store.commit('guoqi')
if (!isRefreshing) { // 鏄惁宸茬粡鎵ц鍒锋柊
isRefreshing = true
uni.login({
@@ -96,11 +97,14 @@
}
// 鎺ュ彛涓氬姟鎶ラ敊
if (response.data.code !== 200) {
- uni.showToast({
- title: response.data.message || response.data.msg,
- icon: "none",
- duration: 2000
- });
+ if(!['web/orders/orderPay'].includes(response.config.url)) {
+ uni.showToast({
+ title: response.data.message || response.data.msg,
+ icon: "none",
+ mask: true,
+ duration: 2000
+ });
+ }
return Promise.reject(response)
}
return response.data;
--
Gitblit v1.9.3