Browse Source

Merge pull request #161 from John-Hong/John/release-2.11.0/KIP-10689

fix(KIP-10689): 【DE】【C端】【杭州】。未登录用户在使用纸质优惠券时,不会抵扣对应的金额
Tron 2 years ago
parent
commit
5af42c8700
2 changed files with 6 additions and 0 deletions
  1. 5 0
      src/store/order/paperCoupon.js
  2. 1 0
      src/utils/index.js

+ 5 - 0
src/store/order/paperCoupon.js

@@ -37,6 +37,11 @@ export default {
     try {
       const orderDetail = {...state.orderDetail};
       setSelected(['coupons','consume','points','memberGrade'], orderDetail)
+      if (!orderDetail?.discountInfo?.paperCoupons) {
+        orderDetail.discountInfo =  {
+          paperCoupons: []
+        }
+      } 
       orderDetail.discountInfo.paperCoupons = paperCoupons.map(elm => {
         return {
           ...elm,

+ 1 - 0
src/utils/index.js

@@ -159,6 +159,7 @@ export function wxToLoginCallback( path,callback ) {
       } else {
         console.log('刷新页面:callback');
         callback && callback(options);
+        uni.setStorageSync('oldPath','');
       }
     });
     return;