From 6f40b8242b22b5d9c48462f5f2e78f12fad64fd2 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sun, 3 Nov 2024 15:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BE=AE=E4=BF=A1=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=94=B6=E8=B4=A7=E7=BB=84=E4=BB=B6=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/user-order/user-order.vue | 42 +++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/pages/user-order/user-order.vue b/pages/user-order/user-order.vue index cb8c2e09..50722281 100644 --- a/pages/user-order/user-order.vue +++ b/pages/user-order/user-order.vue @@ -71,7 +71,7 @@ class="item-operation tr br-t padding-top-main"> - + @@ -520,6 +520,44 @@ // 收货 collect_event(e) { + var transactionid = e.currentTarget.dataset.transactionid || null; + if(transactionid == null || !uni.openBusinessView) { + this.collect_hand_handle(e); + } else { + // 存在微信单号收货数据,则拉起微信确认收货组件、失败则调用手动收货模式 + var self = this; + uni.openBusinessView({ + businessType: 'weappOrderConfirm', + extraData: { + transaction_id: transactionid + }, + success() { + self.collect_handle(e); + }, + fail() { + self.collect_hand_handle(e); + } + }); + } + }, + + // 手动收货 + collect_hand_handle(e) { + uni.showModal({ + title: this.$t('common.warm_tips'), + content: this.$t('orderallot-list.orderallot-list.o3ouqv'), + confirmText: this.$t('common.confirm'), + cancelText: this.$t('recommend-list.recommend-list.w9460o'), + success: (result) => { + if (result.confirm) { + this.collect_handle(e); + } + }, + }); + }, + + // 收货处理 + collect_handle(e) { uni.showModal({ title: this.$t('common.warm_tips'), content: this.$t('orderallot-list.orderallot-list.o3ouqv'), @@ -530,7 +568,7 @@ // 参数 var id = e.currentTarget.dataset.value; var index = e.currentTarget.dataset.index; - + // 加载loding uni.showLoading({ title: this.$t('common.processing_in_text'),