xuxueyang
2024-07-30 c212c9ab501e1aff9e2dd90e8e87871c0bc7f1bc
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
            }