From 2837bdd57f72e386bbf9a725e7b3a13e5eb9e930 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 21 八月 2023 09:19:57 +0800
Subject: [PATCH] 修复bug
---
h5_standard/src/utils/request.ts | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/h5_standard/src/utils/request.ts b/h5_standard/src/utils/request.ts
index 3c4de61..733c77b 100644
--- a/h5_standard/src/utils/request.ts
+++ b/h5_standard/src/utils/request.ts
@@ -1,6 +1,5 @@
import axios from 'axios';
import { Toast } from 'vant';
-import store from '@/store'
import router from "@/router";
// 鍒涘缓涓�涓� axios 瀹炰緥
@@ -30,19 +29,14 @@
// 娣诲姞鍝嶅簲鎷︽埅鍣�
service.interceptors.response.use(
(response) => {
- // loading.clear();
+
if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) {
loading.clear();
}
if (response.data.code === 401) { // 澶勭悊鐧诲綍杩囨湡
Toast.fail({ message: '鐧诲綍杩囨湡锛屽噯澶囪嚜鍔ㄩ噸鏂扮櫥褰�', duration: 2000, forbidClick: true })
setTimeout(() => {
- if (store.state.env == 'DD') {
- router.push({ name: 'logInAgain' })
- } else if (store.state.env == 'WX') {
- let tempUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_url=https://www.mes.red/h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect`
- window.location.replace(tempUrl)
- }
+ router.push({ name: 'logInAgain' })
}, 2000)
return
}
--
Gitblit v1.9.3