From 8ee015485bfd69afcc276e84a2998c64b0256458 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 16 七月 2025 18:27:12 +0800
Subject: [PATCH] 前端
---
small-program/pages/index/index.vue | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 25baa21..5fc9317 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -418,10 +418,20 @@
export default {
components: { sunuiMverify },
computed: {
- ...mapState(['navHeight', 'statusbarHeight'])
+ ...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid'])
+ },
+ onShow(options){
+ this.type = 0
+ if(this.token &&this.token!='' && this.userInfo && JSON.stringify(this.userInfo) != '{}'){
+ this.isLogin=true
+ }
+ if (this.userInfo && this.userInfo.useIdentity == 1) {
+ this.type =1
+ }
},
data() {
return {
+ isLogin: false,
typeId: 1,
typeWorkId: 1,
carId: 1,
@@ -440,7 +450,7 @@
{ name: '灏忚揣杞�', id: 2 }
],
btn: require('@/static/image/btn.png'),
- type: 1
+ type: 0
}
},
methods: {
@@ -454,6 +464,12 @@
this.carId = e
},
jump() {
+ console.log(this.userInfo,this.token,this.openid)
+ if(!this.userInfo ||!this.token ){
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
if (this.typeId === 1) {
uni.navigateTo({
url: '/pages/using-workers/using-workers'
--
Gitblit v1.9.3