Bläddra i källkod

Merge pull request #317 from John-Hong/John/release-2.19.0/SCRM-4970

fix(KIP-12703): 优化车牌查费前的登陆判断和优惠车判断逻辑
Tron 1 år sedan
förälder
incheckning
abce91e5f4

+ 4 - 2
src/pages/parkingFee/mixins/parkingFee.js

@@ -457,9 +457,10 @@ export default {
     },
     // 校验车牌号
     async preHandleSearch() {
+      const member = uni.getStorageSync('member');
       if (this.disabledBtn) return
       // 不是杭州的车牌 或者 用户拒绝登陆的场景
-      if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied')  {
+      if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied' || !member)  {
         this.toParkingFeeDetail()
         return
       }
@@ -492,8 +493,9 @@ export default {
     },
     // 历史车牌快速查询
     async toHandleSearchBefore(vehicleNo) {
+      const member = uni.getStorageSync('member');
       // 不是杭州的车牌 或者 用户拒绝登陆的场景
-      if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied')  {
+      if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied' || !member)  {
         this.toHandleSearch(vehicleNo)
         return
       }

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

@@ -138,7 +138,7 @@ export default {
     // 跳转支付页面
     toPayBefore(item) {
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
+      if(!this.isHZ || item.eligible || !this.enableDiscountVehicle){
         this.toPay(item.vehicleNo)
         return
       }

+ 1 - 1
src/pages/parkingFee/vehicleManagement.vue

@@ -20,7 +20,7 @@
               我的车牌
             </div>
 <!--            <img v-if="isHZ && item.eligible" class="discountCar" :src="`${require(`@/pages/parkingFee/static/images/${source ==='KIP' ? 'discountCarOffice': 'discountCar' }.svg`)}`" />-->
-            <div class="discountCar" v-if="isHZ && item.eligible && this.enableDiscountVehicle">
+            <div class="discountCar" v-if="isHZ && item.eligible && enableDiscountVehicle">
               优惠车
             </div>
             <div class="plate_plate_index plate_plate_index2">

+ 1 - 1
src/pages/parkingFeeV2/mixins/vehicleManagement.js

@@ -156,7 +156,7 @@ export default {
     // 跳转支付页面
     toPayBefore(item) {
       // 不是杭州的车牌 或者 是非优惠的车牌
-      if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
+      if(!this.isHZ || item.eligible || !this.enableDiscountVehicle){
         this.toPay(item.vehicleNo)
         return
       }

+ 1 - 1
src/utils/index.js

@@ -182,7 +182,7 @@ export function wxToLoginCallback( path,callback ) {
 export function initEnv() {
   const origin = window.location.origin;
   console.log('当前页面的url地址  ',origin);
-  if ( origin.indexOf('https://dev-') > -1  || origin.indexOf('http://127.0.0.1') > -1) {
+  if ( origin.indexOf('https://dev-') > -1  || origin.indexOf('http://127.0.0.1') > -1 || origin.indexOf('http://localhost:') > -1) {
     window.env = 'qa';
     window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
     window.cmrApi = 'https://qa-crm.kerryplus.com/xcrm-api/api';