| | |
| | | <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"> |
| | |
| | | // }, |
| | | ], |
| | | 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, |
| | |
| | | } |
| | | }, |
| | | 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' |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | 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'); |