From c212c9ab501e1aff9e2dd90e8e87871c0bc7f1bc Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期二, 30 七月 2024 14:03:29 +0800
Subject: [PATCH] fix bug
---
pages/order/order.vue | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/pages/order/order.vue b/pages/order/order.vue
index a53af5d..91f51cc 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -80,6 +80,7 @@
})
this.$message.hideLoading()
if (code === 0) {
+ this.$store.dispatch('sign_add','order')
this.refreshList()
}
}
@@ -124,6 +125,7 @@
console.log('pay success', res)
that.$message.showToast('支付成功')
setTimeout(() => {
+ that.$store.dispatch('sign_add','order')
that.refreshList()
}, 200)
},
@@ -165,8 +167,23 @@
// },
case 'cancelOrder': {
- this.$message.showToast('敬请期待')
- },
+ await this.$message.confirm('是否取消订单')
+ // 发送请求
+ this.$message.showLoading()
+ const {
+ code
+ } = await this.$http.request('get', '/api/customer/order/cancel', {
+ params: {
+ id: item.id,
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ this.$store.dispatch('sign_add','order')
+ this.refreshList()
+ }
+ }
+ break
default:
break
}
--
Gitblit v1.9.3