From a2ddd3bec584b6eb91ab8845353fdb40c9b37ebe Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期一, 02 九月 2024 17:22:17 +0800 Subject: [PATCH] 初步完成 --- src/pages/checkin/checkin.vue | 27 ++++++++++++++++++++------- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/pages/checkin/checkin.vue b/src/pages/checkin/checkin.vue index b5d2da5..a5d2f1a 100644 --- a/src/pages/checkin/checkin.vue +++ b/src/pages/checkin/checkin.vue @@ -1,7 +1,7 @@ <template> <view> <view class='chuany-flex camera-fill chuany-justify-center chuany-align-center'> - <fui-upload immediate :url="`${apiBaseUrl}api/UpFile/UpdateFile`" ref="uploadB" max='1' @success="success" + <fui-upload immediate :url="`${apiBaseUrl}api/UpFile/UpdateFile`" ref="uploadE" max='1' @success="success" @error="error" @complete="complete" width="280" height="280"> <image v-if="checkPhoto" :src="checkPhoto" mode="widthFix" style="width: 280rpx;height: 280rpx;"> </image> @@ -10,8 +10,8 @@ <view class="chuany-font20">鎷嶆憚鐜鐓х墖</view> </view> </fui-upload> - <fui-upload ref="uploadB" max='1' @error="error" @complete="completePerson" width="280" height="280"> - <image v-if="src" :src="src" mode="widthFix" style="width: 280rpx;height: 280rpx;"></image> + <fui-upload ref="uploadP" max='1' @error="error" @complete="completePerson" width="280" height="280"> + <image v-if="faceImg" :src="faceImg" mode="widthFix" style="width: 280rpx;height: 280rpx;"></image> <view class=" chuany-flex chuany-flex-direction chuany-align-center" v-else> <fui-icon name="addfriends-fill"></fui-icon> <view class="chuany-font20">鎷嶆憚浜鸿劯鐓х墖</view> @@ -73,13 +73,18 @@ this.$api.getDaka({ orderId: id }).then(res => { - if(res.code==1){ - this.dakaList = res.data.orderBiddingDetailCheck - this.dakaList.length = 3 + if (res.code == 1) { + this.dakaList = res.data ? res.data.orderBiddingDetailCheck : [] + if (this.dakaList.length == 0) { + this.dakaList.length = 2 + } + if (this.dakaList.length > 6) { + this.dakaList.length = 6 + } if (this.dakaList.length % 2 !== 0) { this.dakaList.push({}) } - }else{ + } else { this.$util.showToast({ title: res.error }) @@ -127,6 +132,10 @@ console.log(e, '鍒犻櫎') }, completePerson(e) { + if (e.action == 'delete') { + // 鍒犻櫎澶勭悊 + return + } this.$util.pathToBase64(e.urls[0]).then(res => { this.faceImg = res }) @@ -162,6 +171,10 @@ title: "鎵撳崱鎴愬姛锛�", icon: "success" }) + this.checkPhoto = '' //鎵撳崱鐓х墖 + this.faceImg = '' + this.$refs.uploadP.deleteImage() + this.$refs.uploadE.deleteImage() this.getDaka(this.orderBiddingId) } else { this.$util.showToast({ -- Gitblit v1.9.1