From 0d0d0d26aeaddf495fc4b7ad1e0d67ec7675d88d Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Fri, 19 Jul 2024 11:11:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E9=BB=98=E7=99=BB=E5=BD=95=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 48 +++++++++++++++++++++++++++++++++++++++++++++ framework/11-api.js | 24 +++++++++++------------ 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/App.vue b/App.vue index 4e44428..50edd1e 100644 --- a/App.vue +++ b/App.vue @@ -1,3 +1,6 @@ + diff --git a/framework/11-api.js b/framework/11-api.js index 726f086..f2a1113 100644 --- a/framework/11-api.js +++ b/framework/11-api.js @@ -103,19 +103,19 @@ async function request(options) { // #endif if (res.code != 0) { if (res.code == -4) { - uni.showToast({ - title: res.message || res.msg, - icon: "none", - success: () => { - setTimeout(res => { - uni.cache.set('token', ''); - uni.redirectTo({ - url: '/pages/login/login' - }); - }, 1000) + // uni.showToast({ + // title: res.message || res.msg, + // icon: "none", + // success: () => { + // setTimeout(res => { + // uni.cache.set('token', ''); + // uni.redirectTo({ + // url: '/pages/login/login' + // }); + // }, 1000) - } - }) + // } + // }) } else if (res.code == 482) { let nowTime = new Date() / 1000 | 0 let offset = parseInt(res.data.message) - parseInt(nowTime);