-
zhangwei
2025-11-11 ec90cbd7680a6f927cb1cea43f33ab7df6d0864c
src/pages/mine/index.vue
@@ -112,6 +112,12 @@
                     预约送货
                  </view>
               </view>
               <view class="tool_item" @click="toDelivergoods('PFeedback')" v-if="isWorker">
                  <image src="@/static/image/PFeedback.png" mode="aspectFit" class="item_img"></image>
                  <view class="tool_label">
                     问题反馈
                  </view>
               </view>
               <view class="tool_item" @click="toDelivergoods('reservation')" v-if="isDeliverManage">
                  <image src="@/static/image/drivershouli.png" mode="aspectFit" class="item_img"></image>
                  <view class="tool_label">
@@ -362,7 +368,8 @@
                  }
               },
            ],
            token: this.$db.get('userToken') || ''
            token: this.$db.get('userToken') || '',
            identity:this.$db.get('identity') || 'worker'
         };
      },
      onLoad: function() {
@@ -370,9 +377,10 @@
      },
      onShow: function() {
         this.getUserInfo()
         console.log(this.$store.state.identity,this.identity,'????????');
      },
      computed: {
         ...mapGetters(['userInfo', 'identity']),
         ...mapGetters(['userInfo']),
         isAdmin() {
            return this.userInfo.userCompany ? this.userInfo.userCompany.isAdmin : false
         },
@@ -551,8 +559,8 @@
         },
         changRole() {
            this.$store.commit('setIdentity', this.identity === 'enterprise' ? 'worker' : 'enterprise')
            // this.$db.set('identity', this.identity === 'enterprise' ? 'worker' : 'enterprise')
            // this.identity = this.identity === 'enterprise' ? 'worker' : 'enterprise'
            this.$db.set('identity', this.identity === 'enterprise' ? 'worker' : 'enterprise')
            this.identity = this.identity === 'enterprise' ? 'worker' : 'enterprise'
            console.log(this.identity, this.$db.get('identity'), 'this.identity');
            // uni.setStorage({
            //    key: 'identity',