Bläddra i källkod

fix: 积分取消之后显示的单位错误

john 2 år sedan
förälder
incheckning
15c6500259
1 ändrade filer med 4 tillägg och 5 borttagningar
  1. 4 5
      src/store/order/points.js

+ 4 - 5
src/store/order/points.js

@@ -199,8 +199,8 @@ export default {
       parkInfo: {parkMallCode},
       parkInfo: {parkMallCode},
       parkingRule,
       parkingRule,
     } = state.orderDetail;
     } = state.orderDetail;
-    const [{pointsPerHour,available,discountFee}] = points;
-    const {maxPointsTime,enablePoints,unitAmount} = parkingRule;
+    const [{pointsPerHour,available,discountFee, unitAmount}] = points;
+    const {maxPointsTime,enablePoints} = parkingRule;
     if ( !points ) {
     if ( !points ) {
       callback && callback();
       callback && callback();
       return
       return
@@ -210,11 +210,10 @@ export default {
     if ( parkMallCode === 5 ) {
     if ( parkMallCode === 5 ) {
       pointsTime = discountFee || 0
       pointsTime = discountFee || 0
     } else  {
     } else  {
-      pointsTime = discountFee ?  discountFee / unitAmount: 0
+      pointsTime = discountFee ?  discountFee / unitAmount : 0
     }
     }
-    
     commit('setAvailable',available);
     commit('setAvailable',available);
-    commit('setPointsTime',discountFee || 0);
+    commit('setPointsTime',pointsTime || 0);
     callback && callback();
     callback && callback();
   },
   },
   async savePointsMath( {commit,dispatch,state},callback ) {
   async savePointsMath( {commit,dispatch,state},callback ) {