From 7e738f69cf7b353492edefa1768005f19ea7e7ee Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期三, 28 八月 2024 10:25:11 +0800 Subject: [PATCH] update上线更新 --- pages/order/order-detail.vue | 69 ++++++++++++++++++++++++++++------ 1 files changed, 57 insertions(+), 12 deletions(-) diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue index 89a2f95..67167b9 100644 --- a/pages/order/order-detail.vue +++ b/pages/order/order-detail.vue @@ -149,18 +149,63 @@ break case 'confirm': { await this.$message.confirm('是否确定收货') - // 发送请求 - this.$message.showLoading() - const { - code - } = await this.$http.request('get', '/api/customer/order/receive/confirm', { - params: { - id: this.id, + + var tryCallWx = false + // #ifdef MP + let tmp = this + if (wx.openBusinessView && tmp.dto && tmp.dto.paymentTrId) { + tryCallWx = true + wx.openBusinessView({ + businessType: 'weappOrderConfirm', + extraData: { + // merchant_id: '', + // merchant_trade_no: '', + transaction_id: tmp.dto && tmp.dto.paymentTrId || '' + }, + async success() { + //dosomething + // 发送请求 + tmp.$message.showLoading() + const { + code + } = await tmp.$http.request('get', '/api/customer/order/receive/confirm', { + params: { + id: tmp.id, + } + }) + tmp.$message.hideLoading() + if (code === 0) { + tmp.getDetail() + } + }, + fail(e) { + //dosomething + console.log('error fail', e) + tmp.$message.showToast('收货失败') + }, + complete() { + //dosomething + } + }); + } + + // #endif + + if (!tryCallWx) { + + // 发送请求 + this.$message.showLoading() + const { + code + } = await this.$http.request('get', '/api/customer/order/receive/confirm', { + params: { + id: this.id, + } + }) + this.$message.hideLoading() + if (code === 0) { + this.getDetail() } - }) - this.$message.hideLoading() - if (code === 0) { - this.getDetail() } } @@ -612,7 +657,7 @@ </view> <!-- ||dto.status=='COMPLETED' --> <!-- 在外面申请了,里面不允许了 --> - <!-- <view class="button button-1" @click="buttonClick('sales')" v-if=" dto.status === 'RECEIVE'"> 申请售后 + <!-- <view class="button button-1" @click="buttonClick('sales')" v-if=" dto.status === 'RECEIVE'"> 申请售后 </view> --> </view> <view v-if="showSales"> -- Gitblit v1.9.3