From 3fc70951bbd386c8c85e522cae80deba8823052e Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期四, 15 八月 2024 17:28:20 +0800 Subject: [PATCH] 登录 --- src/pages/mine/index.vue | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index e915b68..62c8609 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -216,7 +216,9 @@ }, onShow: function() { this.resourceBanner(); - this.isLogin = true; + + this.token = this.$db.get('userToken') ? this.$db.get('userToken') : '' + this.isLogin = this.token?true:false; }, onShareAppMessage: function() { return { @@ -227,9 +229,15 @@ }, methods: { tologin() { - uni.navigateTo({ - url: '/pages/login/index' - }) + if(this.isLogin){ + uni.navigateTo({ + url: '/pages/mine/mine' + }) + }else{ + uni.navigateTo({ + url: '/pages/login/index' + }) + } }, toOrder() { uni.navigateTo({ -- Gitblit v1.9.1