This commit is contained in:
GaoHao
2024-12-23 13:48:10 +08:00
2 changed files with 13 additions and 2 deletions

View File

@@ -26,6 +26,17 @@ module.exports = {
}, },
logout: function() { logout: function() {
let that = this; 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("token")
uni.removeStorageSync("userId") uni.removeStorageSync("userId")
uni.removeStorageSync("phone") uni.removeStorageSync("phone")

View File

@@ -40,10 +40,10 @@
<view class="tishi">连续签到7天即可获得7元奖励</view> <view class="tishi">连续签到7天即可获得7元奖励</view>
<view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})"> <!-- <view class="signInBtn" @click="goNav({jumpType: 0, id:15, buttonTitle: '去领取'})">
<view>{{signInBtn}}</view> <view>{{signInBtn}}</view>
<view class="signInBtnBg"></view> <view class="signInBtnBg"></view>
</view> </view> -->
</view> </view>