From b172667f354f7f00fe14809e66cbf12362fbc646 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期五, 06 九月 2024 17:19:36 +0800 Subject: [PATCH] 人脸打卡 --- src/pages/detail/detail.vue | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/pages/detail/detail.vue b/src/pages/detail/detail.vue index 55794ff..6787f39 100644 --- a/src/pages/detail/detail.vue +++ b/src/pages/detail/detail.vue @@ -1,7 +1,7 @@ <template> <view class="list full-page"> <view class="content c-p-b-18"> - <view class="bgcolor c-p-24 chuany-flex chuany-justify-between chuany-font28 chuany-text-bold"> + <!-- <view class="bgcolor c-p-24 chuany-flex chuany-justify-between chuany-font28 chuany-text-bold"> 鎶ュ悕 <up-icon name="arrow-right-double" color='#faa93f'></up-icon> 纭鎺ュ崟 @@ -9,7 +9,7 @@ 涓婁笅鐝墦鍗� <up-icon name="arrow-right-double" color='#faa93f'></up-icon> 缁撶畻鎻愮幇 - </view> + </view> --> <view class="chuany-flex chuany-justify-between"> <view class="chuany-width100"> <view class="chuany-flex chuany-justify-between chuany-align-center chuany-width100 chuany-box c-p-18"> @@ -97,7 +97,7 @@ </view> </view> <view class="tabbtns"> - <up-button color='#fece01' class="text-69" text="鎶ュ悕" @click="enroll"></up-button> + <up-button color='#fece01' :loading='isLoading' loadingText="鎶ュ悕涓�" class="text-69" text="鎶ュ悕" @click="enroll"></up-button> </view> </view> </template> @@ -110,10 +110,15 @@ } = option this.getOrder(orderid) }, + onShow(){ + console.log('鎵ц-----鈥�'); + this.userInfo = this.$db.get('userInfo') ? JSON.parse(this.$db.get('userInfo')) : {} + }, data() { return { - orderObj: null, - tags: ['4灏忔椂', '鍙棤缁忛獙', '鎵嬭剼楹诲埄', '璁℃椂'] + orderObj: {}, + tags: ['4灏忔椂', '鍙棤缁忛獙', '鎵嬭剼楹诲埄', '璁℃椂'], + isLoading:false } }, methods: { @@ -125,6 +130,16 @@ }) }, enroll() { + if (!this.userInfo.userWorker) { + uni.navigateTo({ + url: '/pages/mine/apply' + }); + this.$util.showToast({ + title: '璇峰厛瀹屽杽璧勬枡锛�' + }) + return + } + this.isLoading = true this.$api.saveBaoMing({ orderId: this.orderObj.id }).then(res => { @@ -133,11 +148,13 @@ title: "鎶ュ悕鎴愬姛锛�", icon: "success" }) + uni.navigateBack() } else { this.$util.showToast({ title: res.error }) } + this.isLoading = false }) } } -- Gitblit v1.9.1