diff --git a/.env b/.env index f9981ea..531e670 100644 --- a/.env +++ b/.env @@ -20,20 +20,18 @@ 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://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://127.0.0.1:9999 # VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api # VITE_APP_DEV_SERVICE = http://localhost:9999 -VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 # ******************** end 开发环境 end ******************** # ******************** start 生产环境 start ******************** #VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api -#VITE_APP_PROD_SERVICE = http://123.156.230.15:8089/api VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api # ******************** end 生产环境 end ******************** 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({