瀏覽代碼

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

john 2 年之前
父節點
當前提交
15c6500259
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      src/store/order/points.js

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

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