From 415269084f33a4ca80f57275e8d9aca9838c4c50 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Mon, 23 Dec 2024 13:47:54 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E9=A1=B5=E9=9D=A2=E6=9C=AA?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E6=83=85=E5=86=B5=E8=B0=83=E6=95=B4=EF=BC=8C?=
=?UTF-8?q?=E9=9A=90=E8=97=8F=E7=AD=BE=E5=88=B0=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/httpRequest.js | 11 +++++++++++
pages/task/index.vue | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/common/httpRequest.js b/common/httpRequest.js
index 83d8842..06baa2f 100644
--- a/common/httpRequest.js
+++ b/common/httpRequest.js
@@ -26,6 +26,17 @@ module.exports = {
},
logout: function() {
let that = this;
+ // 获取当前页面实例
+ const pages = getCurrentPages();
+ // 获取当前页面的实例
+ const currentPage = pages[pages.length - 1];
+ // 获取页面路径
+ const pagePath = currentPage.route
+ const systemInfo = uni.getSystemInfoSync();
+ const isIOS = /iOS/.test(systemInfo.platform);
+ if ( pagePath == "pages/task/index") {
+ return;
+ }
uni.removeStorageSync("token")
uni.removeStorageSync("userId")
uni.removeStorageSync("phone")
diff --git a/pages/task/index.vue b/pages/task/index.vue
index 4942e2a..1701934 100644
--- a/pages/task/index.vue
+++ b/pages/task/index.vue
@@ -40,10 +40,10 @@
连续签到7天即可获得7元奖励
-
+