瀏覽代碼

缺陷修复

John-Hong 2 年之前
父節點
當前提交
6dfb6e7cf5

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "@better-scroll/pull-up": "^2.4.2",
     "@vue/shared": "^3.0.0",
     "axios": "^0.27.2",
+    "bluebird": "3.5.5",
     "core-js": "^3.6.5",
     "crypto-js": "^4.1.1",
     "flyio": "^0.6.2",

+ 7 - 7
src/components/Login/Login.vue

@@ -274,13 +274,13 @@ export default {
           pageId: query?.pageId || uni.getStorageSync('pageId'),
           // callback: this.wss,
           callback: () => {
-            if (!openid) {
-              this.$router.replace({
-                path: '/openWx',
-                query: query,
-              });
-              return;
-            }
+            // if (!openid) {
+            //   this.$router.replace({
+            //     path: '/openWx',
+            //     query: query,
+            //   });
+            //   return;
+            // }
             this.isInit = true;
             // 当所有的数据都初始化之后再次执行
             // this.getTicket();

+ 5 - 3
src/components/plate-number/plateNumber.vue

@@ -5,7 +5,7 @@
       v-model="chinese_popup"
       position="bottom"
       class="uni-popup plate_number"
-      :overlay="false"
+      :close-on-click-overlay="false"
       :maskClick="false"
     >
       <div class="plate_number_wrap">
@@ -31,7 +31,7 @@
       position="bottom"
       class="uni-popup allBoard"
       :maskClick="false"
-      :overlay="false"
+      :close-on-click-overlay="false"
     >
       <div class="allBoard_wrap">
         <div class="close-box">
@@ -493,8 +493,8 @@ export default {
         }
       } else if (this.English_Number[index].id == 66) {
         //切换中文
-        this.openKeyboardCN();
         this.closeKeyboardEN();
+        this.openKeyboardCN();
       } else {
         // 把选中的字赋值
         this.$set(
@@ -522,6 +522,7 @@ export default {
       console.log(521, '打开属性面板', this.init);
       this.closeKeyboardEN();
       this.chinese_popup = true;
+      this.allBoard_popup = false;
     },
     closeKeyboardCN() {
       this.chinese_popup = false;
@@ -530,6 +531,7 @@ export default {
     openKeyboardEN() {
       this.openKeyboardCN();
       this.allBoard_popup = true;
+      this.chinese_popup = false;
       // this.$refs["allBoard_popup"].open();
     },
     closeKeyboardEN() {

+ 4 - 0
src/constants.js

@@ -35,6 +35,9 @@ const USER_LIST_ITEM_EDIT_OBJ = {
 	'certificateNum':{label:'证件号码',placeholder:'请填写您的证件号码'},
 }
 
+// const LOGO_DEFAULT = `https://cnsh-kerry-crm-prod.oss-cn-shanghai.aliyuncs.com/images/logo-default.png`;
+const LOGO_KO_DEFAULT = `https://cnsh-kerry-crm-prod.oss-cn-shanghai.aliyuncs.com/images/logo-default1.png`;
+
 const LICENSE_PLATE_TYPE_ARR = [
 	{value: 'ORDINARY_CAR_NO', label: '燃油车辆'},
 	{value: 'NEW_ENERGY_CAR_NO', label: '新能源'},
@@ -219,6 +222,7 @@ export {
 	REG_SOURCE,
 	LOGO_DEFAULT,
 	LOGO_DEFAULT1,
+	LOGO_KO_DEFAULT,
 	JINGAN_LOGO,
 	PUDONG_LOGO,
 	BEIJING_LOGO,

+ 76 - 58
src/pages/parkingFee/parkingFeeDetail.vue

@@ -199,20 +199,26 @@
         支付
       </div>
     </div>
-    <van-popup ref="popup" type="bottom" :animation="false" :maskClick="false">
+    <van-popup
+      v-model="popup"
+      position="bottom"
+      :animation="false"
+      :maskClick="false"
+      :close-on-click-overlay="false"
+    >
       <div class="popue_box">
         <div class="popue_box_index1">积分减免</div>
         <div class="popue_box_index">
           <div>减免规则</div>
-          <div style="color: #989898">
+          <div style="color: #999999">
             {{ integral }}积分抵扣{{
               parkMallCode === 5 ? integralToValue + '元' : '1小时'
             }}
           </div>
         </div>
         <div class="popue_box_index">
-          <div style="font-weight: 700">可用积分</div>
-          <div style="color: #ed1c24">{{ bonus }}分</div>
+          <div>可用积分</div>
+          <div style="color: #999999">{{ bonus }}分</div>
         </div>
         <div class="popue_box_index">
           <div>抵扣{{ parkMallCode === 5 ? '金额' : '时长' }}</div>
@@ -310,6 +316,7 @@ export default {
       isPageHide: false, // 用于其它有人吗倒计时重置时不再弹出优惠框
       isShowPopup: false, // 优惠提示是否显示
       preUrl: '',
+      popup: false,
       integralToValue: 0, // 深圳前海停车500积分兑换5元
       integralMaxMoney: 0, // 深圳前海停车积分上限
     };
@@ -340,6 +347,7 @@ export default {
     // 停车优惠(首停、会员减免、消费减免)
     discountDesc() {
       if (this.hasDiscount) {
+        console.log('判读当前位置是否打印', this.checkedTotal);
         if (this.checkedTotal > 0) {
           return `已选择${this.checkedTotal}项优惠`;
         }
@@ -459,36 +467,35 @@ export default {
         await window.wxJsSdkConfigInitPromise;
       }
     }
+    const option = this.$route.query;
     this.picUrl = this.$picUrl;
-    this.payCarno = this.$route.query.carno;
-    this.orderno = this.$route.query.orderno;
-    this.id = this.$route.query.id;
+    this.payCarno = option.carno;
+    this.orderno = option.orderno;
+    this.id = option.id;
     // 场景二维码记录(是否扫码进入)
     // app.globalData.paramsScene = {};
-    this.$store.commit('SET_PARAMS_SCENE', {});
     // this.$saveSceneQrcodeDetail(
     //   'page',
-    //   'parkingFeeDetail:' + this.$route.query.id,
+    //   'parkingFeeDetail:' + option.id,
     //   '缴费详情',
     //   '',
     //   '',
     //   '',
     //   ''
     // );
-    // this.init();
-    this.createParkOrder();
+    this.init();
     // if (JSON.stringify(app.globalData.userInfo) !== "{}" && JSON.stringify(app.globalData.member) !== "{}") {
-    // this.createParkOrder();
+    this.createParkOrder();
     // } else {
     // 	this.$refs.authorize.login("/pages/parkingFee/parkingFeeDetail", () => {
     // 		this.createParkOrder();
     // 	});
     // }
     // 埋点本地化
-    this.preUrl = uni.getStorageSync('previousUrl');
-    uni.setStorageSync('previousUrl', '/pages/parkingFee/parkingFeeDetail.vue');
+    // this.preUrl = uni.getStorageSync('previousUrl');
+    // uni.setStorageSync('previousUrl', '/pages/parkingFee/parkingFeeDetail.vue');
   },
-  watch: {
+  /* watch: {
     isInit() {
       console.log(
         493493493,
@@ -512,57 +519,46 @@ export default {
     // projectId() {
     //   console.log(490490490, this.projectId)
     // }
-  },
+  }, */
   mounted() {
     setTimeout(() => {
       uni.setNavigationBarTitle({
         title: '停车支付',
       });
     }, 300);
-    console.log('页面被打开了');
     console.log('订单时间:' + this.orderCreateTime);
-    // log.info('订单时间:' + this.orderCreateTime);
-    // return;
-    // 用户加载页面是计算规则
-    if (this.isInit && this.isInit?.projectId && this.isInit?.member?.vipcode) {
-      this.isPageHide = false;
-      // 如果订单时间+3分钟-当前时间<=0 刷新订单
-      if (this.orderCreateTime) {
-        const countDownTime = moment(this.orderCreateTime)
-          .add(180, 's')
-          .diff(moment(), 's');
-        console.log('剩余时间:' + countDownTime);
-        log.info('剩余时间:' + countDownTime);
-        if (countDownTime <= 0) {
-          setTimeout(() => {
-            this.createParkOrder();
-          }, 300);
-        } else {
-          this.refreshTime = countDownTime;
-        }
+    log.info('订单时间:' + this.orderCreateTime);
+    this.isPageHide = false;
+    // 如果订单时间+3分钟-当前时间<=0 刷新订单
+    if (this.orderCreateTime) {
+      const countDownTime = moment(this.orderCreateTime)
+        .add(180, 's')
+        .diff(moment(), 's');
+      console.log('剩余时间:' + countDownTime);
+      log.info('剩余时间:' + countDownTime);
+      if (countDownTime <= 0) {
+        this.createParkOrder();
+      } else {
+        this.refreshTime = countDownTime;
       }
-      // return;
+    }
 
-      // 优惠减免(首停、会员、消费)
-      this.checkedTotal = JSON.parse(uni.getStorageSync('checkedTotal'));
-      this.discountTotal = JSON.parse(uni.getStorageSync('discountTotal'));
+    // 优惠减免(首停、会员、消费)
+    this.checkedTotal = uni.getStorageSync('checkedTotal');
+    this.discountTotal = uni.getStorageSync('discountTotal');
 
-      // 电子券减免(停车券)
-      this.couponInfo = JSON.parse(uni.getStorageSync('couponInfo'));
-      this.checkedCouponCount = JSON.parse(
-        uni.getStorageSync('checkedCouponList')
-      ).length;
+    // 电子券减免(停车券)
+    this.couponInfo = uni.getStorageSync('couponInfo');
+    this.checkedCouponCount = uni.getStorageSync('checkedCouponList').length;
 
-      // 纸质优惠券
-      this.paperCouponInfo = JSON.parse(uni.getStorageSync('paperCouponInfo'));
-    }
-  },
-  onHide() {
-    this.isPageHide = true;
+    // 纸质优惠券
+    console.log(547, uni.getStorageSync('paperCouponInfo'));
+    this.paperCouponInfo = uni.getStorageSync('paperCouponInfo') || {};
   },
   methods: {
     // 页面初始清空缓存
     init() {
+      console.log('清理数据');
       // 优惠减免(首停、会员、消费)
       uni.removeStorageSync('checkedList'); // 选中list
       uni.removeStorageSync('checkedTotal'); // 选中count数
@@ -807,6 +803,7 @@ export default {
         header: JSON.parse(uni.getStorageSync('handleUser')),
       })
         .then((res) => {
+          console.log('加载优惠券信息');
           uni.hideLoading();
           if (res.data.code === 0) {
             this.parkFee = res.data.data;
@@ -866,6 +863,10 @@ export default {
             }
             uni.setStorageSync('parkFee', JSON.stringify(this.parkFee));
             // 如果有可使用会员减免、消费减免,追加弹框提示
+            console.log(
+              '如果有可使用会员减免、消费减免,追加弹框提示',
+              this.parkFee
+            );
             if (
               this.parkFee.parkInfoEntity.consumeReduce ||
               this.parkFee.parkInfoEntity.memberLevelReduce
@@ -877,6 +878,7 @@ export default {
                   this.parkFee.parkConsumeReducesEntityList[0])
               ) {
                 this.hasDiscount = true;
+                console.log('hasDiscount', this.hasDiscount);
                 // if (!this.parkInfo.servicefee) {
                 // 	return;
                 // }
@@ -907,12 +909,20 @@ export default {
               }
             }
             // 自动勾选优惠
+            console.log(
+              905,
+              this.discountTotalFee,
+              this.hasDiscount ||
+                this.bonusCopy > this.integral ||
+                this.couponCount
+            );
             if (
               !this.discountTotalFee &&
               (this.hasDiscount ||
                 this.bonusCopy > this.integral ||
                 this.couponCount)
             ) {
+              console.log(911);
               this.autoCheckDiscounts();
             }
           } else {
@@ -941,14 +951,16 @@ export default {
       } else {
         this.bonusfee = this.duration * this.hourMoney;
       }
-      this.$refs.popup.close();
+      // this.$refs.popup.close();
+      this.popup = false;
     },
 
     // 积分确认
     confirm() {
       this.bonusCopy = this.bonus;
       this.durationCopy = this.duration;
-      this.$refs.popup.close();
+      // this.$refs.popup.close();
+      this.popup = false;
     },
 
     // 减积分
@@ -1038,7 +1050,8 @@ export default {
         this.parkFee.parkIntegraltomoneyList &&
         this.parkFee.parkIntegraltomoneyList.length
       ) {
-        this.$refs['popup'].open();
+        // this.$refs['popup'].open();
+        this.popup = true;
       }
     },
 
@@ -1091,6 +1104,7 @@ export default {
         this.parkFee.parkConsumeReducesEntityList[0] &&
         this.parkFee.parkConsumeReducesEntityList[0].recuceContent
       ) {
+        console.log(1095);
         this.autoConsume(serviceFee);
       }
 
@@ -1116,6 +1130,7 @@ export default {
 
     // 自动选取消费减免
     autoConsume(serviceFee) {
+      console.log('自动选取消费减免', serviceFee);
       let consumeTime =
         +this.parkFee.parkConsumeReducesEntityList[0].recuceContent || 0; // 消费减免时长
       let consumeFee = 0; // 消费减免费用
@@ -1188,6 +1203,7 @@ export default {
       }
 
       // 实时显示
+      console.log('实时显示', this.checkedTotal);
       this.checkedTotal++;
       this.discountTotal = {
         memberGradeFee: 0,
@@ -1402,6 +1418,7 @@ export default {
         }
       }
 
+      console.log('打印优惠券', couponListRule2);
       // 未使用规则1的电子券则继续
       if (!isCheckedRule1 && couponListRule2 && couponListRule2.length) {
         // 使用同类型可叠加电子券
@@ -2923,9 +2940,9 @@ export default {
     color: #fff;
     border-radius: 60px;
     text-align: center;
-    color: #7e4fa1;
+    color: #064C8A;
     font-weight: 700;
-    border: 1px solid #7e4fa1;
+    border: 1px solid #064C8A;
   }
 
   .blue_popue_box_index4_by {
@@ -2949,8 +2966,9 @@ export default {
     color: #fff;
     border-radius: 60px;
     text-align: center;
-    background-image: linear-gradient(to right, #7e4fa1, #433c7f);
-    border: 1px solid #7e4fa1;
+    // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
+    background-color: #064C8A;
+    border: 1px solid #064C8A;
   }
 
   .blue_popue_box_index4_by1 {

+ 5 - 0
yarn.lock

@@ -2523,6 +2523,11 @@ block-stream@*:
   dependencies:
     inherits "~2.0.0"
 
+bluebird@3.5.5:
+  version "3.5.5"
+  resolved "https://nexus-internal.kerryonvip.com/repository/kerry-npm-group/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
+  integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==
+
 bluebird@^3.1.1, bluebird@^3.5.5:
   version "3.7.2"
   resolved "https://nexus-internal.kerryonvip.com/repository/kerry-npm-group/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"