jiangping
2025-07-16 8ee015485bfd69afcc276e84a2998c64b0256458
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'