From 15674e72e3ae163e02131ef966e1319c899a6c74 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Sun, 19 Jan 2025 15:35:08 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=99=BB=E5=BD=95=E6=8B=A6?= =?UTF-8?q?=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 12 ++++++------ src/sheep/utils/request.ts | 9 +++++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.env b/.env index 623b3a0..8495796 100644 --- a/.env +++ b/.env @@ -17,18 +17,18 @@ VITE_PWD_ENC_KEY='pigxpigxpigxpigx' VITE_OAUTH2_APP_CLIENT='mini:mini' # 图片访问基础地址 -# VITE_IMAGE_BASE_PATH = http://localhost:9999 -VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地 +VITE_IMAGE_BASE_PATH = http://localhost:9999 +# VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地 # VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc # 张 -# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上 +# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 线上 # ******************** start 开发环境 start ******************** -# VITE_APP_DEV_SERVICE =http://123.156.228.134:48080/app-api +# VITE_APP_DEV_SERVICE =http://59.202.170.152:81/api # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api -VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地 +# VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地 #VITE_APP_DEV_SERVICE = http://pjcloud.center.takin.cc # 张 # VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api # 线上 -# VITE_APP_DEV_SERVICE = http://localhost:9999 +VITE_APP_DEV_SERVICE = http://localhost:9999 # ******************** end 开发环境 end ******************** # ******************** start 生产环境 start ******************** diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts index 3486139..6934d68 100644 --- a/src/sheep/utils/request.ts +++ b/src/sheep/utils/request.ts @@ -145,8 +145,13 @@ http.interceptors.response.use( return Promise.resolve(response.data) }, (error) => { - console.log(error) - + if (error.statusCode == 424) { + const tokenKey = constant.storageConstant.TOKEN + uni.removeStorageSync(tokenKey) + uni.showToast({ title: "登录已过期,请重新登录", icon: "none" }) + router.jump("/pages/test/login") + return false + } let errorMessage = error.data.msg if (error !== undefined) { uni.showToast({