diff --git a/pages_order/report/pay.vue b/pages_order/report/pay.vue index 2056f6a..2d41277 100644 --- a/pages_order/report/pay.vue +++ b/pages_order/report/pay.vue @@ -153,13 +153,15 @@ const result = await this.$fetch('createOrder', params) - await uni.requestPaymentWxPay({ result }) - + if (params.payAmount > 0) { + await uni.requestPaymentWxPay({ result }) + } + uni.showToast({ title: '支付成功', icon: 'none' }) - + setTimeout(() => { uni.redirectTo({ url: `/pages_order/report/userInfo?batchNo=${this.batchNo}` diff --git a/pages_order/test/testCard.vue b/pages_order/test/testCard.vue index 01e6c9b..a0d7fef 100644 --- a/pages_order/test/testCard.vue +++ b/pages_order/test/testCard.vue @@ -54,10 +54,15 @@ }) }, onCreateReport() { - // todo: check - uni.navigateTo({ - url: `/pages_order/report/pay?batchNo=${this.data.batchNo}` - }) + if (this.data.isPay) { + uni.navigateTo({ + url: `/pages_order/report/userInfo?batchNo=${this.batchNo}` + }) + } else { + uni.navigateTo({ + url: `/pages_order/report/pay?batchNo=${this.data.batchNo}` + }) + } }, }, }