From 0c9b00f333f9baaffa9140fd1808a26e0af8416b Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期四, 05 九月 2024 17:19:07 +0800 Subject: [PATCH] 一些错误更改 --- src/pages/mine/index.vue | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 50 insertions(+), 9 deletions(-) diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index b580709..84c9e81 100644 --- a/src/pages/mine/index.vue +++ b/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'); -- Gitblit v1.9.1