-
zhangwei
2024-09-30 2e61c194b816364fe4fbab967fee13dbefe86216
src/pages/mine/index.vue
@@ -1,6 +1,6 @@
<template>
   <view class="container">
      <view class="header">
      <view :class="identity=='enterprise'?'header-hide':'header'">
         <view class="header-img">
            <view class="header-image-left" @click='tologin'>
               <up-avatar :src="userInfo.avatar" shape="circle" size='60'></up-avatar>
@@ -12,7 +12,7 @@
               <text class='iconfont icon-qiehuan chuany-font28'></text>
            </view>
         </view>
         <view class="num-box">
         <view class="num-box" v-if="identity!=='enterprise'">
            <view @tap="goWallet" class="num-item" data-ptpid="ef57-17f4-bbea-280f">
               <view class="num-bold">{{ balance }}元</view>
               <view class="num-text">
@@ -49,15 +49,15 @@
               <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="toPage('/otherPages/member/sendCompany/sendCompany')">
                  <image src="@/static/image/server.png" mode="aspectFit" class="item_img"></image>
               <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>
            </view>
         </view>
      </view>
@@ -133,7 +133,7 @@
                  });
               }
            }, ],
            navList1: [{
            navList2: [{
                  icon: 'icon-wanshanxinxi',
                  name: '完善资料',
                  cb: function() {
@@ -149,11 +149,31 @@
               },
               {
                  icon: 'icon-fuwutuandui',
                  name: '工作记录',
                  name: '打卡记录',
                  cb: this.toMyRecord
               },
            ],
            token: this.$db.get('userToken')||''
            navList3: [{
                  icon: 'icon-wanshanxinxi',
                  name: '修改资料',
                  cb: function() {
                     uni.navigateTo({
                        url: '/pages/mine/apply'
                     });
                  }
               },
               {
                  icon: 'icon-dingdan',
                  name: '我的工作',
                  cb: this.toMyWork
               },
               {
                  icon: 'icon-fuwutuandui',
                  name: '打卡记录',
                  cb: this.toMyRecord
               },
            ],
            token: this.$db.get('userToken') || ''
         };
      },
      onLoad: function() {
@@ -166,6 +186,9 @@
         ...mapGetters(['userInfo', 'identity']),
         isAdmin() {
            return this.userInfo.userCompany ? this.userInfo.userCompany.isAdmin : false
         },
         navList1() {
            return this.userInfo.userWorker ? this.navList3 : this.navList2
         },
         isLogin() {
            return this.token ? true : false;
@@ -251,6 +274,20 @@
            }
            uni.navigateTo({
               url: '/pages/company/index'
            });
         },
         toSalary() {
            if (!this.userInfo.userCompany) {
               uni.navigateTo({
                  url: '/pages/enterprise/enterprise'
               });
               this.$util.showToast({
                  title: '请先完善企业资料!'
               })
               return
            }
            uni.navigateTo({
               url: '/pages/worker/salary'
            });
         },
         toMyWork() {
@@ -482,6 +519,7 @@
         .tool_content {
            display: flex;
            justify-content: space-between;
            padding: 30rpx 0;
            .tool_item {
@@ -490,7 +528,7 @@
               flex-direction: column;
               height: 120rpx;
               justify-content: center;
               margin: 0 50rpx 0 0;
               // margin: 0 50rpx 0 0;
               width: 120rpx;
               &:nth-child(4n) {