From 14dd0a76cd3971b937f99859c1d278446953d270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com> Date: Wed, 2 Aug 2023 16:04:56 +0800 Subject: [PATCH] update --- src/components/site/order_modal/order_modal.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/site/order_modal/order_modal.vue b/src/components/site/order_modal/order_modal.vue index c1a178e..a331213 100644 --- a/src/components/site/order_modal/order_modal.vue +++ b/src/components/site/order_modal/order_modal.vue @@ -358,10 +358,22 @@ export default { isDefaultGet: false, }) .then(res => { - if (!(res.data.code == 0 && res.data.data.success)) { - this.isShowFail = true; + if (res.data.code == 0 && res.data.data && res.data.data.data) { + let result = JSON.parse(res.data.data.data[res.data.data.data.length - 1].result); + res.data.data.data.forEach(item => { + const resultTemp = JSON.parse(item.result); + if (resultTemp && resultTemp.orderStatus === 'SUCCESS') { + result = resultTemp; + } + }); + console.log(result); + if (!(result && result.orderStatus === 'SUCCESS')) { + this.isShowFail = true; + } else { + this.$emit('refresh'); + } } else { - this.$emit('refresh'); + this.isShowFail = true; } }).catch(() => { this.$emit('refresh');