-
zhangwei
2026-04-07 b7ae3f69ae6706a692284d2f12835d213debfb1a
src/pages/mine/index.vue
@@ -49,13 +49,13 @@
               <view class="tool_item" @click="toWorkerRecord" v-if="isAdmin">
                  <image src="@/static/image/record.png" mode="aspectFit" class="item_img"></image>
                  <view class="tool_label">
                     工资审核
                     报酬审核
                  </view>
               </view>
               <view class="tool_item" @click="toSalary" v-if="isAdmin">
                  <image src="@/static/image/salary.png" mode="aspectFit" class="item_img"></image>
                  <view class="tool_label">
                     工资查询
                     报酬查询
                  </view>
               </view>
            </view>
@@ -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">
@@ -140,6 +146,12 @@
                  <image src="@/static/image/daka.png" mode="aspectFit" class="item_img"></image>
                  <view class="tool_label">
                     司机打卡
                  </view>
               </view>
               <view class="tool_item" @click="toDelivergoods('clockInRecord')" v-if="isDeliverManage">
                  <image src="@/static/image/dakarecord.png" mode="aspectFit" class="item_img"></image>
                  <view class="tool_label">
                     打卡记录
                  </view>
               </view>
            </view>
@@ -318,12 +330,12 @@
            }],
            navList2: [{
                  icon: 'icon-dingdan',
                  name: '上班打卡',
                  name: '劳务计时',
                  cb: this.toMyWork
               },
               {
                  icon: 'icon-fuwutuandui',
                  name: '工作记录',
                  name: '务工报酬',
                  cb: this.toMyRecord
               },
               {
@@ -338,12 +350,12 @@
            ],
            navList3: [{
                  icon: 'icon-dingdan',
                  name: '上班打卡',
                  name: '劳务计时',
                  cb: this.toMyWork
               },
               {
                  icon: 'icon-fuwutuandui',
                  name: '工作记录',
                  name: '务工报酬',
                  cb: this.toMyRecord
               },
               {
@@ -356,7 +368,8 @@
                  }
               },
            ],
            token: this.$db.get('userToken') || ''
            token: this.$db.get('userToken') || '',
            identity:this.$db.get('identity') || 'worker'
         };
      },
      onLoad: function() {
@@ -364,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
         },
@@ -420,13 +434,13 @@
         },
         balance() {
            if (this.identity == 'worker') {
               if (this.userInfo.userWorker) {
                  return this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.userInfo
                     .userWorker
                     .yiTiXianJine)
               } else {
                  return '0.00'
               }
               // if (this.userInfo.userWorker) {
               //    return this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.userInfo
               //       .userWorker
               //       .yiTiXianJine)
               // } else {
                  return this.userInfo.userWorker.balance
               // }
            } else {
               if (this.userInfo.userCompany) {
                  return this.userInfo.userCompany.chongZhiYue ? this.userInfo.userCompany
@@ -545,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',