任务页面未登录情况调整,隐藏签到按钮

This commit is contained in:
GaoHao 2024-12-23 13:47:54 +08:00
parent 35854982fb
commit 415269084f
2 changed files with 13 additions and 2 deletions

View File

@ -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")

View File

@ -40,10 +40,10 @@
<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 class="signInBtnBg"></view>
</view>
</view> -->
</view>