From 54f3534be4f93c42ade658b03f95f77577836ef9 Mon Sep 17 00:00:00 2001 From: davy Date: Sat, 5 Apr 2025 15:28:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B4=BB=E5=8A=A8=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=89=AB=E7=A0=81=E5=92=8C=E5=85=B3?= =?UTF-8?q?=E6=B3=A8=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 6 +++- pages/index/scan.vue | 28 +++++++-------- pagesActivity/activityDetail.vue | 58 +++++++++++++++++++++++++++++-- pagesCoin/beerCoin.vue | 1 + pagesMy/myAttention.vue | 2 +- static/tabbar/scan-s.png | Bin 1302 -> 1344 bytes 6 files changed, 76 insertions(+), 19 deletions(-) diff --git a/manifest.json b/manifest.json index 2e7bf93..ac1e051 100644 --- a/manifest.json +++ b/manifest.json @@ -54,7 +54,11 @@ "appid" : "wx5de24df912a4834c", "setting" : { "urlCheck" : false, - "minified" : true + "minified" : true, + "es6": true, + "postcss": true, + "minifyWXSS": true, + "minifyWXML": true }, "usingComponents" : true, "optimization" : { diff --git a/pages/index/scan.vue b/pages/index/scan.vue index 9f7fa76..2fe7031 100644 --- a/pages/index/scan.vue +++ b/pages/index/scan.vue @@ -147,7 +147,19 @@ const userInfo = uni.getStorageSync('userInfo') const barInfo = uni.getStorageSync('barInfo') - this.isLoggedIn = !!token + // 重置状态 + this.isLoggedIn = false + this.isVerified = false + this.isVerifying = false + this.userInfo = null + this.barInfo = null + + // 检查登录状态 + if (!token || !userInfo) { + return + } + + this.isLoggedIn = true this.userInfo = userInfo this.barInfo = barInfo @@ -171,14 +183,6 @@ this.isVerified = userInfo?.isVerified === 1 this.isVerifying = false } - - console.log('【checkLoginStatus】登录状态:', { - isLoggedIn: this.isLoggedIn, - isVerified: this.isVerified, - isVerifying: this.isVerifying, - userInfo: this.userInfo, - barInfo: this.barInfo - }) }, // 登录成功回调 loginSuccess() { @@ -194,9 +198,7 @@ }, // 跳转登录 toLogin() { - uni.navigateTo({ - url: '/pages/index/chooseLogin' - }) + this.$refs.loginRef.open() }, handleScan() { if (!this.isLoggedIn) { @@ -250,8 +252,6 @@ } } }) - } else if (res.cancel) { - console.log('用户点击取消') } } }) diff --git a/pagesActivity/activityDetail.vue b/pagesActivity/activityDetail.vue index 972f9e2..3be7ba0 100644 --- a/pagesActivity/activityDetail.vue +++ b/pagesActivity/activityDetail.vue @@ -1,7 +1,16 @@