浏览代码

新增支付失败回滚支付方法

Yannay 1 月之前
父节点
当前提交
605f7c7a93
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      pages/orderDetailRefactored/components/OrderDetailView.vue

+ 6 - 0
pages/orderDetailRefactored/components/OrderDetailView.vue

@@ -185,6 +185,12 @@ export default {
185 185
       } catch (error) {
186 186
         console.error('支付失败:', error)
187 187
         uni.$u.toast(`支付失败:${error}`)
188
+
189
+        //支付失败回滚支付信息
190
+        await uni.$u.api.updateClueOrderForm({
191
+          id: this.orderDetail.id,
192
+          paymentMethod: ''
193
+        })
188 194
       }
189 195
     },
190 196