Browse Source

积分上限修改

john 2 năm trước cách đây
mục cha
commit
ede30bba50

+ 1 - 1
src/api/request.js

@@ -188,7 +188,7 @@ export const createAxiosByinterceptors = (config) => {
       }
       // 错误信息提示
       const { code, langMessage, message,status } = error.response.data;
-      const codeList = ['INTERNAL_SERVER_ERROR', 'VALIDATION_FAILED', 'CAR_HAS_PLATE', "NOT_FOUND", "LOCAL_PARK_ERROR", "LOCK_OCCUPIED", "REMOTE_CALL_FAIL", 'PLEASE_SCAN_QRCODE']; // 默认处理的错误code
+      const codeList = ['INTERNAL_SERVER_ERROR', 'VALIDATION_FAILED', 'CAR_HAS_PLATE', "NOT_FOUND", "LOCAL_PARK_ERROR", "LOCK_OCCUPIED", "REMOTE_CALL_FAIL", 'PLEASE_SCAN_QRCODE', 'SUBIN_CAR_IN_DEVICE_EXCEPTION']; // 默认处理的错误code
       if (codeList.indexOf(code) > -1) {
         uni.showToast({ title: langMessage || message, duration: 3000, icon: 'fail' });
       }

+ 1 - 1
src/main.js

@@ -6,7 +6,7 @@ import VConsole from 'vconsole';
 // 或者使用配置参数来初始化,详情见文档
 // 开发环境和qa环境 打开debug
 const debug = /dev-t?-?|qa-t?-?|sl-t?-?/.test(window.location.href) || window.location.href.indexOf('8080') > -1;
-if (debug && false) {
+if (debug) {
   window.vConsole = new VConsole(
     // { theme: 'dark' }
   );

+ 1 - 1
src/pages/parkingFee/mixins/parkingFeeDetail.js

@@ -129,7 +129,7 @@ export default {
           },
         };
         // 会员等级减免
-        if ( memberGrade?.length && memberGrade[0].discountFee > 0 && memberGrade[0].hasOwnProperty('selected')? memberGrade[0].selected : memberGrade[0].defaultSelected) {
+        if ( memberGrade?.length && memberGrade[0].discountFee > 0 && memberGrade[0].hasOwnProperty('selected')? memberGrade[0]?.selected : memberGrade[0]?.defaultSelected) {
           const {discountFee, discountTime} = memberGrade[0]
           params.discountInfo.memberLevel = {
             "discountTime": discountTime,

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

@@ -128,7 +128,7 @@ export default {
       }
     }
     // 单日上限限制
-    if ( oneDayLimitation && !msg ) {
+    if ( oneDayLimitation && !msg && parkMallCode !== 5) {
       const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice
       const remainConsumeTimeFee = remainConsumeTime * hourPrice
       // 计算单日剩余 remainConsumeTime
@@ -141,7 +141,7 @@ export default {
       }
     }
     // 单次上限限制
-    if ( oneTimeLimitation && !msg ) {
+    if ( oneTimeLimitation && !msg && parkMallCode !== 5) {
       const maxOneTimeDiscountFee = maxOneTimeDiscountTime * hourPrice
       const remainConsumeTimeFee = remainConsumeTime * hourPrice
       // 计算单日剩余 remainConsumeTime
@@ -164,7 +164,7 @@ export default {
     }
     if ( type === 'add' ) {
       let pointsTime = 0;
-      pointsTime = state.pointsTime + (parkMallCode === 1 ? state.unitAmount : state.unitHour);
+      pointsTime = state.pointsTime + (parkMallCode === 5 ? state.unitAmount : state.unitHour);
       const available = state.available - state.pointsPerUnit;
       const usingTotalDiscount = state.usingTotalDiscount + state.unitAmount; // 重新计算已经使用的优惠逻辑
       if ( available > -1 ) {
@@ -175,7 +175,7 @@ export default {
       }
     }
     if ( type === 'minus' && state.pointsTime > 0 ) {
-      const pointsTime = state.pointsTime - (parkMallCode === 1 ? state.unitAmount : state.unitHour);
+      const pointsTime = state.pointsTime - (parkMallCode === 5 ? state.unitAmount : state.unitHour);
       // 如果是深圳车场
       commit('setAvailable',state.available + state.pointsPerUnit);
       commit('setPointsTime',pointsTime);