ソースを参照

fix[litemall-wx]: 下单成功后,重置couponId

Junling Bu 7 年 前
コミット
653f6b3ccd
1 ファイル変更8 行追加0 行削除
  1. 8 0
      litemall-wx/pages/checkout/checkout.js

+ 8 - 0
litemall-wx/pages/checkout/checkout.js

@@ -141,6 +141,14 @@ Page({
       grouponLinkId: this.data.grouponLinkId
     }, 'POST').then(res => {
       if (res.errno === 0) {
+        
+        // 下单成功,重置couponId
+        try {
+          wx.setStorageSync('couponId', 0);
+        } catch (error) {
+
+        }
+
         const orderId = res.data.orderId;
         util.request(api.OrderPrepay, {
           orderId: orderId