From 054be7955be38a62b34e619568b94ab05344ec02 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 28 八月 2024 18:44:09 +0800
Subject: [PATCH] 1
---
pages/order/order-detail.vue | 81 +++++++++++++++++++++++++++++++---------
1 files changed, 62 insertions(+), 19 deletions(-)
diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue
index bdf24b6..589f663 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()
}
}
@@ -185,10 +230,8 @@
...data,
async success(res) {
console.log('pay success', res)
- that.$message.showToast('支付成功')
- setTimeout(() => {
- that.getDetail()
- }, 200)
+ await that.$message.showToast('支付成功')
+ that.getDetail()
},
fail(err) {
console.error('pay fail', err)
@@ -548,7 +591,7 @@
<view class="info-container form bg-white br-4 m-t-12" v-if="showSales">
<!-- 表单更新 -->
<view class="form-item">
- <view class="form-item-label">
+ <view class="form-item-label require">
售后数量
</view>
<view class="form-item-value">
@@ -557,7 +600,7 @@
</view>
</view>
<view class="form-item">
- <view class="form-item-label">
+ <view class="form-item-label require">
理由
</view>
<view class="form-item-value">
@@ -565,7 +608,7 @@
</view>
</view>
<view class="form-item">
- <view class="form-item-label">
+ <view class="form-item-label require">
图片
</view>
<view class="form-item-value m-l-a m-r-0">
@@ -612,7 +655,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