zhangwei
2024-09-05 0c9b00f333f9baaffa9140fd1808a26e0af8416b
src/pages/mine/index.vue
@@ -4,7 +4,7 @@
         <view class="header-img">
            <view class="header-image-left" @click='tologin'>
               <up-avatar :src="userInfo.avatar" shape="circle" size='60'></up-avatar>
               <view class="header-name">{{ userInfo.nickname || (isLogin ? '暂无小主信息' : '登录开启赚钱之旅哦') }}</view>
               <view class="header-name">{{ userInfo.nickname || (isLogin ? '暂无信息' : '点击登录') }}</view>
            </view>
            <view @tap="changRole" class="header-image-right chuany-flex chuany-align-center chuany-justify-center"
               data-ptpid="e758-138d-b914-343f">
@@ -131,22 +131,23 @@
               // },
            ],
            navList1: [{
                  icon: 'icon-dingdan',
                  name: '我的工作',
                  icon: 'icon-wanshanxinxi',
                  name: '完善资料',
                  cb: function() {
                     uni.navigateTo({
                        url: '/pages/order/myorder'
                        url: '/pages/mine/apply'
                     });
                  }
               },
               {
                  icon: 'icon-dingdan',
                  name: '我的工作',
                  cb: this.toMyWork
               },
               {
                  icon: 'icon-fuwutuandui',
                  name: '工作记录',
                  cb: function() {
                     uni.navigateTo({
                        url: '/pages/checkin/index'
                     });
                  }
                  cb: this.toMyRecord
               },
            ],
            isLogin: false,
@@ -196,11 +197,23 @@
            }
         },
         toOrder() {
            if (!this.userInfo.userCompany) {
               this.$util.showToast({
                  title: '请先完善企业资料!'
               })
               return
            }
            uni.navigateTo({
               url: '/pages/order/order'
            })
         },
         toRelease() {
            if (!this.userInfo.userCompany) {
               this.$util.showToast({
                  title: '请先完善企业资料!'
               })
               return
            }
            uni.navigateTo({
               url: '/pages/release/index'
            })
@@ -211,10 +224,38 @@
            })
         },
         toWorkerRecord() {
            if (!this.userInfo.userCompany) {
               this.$util.showToast({
                  title: '请先完善企业资料!'
               })
               return
            }
            uni.navigateTo({
               url: '/pages/company/index'
            });
         },
         toMyWork() {
            if (!this.userInfo.userWorker) {
               this.$util.showToast({
                  title: '请先完善资料!'
               })
               return
            }
            uni.navigateTo({
               url: '/pages/order/myorder'
            });
         },
         toMyRecord(){
            if (!this.userInfo.userWorker) {
               this.$util.showToast({
                  title: '请先完善资料!'
               })
               return
            }
            uni.navigateTo({
               url: '/pages/checkin/index'
            });
         },
         changRole() {
            this.identity = this.identity === 'enterprise' ? 'worker' : 'enterprise'
            console.log(this.identity, 'this.identity');