Эх сурвалжийг харах

Merge remote-tracking branch 'origin/release-3.2.0' into release-3.2.0

# Conflicts:
#	src/pages/parkingFee/mixins/parkingFeeCoupon.js
#	src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js
john 1 жил өмнө
parent
commit
567ae1e3bb

+ 13 - 2
src/api/request.js

@@ -10,7 +10,7 @@ import { md } from '@/utils/common'
 import { Toast, Dialog, Switch } from 'vant';
 import { Toast, Dialog, Switch } from 'vant';
 // import vue from 'vue';
 // import vue from 'vue';
 import store from '@/store';
 import store from '@/store';
-import { backLbsHome, getsTheCurrentTopic, toLogin } from "@/utils";
+import { backLbsHome, getsTheCurrentTopic, toLogin, isEmpty } from "@/utils";
 import kipTheme from '@/kui/theme/theme'
 import kipTheme from '@/kui/theme/theme'
 // import { v4 as uuidv4 } from 'uuid';
 // import { v4 as uuidv4 } from 'uuid';
 // import { wxToLoginCallback } from '@/utils/index.js'
 // import { wxToLoginCallback } from '@/utils/index.js'
@@ -110,7 +110,18 @@ function XUser(config) {
     delete params.userId
     delete params.userId
     delete params.phoneNumber
     delete params.phoneNumber
   }
   }
-  if (params.isLogin && (!params.vipCode || !params.userId || params.userId == 'undefined') && config.url.indexOf('/parking-lots/') < -1 || !params.sourceId) {
+  // 非登录接口,并且 sourceId、cid 为空,提示用户账户信息异常
+  if (!params.isLogin && (isEmpty(params, 'sourceId') || isEmpty(params, 'cid'))  && config.url.indexOf('/parking-lots/') < -1) {
+    throw {
+      response: {
+        data: {
+          message: '当前参数异常,请重新登录',
+          code: 'BAD_USER_INFO_2'
+        }
+      }
+    };
+  }
+   if (params.isLogin && (!params.vipCode || !params.userId || params.userId == 'undefined') && config.url.indexOf('/parking-lots/') < -1 || !params.sourceId) {
     throw {
     throw {
       response: {
       response: {
         data: {
         data: {

+ 4 - 1
src/main.js

@@ -7,7 +7,7 @@ import '@/common/css/quill.snow.css'; // 引入对富文本的支持
 // 开发环境和qa环境 打开debug
 // 开发环境和qa环境 打开debug
 // const debug = /dev-t?-?|qa-t?-?|sl-t?-?|2486/.test(window.location.origin);
 // const debug = /dev-t?-?|qa-t?-?|sl-t?-?|2486/.test(window.location.origin);
 let debug = false;
 let debug = false;
-const keys = ['https://dev-','https://qa-','https://lt-','https://sl-','http://127.0.0.1'];
+const keys = ['https://dev-','https://qa-','https://lt-','https://sl-','http://127.0.0.1', 'http://localhost:8080'];
 keys.forEach(key => {
 keys.forEach(key => {
   if(!debug && window.location.origin.indexOf(key) > -1) {
   if(!debug && window.location.origin.indexOf(key) > -1) {
     debug = true
     debug = true
@@ -17,6 +17,9 @@ if (debug) {
   window.vConsole = new VConsole(
   window.vConsole = new VConsole(
     // { theme: 'dark' }
     // { theme: 'dark' }
   );
   );
+  setTimeout(() => {
+    window.vConsole?.setSwitchPosition(20, 200);
+  }, 200)
 }
 }
 import './plugins/install';
 import './plugins/install';
 import App from './App.vue';
 import App from './App.vue';

+ 8 - 4
src/pages/parkingFee/mixins/parkingFeeCoupon.js

@@ -39,6 +39,7 @@ export default {
       remainCoupons: ( state ) => state.order.remainCoupons, // 仅限杭州当前剩余可选电子券上限
       remainCoupons: ( state ) => state.order.remainCoupons, // 仅限杭州当前剩余可选电子券上限
       parkMallCode: ( state ) => state.order.parkMallCode, // 当前车场的数据
       parkMallCode: ( state ) => state.order.parkMallCode, // 当前车场的数据
       maxOneDayCoupons: ( state ) => state.order.maxOneDayCoupons,// 仅限杭州当日电子券可选上限
       maxOneDayCoupons: ( state ) => state.order.maxOneDayCoupons,// 仅限杭州当日电子券可选上限
+      paperDiscountFee: ( state ) => state.order.paperDiscountFee,// 纸质券的优惠金额
     }),
     }),
   },
   },
 
 
@@ -76,8 +77,8 @@ export default {
        * 2、superposition  叠加使用规则 (1不可叠加,2仅同类型可叠加,3可叠加);
        * 2、superposition  叠加使用规则 (1不可叠加,2仅同类型可叠加,3可叠加);
        * */
        * */
       this.couponList = [...this.coupons];
       this.couponList = [...this.coupons];
-      this.remainPrice = this.usingTotalDiscount;
-      if ((this.parkMallCode === 4 || this.parkMallCode === 6) && this.orderDetail?.discountInfo?.points?.[0]?.discountFee) {
+      this.remainPrice = this.usingTotalDiscount - this.paperDiscountFee;
+      if ((this.parkMallCode === 4 || this.parkMallCode === 6) && this.orderDetail?.discountInfo?.points[0]?.discountFee) {
         this.remainPrice = this.remainPrice - this.orderDetail.discountInfo.points[0].discountFee
         this.remainPrice = this.remainPrice - this.orderDetail.discountInfo.points[0].discountFee
       }   
       }   
       // 如果前海开启无积分上限的话,则
       // 如果前海开启无积分上限的话,则
@@ -279,8 +280,8 @@ export default {
       // 最高优先级,提示未生效的电子券
       // 最高优先级,提示未生效的电子券
       if (item.status === 'unavailable' || moment().isSameOrAfter(item.expirationDate)) {
       if (item.status === 'unavailable' || moment().isSameOrAfter(item.expirationDate)) {
         return Toast({
         return Toast({
-          className: 'top300',
           message: `当前电子券暂未生效,不可用`,
           message: `当前电子券暂未生效,不可用`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -288,8 +289,8 @@ export default {
       if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8) ) {
       if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8) ) {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
-          className: 'top300',
           message: `电子券每天最多可使用${ this.maxOneDayCoupons }张`,
           message: `电子券每天最多可使用${ this.maxOneDayCoupons }张`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -337,6 +338,7 @@ export default {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
           message: `优惠券已达当日使用上限,不可再用`,
           message: `优惠券已达当日使用上限,不可再用`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -346,6 +348,7 @@ export default {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
           message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
           message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -355,6 +358,7 @@ export default {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
           message: `超出抵扣上限,每次最高可抵扣${maxOneTimeDiscountTime}小时`,
           message: `超出抵扣上限,每次最高可抵扣${maxOneTimeDiscountTime}小时`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }

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

@@ -5,6 +5,7 @@ import { compare } from '@/utils/location.js';
 import uni from '@/utils/uniHooks';
 import uni from '@/utils/uniHooks';
 import { initWxJsSdkConfig } from '@/utils/login';
 import { initWxJsSdkConfig } from '@/utils/login';
 import {
 import {
+  toLogin,
   backLbsHome,
   backLbsHome,
   getPlatform,
   getPlatform,
   getsTheCurrentTopic,
   getsTheCurrentTopic,
@@ -403,12 +404,17 @@ export default {
       const platform = getPlatform();
       const platform = getPlatform();
       // console.log('platform:::', platform)
       // console.log('platform:::', platform)
       let appId = uni.getStorageSync('appid');
       let appId = uni.getStorageSync('appid');
-      let openId = uni.getStorageSync('openid') || this.openid;
+      let openId = this.$store.state.openid;
       if (platform === 'miniprogram') {
       if (platform === 'miniprogram') {
         // appId = 'wx92c3e55fbef6b2af';
         // appId = 'wx92c3e55fbef6b2af';
         // appId = 'wxd830fe4d1e04988e';
         // appId = 'wxd830fe4d1e04988e';
         appId = this.appId;
         appId = this.appId;
       }
       }
+      // 如果 openId 丢失的话,提示用户回到首页重新进入
+      if (openId && openId === 'undefined' || !openId || !appId || appId === 'undefined') {
+        toLogin()
+        return
+      }
       // console.log('支付宝::', isAlipay())
       // console.log('支付宝::', isAlipay())
       const params = {
       const params = {
         region: 'cn',
         region: 'cn',

+ 7 - 3
src/pages/parkingFee/mixins/parkingFeeDiscounts.js

@@ -47,7 +47,7 @@ export default {
       checkedTotal: (state) => state.order.checkedTotal,
       checkedTotal: (state) => state.order.checkedTotal,
       parkMallCode: (state) => state.order.parkMallCode,
       parkMallCode: (state) => state.order.parkMallCode,
       paperDiscountTime: (state) => state.order.paperDiscountTime,
       paperDiscountTime: (state) => state.order.paperDiscountTime,
-      paperDiscountFee: (state) => state.order.paperDiscountTime,
+      paperDiscountFee: (state) => state.order.paperDiscountFee,
       availableDiscountFee: (state) => state.order.availableDiscountFee,
       availableDiscountFee: (state) => state.order.availableDiscountFee,
     }),
     }),
     enableConsumeNonSplit() {
     enableConsumeNonSplit() {
@@ -236,6 +236,10 @@ export default {
       if (points.length && JSON.stringify(points[0]) !== "{}") {
       if (points.length && JSON.stringify(points[0]) !== "{}") {
         this.remainPrice = this.parkMallCode !== 1 ? this.usingTotalDiscount - points[0].discountFee : this.usingTotalDiscount;
         this.remainPrice = this.parkMallCode !== 1 ? this.usingTotalDiscount - points[0].discountFee : this.usingTotalDiscount;
       }
       }
+      // 如果有纸质优惠券的话,paperDiscountFee
+      if (this.paperDiscountFee) {
+        this.remainPrice = this.remainPrice - this.paperDiscountFee;
+      }
       this.memberGrade = { ...memberGrade[0] };
       this.memberGrade = { ...memberGrade[0] };
       this.consume = { ...consume[0] };
       this.consume = { ...consume[0] };
       if (JSON.stringify(this.memberGrade) !== '{}' && this.memberGrade && this.memberGrade.hasOwnProperty('selected') ? this.memberGrade.selected : this.memberGrade.defaultSelected) {
       if (JSON.stringify(this.memberGrade) !== '{}' && this.memberGrade && this.memberGrade.hasOwnProperty('selected') ? this.memberGrade.selected : this.memberGrade.defaultSelected) {
@@ -515,8 +519,8 @@ export default {
         const remainConsumeTimeFee = remainConsumeTime * hourPrice;
         const remainConsumeTimeFee = remainConsumeTime * hourPrice;
 
 
         // TODO: 统计纸质优惠券的总金额, usingTotalDiscount,才是用户当前订单使用的优惠总数
         // TODO: 统计纸质优惠券的总金额, usingTotalDiscount,才是用户当前订单使用的优惠总数
-        this.isMember = !(this.usingTotalDiscount < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.memberLevelDiscount);
-        this.isReduces = !(this.usingTotalDiscount < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.enableConsume);
+        this.isMember = !(this.usingTotalDiscount - this.paperDiscountFee < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.memberLevelDiscount);
+        this.isReduces = !(this.usingTotalDiscount - this.paperDiscountFee < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.enableConsume);
       }
       }
       if (callback) callback();
       if (callback) callback();
     },
     },

+ 7 - 3
src/pages/parkingFeeV2/Discounts/index.js

@@ -50,7 +50,7 @@ export default {
       checkedTotal: (state) => state.order.checkedTotal,
       checkedTotal: (state) => state.order.checkedTotal,
       parkMallCode: (state) => state.order.parkMallCode,
       parkMallCode: (state) => state.order.parkMallCode,
       paperDiscountTime: (state) => state.order.paperDiscountTime,
       paperDiscountTime: (state) => state.order.paperDiscountTime,
-      paperDiscountFee: (state) => state.order.paperDiscountTime,
+      paperDiscountFee: (state) => state.order.paperDiscountFee,
       availableDiscountFee: (state) => state.order.availableDiscountFee,
       availableDiscountFee: (state) => state.order.availableDiscountFee,
     }),
     }),
     enableConsumeNonSplit() {
     enableConsumeNonSplit() {
@@ -239,6 +239,10 @@ export default {
       if (points.length && JSON.stringify(points[0]) !== "{}") {
       if (points.length && JSON.stringify(points[0]) !== "{}") {
         this.remainPrice = this.parkMallCode !== 1 ? this.usingTotalDiscount - points[0].discountFee : this.usingTotalDiscount;
         this.remainPrice = this.parkMallCode !== 1 ? this.usingTotalDiscount - points[0].discountFee : this.usingTotalDiscount;
       }
       }
+      // 如果有纸质优惠券的话,paperDiscountFee
+      if (this.paperDiscountFee) {
+        this.remainPrice = this.remainPrice - this.paperDiscountFee;
+      }
       this.memberGrade = { ...memberGrade[0] };
       this.memberGrade = { ...memberGrade[0] };
       this.consume = { ...consume[0] };
       this.consume = { ...consume[0] };
       if (JSON.stringify(this.memberGrade) !== '{}' && this.memberGrade && this.memberGrade.hasOwnProperty('selected') ? this.memberGrade.selected : this.memberGrade.defaultSelected) {
       if (JSON.stringify(this.memberGrade) !== '{}' && this.memberGrade && this.memberGrade.hasOwnProperty('selected') ? this.memberGrade.selected : this.memberGrade.defaultSelected) {
@@ -570,8 +574,8 @@ export default {
         const remainConsumeTimeFee = remainConsumeTime * hourPrice;
         const remainConsumeTimeFee = remainConsumeTime * hourPrice;
 
 
         // TODO: 统计纸质优惠券的总金额, usingTotalDiscount,才是用户当前订单使用的优惠总数
         // TODO: 统计纸质优惠券的总金额, usingTotalDiscount,才是用户当前订单使用的优惠总数
-        this.isMember = !(this.usingTotalDiscount < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.memberLevelDiscount);
-        this.isReduces = !(this.usingTotalDiscount < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.enableConsume);
+        this.isMember = !(this.usingTotalDiscount - this.paperDiscountFee < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.memberLevelDiscount);
+        this.isReduces = !(this.usingTotalDiscount - this.paperDiscountFee < (oneTimeLimitation ? maxOneTimeDiscountFee : maxOneDayDiscountFee) && this.enableConsume);
       }
       }
       if (callback) callback();
       if (callback) callback();
     },
     },

+ 8 - 4
src/pages/parkingFeeV2/mixins/parkingFeeCoupon.js

@@ -39,6 +39,7 @@ export default {
       remainCoupons: ( state ) => state.order.remainCoupons, // 仅限杭州当前剩余可选电子券上限
       remainCoupons: ( state ) => state.order.remainCoupons, // 仅限杭州当前剩余可选电子券上限
       parkMallCode: ( state ) => state.order.parkMallCode, // 当前车场的数据
       parkMallCode: ( state ) => state.order.parkMallCode, // 当前车场的数据
       maxOneDayCoupons: ( state ) => state.order.maxOneDayCoupons,// 仅限杭州当日电子券可选上限
       maxOneDayCoupons: ( state ) => state.order.maxOneDayCoupons,// 仅限杭州当日电子券可选上限
+      paperDiscountFee: ( state ) => state.order.paperDiscountFee,// 纸质券的优惠金额
     }),
     }),
   },
   },
 
 
@@ -76,8 +77,8 @@ export default {
        * 2、superposition  叠加使用规则 (1不可叠加,2仅同类型可叠加,3可叠加);
        * 2、superposition  叠加使用规则 (1不可叠加,2仅同类型可叠加,3可叠加);
        * */
        * */
       this.couponList = [...this.coupons];
       this.couponList = [...this.coupons];
-      this.remainPrice = this.usingTotalDiscount;
-      if ((this.parkMallCode === 4 || this.parkMallCode === 6) && this.orderDetail?.discountInfo?.points?.[0]?.discountFee) {
+      this.remainPrice = this.usingTotalDiscount - this.paperDiscountFee;
+      if ((this.parkMallCode === 4 || this.parkMallCode === 6) && this.orderDetail?.discountInfo?.points[0]?.discountFee) {
         this.remainPrice = this.remainPrice - this.orderDetail.discountInfo.points[0].discountFee
         this.remainPrice = this.remainPrice - this.orderDetail.discountInfo.points[0].discountFee
       }   
       }   
       // 前海积分不参与当前电子券优惠上限
       // 前海积分不参与当前电子券优惠上限
@@ -280,8 +281,8 @@ export default {
       // 最高优先级,提示未生效的电子券
       // 最高优先级,提示未生效的电子券
       if (item.status === 'unavailable' || moment().isSameOrAfter(item.expirationDate)) {
       if (item.status === 'unavailable' || moment().isSameOrAfter(item.expirationDate)) {
         return Toast({
         return Toast({
-          className: 'top300',
           message: `当前电子券暂未生效,不可用`,
           message: `当前电子券暂未生效,不可用`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -289,8 +290,8 @@ export default {
       if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8 || this.parkMallCode === 7 || this.parkMallCode === 9) ) {
       if ( this.checkedCouponList.length >= this.remainCoupons && (this.parkMallCode === 2 || this.parkMallCode === 8 || this.parkMallCode === 7 || this.parkMallCode === 9) ) {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
-          className: 'top300',
           message: `电子券每天最多可使用${ this.maxOneDayCoupons }张`,
           message: `电子券每天最多可使用${ this.maxOneDayCoupons }张`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -338,6 +339,7 @@ export default {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
           message: `优惠券已达当日使用上限,不可再用`,
           message: `优惠券已达当日使用上限,不可再用`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -347,6 +349,7 @@ export default {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
           message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
           message: [5, 10].indexOf(parkMallCode) > -1 ? '当日优惠已达上限,不可再用' : `每日最高可抵扣${maxOneDayDiscountFee}元`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }
@@ -356,6 +359,7 @@ export default {
         if ( showMsg ) return true
         if ( showMsg ) return true
         return Toast({
         return Toast({
           message: `超出抵扣上限,每次最高可抵扣${maxOneTimeDiscountTime}小时`,
           message: `超出抵扣上限,每次最高可抵扣${maxOneTimeDiscountTime}小时`,
+          className: "white-space",
           icon: 'none',
           icon: 'none',
         });
         });
       }
       }

+ 8 - 1
src/pages/parkingFeeV2/mixins/parkingFeeDetail.js

@@ -1,6 +1,7 @@
 import { mapState } from 'vuex';
 import { mapState } from 'vuex';
 import uni from '@/utils/uniHooks';
 import uni from '@/utils/uniHooks';
 import {
 import {
+  toLogin,
   backLbsHome,
   backLbsHome,
   getPlatform,
   getPlatform,
   isAlipay,
   isAlipay,
@@ -472,12 +473,18 @@ export default {
       const platform = getPlatform();
       const platform = getPlatform();
       // console.log('platform:::', platform)
       // console.log('platform:::', platform)
       let appId = uni.getStorageSync('appid');
       let appId = uni.getStorageSync('appid');
-      let openId = uni.getStorageSync('openid') || this.openid;
+      // let openId = uni.getStorageSync('openid') || this.openid;
+      let openId = this.$store.state.openid;
       if (platform === 'miniprogram') {
       if (platform === 'miniprogram') {
         // appId = 'wx92c3e55fbef6b2af';
         // appId = 'wx92c3e55fbef6b2af';
         // appId = 'wxd830fe4d1e04988e';
         // appId = 'wxd830fe4d1e04988e';
         appId = this.appId;
         appId = this.appId;
       }
       }
+      // 如果 openId 丢失的话,提示用户回到首页重新进入
+      if (openId && openId === 'undefined' || !openId || !appId || appId === 'undefined') {
+        toLogin()
+        return
+      }
       // console.log('支付宝::', isAlipay())
       // console.log('支付宝::', isAlipay())
       const params = {
       const params = {
         region: 'cn',
         region: 'cn',

+ 2 - 2
src/pages/parkingFeeV2/mixins/parkingFeePaperCoupon.js

@@ -83,7 +83,7 @@ export default {
   },
   },
   methods: {
   methods: {
     pageInit() {
     pageInit() {
-      this.paperCouponList = [...this.paperCoupons]
+            this.paperCouponList = [...this.paperCoupons]
     },
     },
     showToast( text ) {
     showToast( text ) {
       let options = {};
       let options = {};
@@ -249,7 +249,7 @@ export default {
     // 确认
     // 确认
     confirm() {
     confirm() {
       // 如果用户没有选择纸质优惠券,则返回上一级页面
       // 如果用户没有选择纸质优惠券,则返回上一级页面
-      if(!this.paperCoupons.length) {
+      if(!this.paperCoupons.length && !this.orderDetail?.discountInfo?.paperCoupons) {
         this.$router.back();
         this.$router.back();
         return
         return
       }
       }

+ 6 - 2
src/pages/parkingFeeV2/mixins/parkingFindCar.js

@@ -70,11 +70,12 @@ export default {
   },
   },
   async created() {
   async created() {
     this.options = this.$route.query;
     this.options = this.$route.query;
+    this.dataObject = this.options
     // this.parkingLots()
     // this.parkingLots()
   },
   },
   async mounted() {
   async mounted() {
       this.$nextTick(()=>{
       this.$nextTick(()=>{
-        this.getCarInformations(this.options.vehicleNo)
+        // this.getCarInformations(this.options.vehicleNo)
       })
       })
       await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
       await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
     setTimeout(() => {
     setTimeout(() => {
@@ -120,6 +121,9 @@ export default {
         this.dataObject = res.data
         this.dataObject = res.data
       }
       }
     },
     },
+    getCarNum (carNum) {
+        return carNum.replace(new RegExp(".{" + (1+1) + "}"), "$&·")
+    },
     isQHKC() {
     isQHKC() {
         const lbsList = ['8a88a9fd7f73ffcd017f968739870006','8a8486a37f48f7bd017f4e5bddd10000','8a8486a37f48f7bd017f4e5bddd10000', '8aaa82ea804d07cd0180516ff03b0008']
         const lbsList = ['8a88a9fd7f73ffcd017f968739870006','8a8486a37f48f7bd017f4e5bddd10000','8a8486a37f48f7bd017f4e5bddd10000', '8aaa82ea804d07cd0180516ff03b0008']
         return lbsList.indexOf(this.mallid) > -1
         return lbsList.indexOf(this.mallid) > -1
@@ -128,7 +132,7 @@ export default {
          // 如果是北京的ETCP 微信支付宝通用版
          // 如果是北京的ETCP 微信支付宝通用版
         //  if (this.isQHKC()) {
         //  if (this.isQHKC()) {
             wx.miniProgram.navigateTo({
             wx.miniProgram.navigateTo({
-              url: `/pages/package-parkingFee/findCar?lotId=${encodeURIComponent(
+              url: `../package-parkingFee/findCar?lotId=${encodeURIComponent(
                 this.dataObject.parkId
                 this.dataObject.parkId
               )}&parkNo=${encodeURIComponent(
               )}&parkNo=${encodeURIComponent(
                 this.dataObject.spaceNo
                 this.dataObject.spaceNo

+ 2 - 2
src/pages/parkingFeeV2/mixins/parkingFindCarFirst.js

@@ -345,7 +345,7 @@ export default {
     //     return
     //     return
     //   }
     //   }
       // 查询车辆优惠资格并提示跳转页面
       // 查询车辆优惠资格并提示跳转页面
-      await this.checkEligibility()
+    //   await this.checkEligibility()
     },
     },
     // 去反向寻车详情
     // 去反向寻车详情
     async toParkingFeeDetail(vehicleNumber = this.vehicleNumber) {
     async toParkingFeeDetail(vehicleNumber = this.vehicleNumber) {
@@ -359,7 +359,7 @@ export default {
             this.$nextTick(() => {
             this.$nextTick(() => {
                 const query = {
                 const query = {
                     ...this.$route.query,
                     ...this.$route.query,
-                    vehicleNo: vehicleNumber,
+                    ...res.data
                   }
                   }
                   // fromPage && format && unlicensed
                   // fromPage && format && unlicensed
                   query.fromPage = ''
                   query.fromPage = ''

+ 3 - 3
src/pages/parkingFeeV2/parkingFindCar.vue

@@ -4,13 +4,13 @@
 
 
     <img :src="`${dataObject.carImage}`" style="width:100%;height:544px;" />
     <img :src="`${dataObject.carImage}`" style="width:100%;height:544px;" />
     <div class="positionFixed">
     <div class="positionFixed">
-        <span class="carNum">{{dataObject.vehicleNo}}</span>
+        <span class="carNum">{{getCarNum(dataObject.vehicleNo)}}</span>
         <div class="borderOnePx"></div>
         <div class="borderOnePx"></div>
         <div class="textFloor">
         <div class="textFloor">
-            <label>所在楼层:</label><span>{{dataObject.floorName}}</span>
+            <label>所在楼层:</label><span>{{dataObject.area}}</span>
         </div>
         </div>
         <div class="textFloor">
         <div class="textFloor">
-            <label>车位地点:</label><span>{{dataObject.area}}</span>
+            <label>车位地点:</label><span>{{dataObject.floorName}}</span>
         </div>
         </div>
         <div class="textFloor">
         <div class="textFloor">
             <label>车位地址:</label><span>{{dataObject.spaceNo}}</span>
             <label>车位地址:</label><span>{{dataObject.spaceNo}}</span>

+ 27 - 4
src/store/index.js

@@ -9,7 +9,7 @@ import order from './order/index';
 import invoice from './invoice';
 import invoice from './invoice';
 import { lbsDictionary } from '@/common/js/BaseDictionary';
 import { lbsDictionary } from '@/common/js/BaseDictionary';
 import { updateUnionId } from '@/api/parking/index'
 import { updateUnionId } from '@/api/parking/index'
-import {backLbsHome, getGroupIdAndMallIdByLsbId} from '@/utils';
+import {backLbsHome, getGroupIdAndMallIdByLsbId, toLogin} from '@/utils';
 // import { parkingLots } from '@/utils/api-crm-ms';
 // import { parkingLots } from '@/utils/api-crm-ms';
 
 
 Vue.use(Vuex);
 Vue.use(Vuex);
@@ -342,26 +342,37 @@ const store = new Vuex.Store({
         commit('SET_CUST_TYPE_ID', custTypeId);
         commit('SET_CUST_TYPE_ID', custTypeId);
         commit('SET_GROUP_ID', groupId);
         commit('SET_GROUP_ID', groupId);
         commit('SET_MALL_ID', mallId);
         commit('SET_MALL_ID', mallId);
-        commit('SET_OPENID', openId || uni.getStorageSync('openid'));
         commit('SET_ACCESS_TOKEN', accessToken);
         commit('SET_ACCESS_TOKEN', accessToken);
         commit('SET_KIP_USER_ID', kipUserId);
         commit('SET_KIP_USER_ID', kipUserId);
         commit('SET_MOBILE', mobile);
         commit('SET_MOBILE', mobile);
         if (unionId) {
         if (unionId) {
           commit('SET_SOURCE_ID', unionId);
           commit('SET_SOURCE_ID', unionId);
         }
         }
+        if (openId) {
+          commit('SET_OPENID', openId);
+        }
         if(isLogin) {
         if(isLogin) {
           commit('SET_IS_LOGIN', isLogin);
           commit('SET_IS_LOGIN', isLogin);
         }
         }
+        if(!unionId || unionId ==='undefined') {
+          toLogin()
+          return
+        }
+        // 已经登录
         if(isLogin === 'haveLoggedIn') {
         if(isLogin === 'haveLoggedIn') {
+          // 如果 openId,为空或者是 undefined ,重新获取 openId
+          if(!openId || openId ==='undefined') {
+            dispatch('getOpenId')
+          }
           dispatch('memberInit', {
           dispatch('memberInit', {
-            openid: openId || uni.getStorageSync('openid'),
+            openid: openId,
             unionId,
             unionId,
             isError: true
             isError: true
           });
           });
         } else {
         } else {
           dispatch('updateUnionIdActive', {
           dispatch('updateUnionIdActive', {
             unionId: unionId,
             unionId: unionId,
-            openId: openId || uni.getStorageSync('openid')
+            openId: openId
           })
           })
         }
         }
         callback && callback();
         callback && callback();
@@ -402,6 +413,18 @@ const store = new Vuex.Store({
       const member = uni.getStorageSync('member')
       const member = uni.getStorageSync('member')
       return JSON.stringify(member) === '{}'
       return JSON.stringify(member) === '{}'
     },
     },
+    async getOpenId({commit}, callback) {
+      try {
+        const res = await kipGetUserDetail()
+        console.log('416 kipGetUserDetail ', res);
+        openId = res.data.openId
+        commit('SET_OPENID', res.data.openId)
+        callback(res.data.openId)
+      } catch (err) {
+        toLogin()
+        return
+      }
+    },
     // updateUnionId
     // updateUnionId
     async updateUnionIdActive({ commit }, { openId, unionId, vipCode = null }) {
     async updateUnionIdActive({ commit }, { openId, unionId, vipCode = null }) {
       try {
       try {

+ 12 - 0
src/store/order/paperCoupon.js

@@ -33,6 +33,18 @@ export default {
       newOldDiscountSwitch = true
       newOldDiscountSwitch = true
       method = getPaperCouponDescription
       method = getPaperCouponDescription
     }
     }
+    if(checkOutResponse?.discountInfo?.paperCoupons?.length) {
+      const paperCouponsList = []
+      checkOutResponse.discountInfo.paperCoupons.forEach(elm => {
+        if(elm.couponCode && elm.discountFee) {
+          paperCouponsList.push(elm)
+        }
+      })
+      if(paperCouponsList.length) {
+        commit('setPaperCoupons', paperCouponsList)
+        dispatch('setDiscountFee')
+      }
+    }
     const res = await method({
     const res = await method({
       groupId: groupId,
       groupId: groupId,
       mallId: mallId,
       mallId: mallId,

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

@@ -133,7 +133,7 @@ export default {
     }
     }
     // if ( parkMallCode === 5 && state.unlimitUsePoints === 'LIMIT' ) {
     // if ( parkMallCode === 5 && state.unlimitUsePoints === 'LIMIT' ) {
     if ( [ 5, 10 ].indexOf(parkMallCode) > -1 && !state.unLimitWeekendPoints ) {
     if ( [ 5, 10 ].indexOf(parkMallCode) > -1 && !state.unLimitWeekendPoints ) {
-      if ( type === 'add' && (state.pointsTime >= maxPointsTime || state.usingTotalDiscount >= state.availableDiscountFee) ) {
+      if ( type === 'add' && (state.pointsTime >= maxPointsTime || state.usingTotalDiscount - state.paperDiscountFee >= state.availableDiscountFee) ) {
         // 以下是深圳积分上限规则
         // 以下是深圳积分上限规则
         // 超出抵扣上限,每日最高可抵扣${this.parkFee.parkInfoEntity.maxOneDayHour}元 '优惠金额' >= '每日最高可抵扣'
         // 超出抵扣上限,每日最高可抵扣${this.parkFee.parkInfoEntity.maxOneDayHour}元 '优惠金额' >= '每日最高可抵扣'
         // if ( state.usingTotalDiscount >= state.availableDiscountFee && !msg ) {
         // if ( state.usingTotalDiscount >= state.availableDiscountFee && !msg ) {
@@ -153,7 +153,7 @@ export default {
       // 当前使用优惠 state.usingTotalDiscount
       // 当前使用优惠 state.usingTotalDiscount
       // 判断符合上限
       // 判断符合上限
       // 浦东积分上限判断
       // 浦东积分上限判断
-      if ( parkMallCode === 1 && state.usingTotalDiscount >= maxOneDayDiscountFee ) {
+      if ( parkMallCode === 1 && state.usingTotalDiscount - state.paperDiscountFee >= maxOneDayDiscountFee ) {
         msg = `超出抵扣上限,每次最高可抵扣${ maxOneDayDiscountFee }元`
         msg = `超出抵扣上限,每次最高可抵扣${ maxOneDayDiscountFee }元`
       }
       }
     }
     }
@@ -165,7 +165,7 @@ export default {
       // 当前使用优惠 state.usingTotalDiscount
       // 当前使用优惠 state.usingTotalDiscount
       // 判断符合上限
       // 判断符合上限
       // 浦东积分上限判断: 减去纸质优惠券的金额
       // 浦东积分上限判断: 减去纸质优惠券的金额
-      if ( parkMallCode === 1 && state.usingTotalDiscount >= maxOneTimeDiscountFee) {
+      if ( parkMallCode === 1 && state.usingTotalDiscount - state.paperDiscountFee >= maxOneTimeDiscountFee) {
         msg = `超出抵扣上限,每次最高可抵扣${ maxOneTimeDiscountTime }小时`
         msg = `超出抵扣上限,每次最高可抵扣${ maxOneTimeDiscountTime }小时`
       }
       }
     }
     }

+ 8 - 1
src/styles/common.less

@@ -114,6 +114,13 @@ button {
   padding: 25px 42px;
   padding: 25px 42px;
   min-height: inherit;
   min-height: inherit;
   background-color: @toast-background-color;
   background-color: @toast-background-color;
+  width: auto;
+  &.white-space  {
+    .van-toast__text{
+      white-space: nowrap;
+    }  
+  }
+  // max-width: 90%;
   .van-toast__text {
   .van-toast__text {
     font-family: 'PingFang SC';
     font-family: 'PingFang SC';
     font-style: normal;
     font-style: normal;
@@ -121,7 +128,7 @@ button {
     font-size: 28px;
     font-size: 28px;
     margin-top: 0;
     margin-top: 0;
     color: #FFFFFF;
     color: #FFFFFF;
-  }
+      }
   top: 300PX;
   top: 300PX;
   &.width65{
   &.width65{
     width: 65%;
     width: 65%;

+ 11 - 0
src/utils/common/function.js

@@ -33,4 +33,15 @@ export function waitByTime(settime = 100) {
       resolve()
       resolve()
     }, settime)
     }, settime)
   })
   })
+}
+
+// 判读是否为空
+export function isEmpty(obj, key) {
+  if(!obj.hasOwnProperty(key)){
+    return true
+  }
+  if(obj.hasOwnProperty(key) && (obj[key] === '' || obj[key] === 'undefined' || !obj[key])){
+    return true
+  }
+  return false
 }
 }

+ 8 - 8
src/utils/index.js

@@ -183,14 +183,14 @@ export function initEnv() {
   const origin = window.location.origin;
   const origin = window.location.origin;
   console.log('当前页面的url地址  ',origin);
   console.log('当前页面的url地址  ',origin);
   if ( origin.indexOf('https://dev-') > -1  || origin.indexOf('http://127.0.0.1') > -1 || origin.indexOf('http://localhost:') > -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';
-    // window.api = 'qaApi';
-    window.env = 'dev';
-    window.profileApi = 'https://dev-gateway-kip.kerryonvip.com/api';
-    window.cmrApi = 'https://dev-crm.kerryplus.com/xcrm-api/api';
-    window.api = 'devApi';
+    window.env = 'qa';
+    window.profileApi = 'https://qa-apim.kerryplus.com/c/api';
+    window.cmrApi = 'https://qa-crm.kerryplus.com/xcrm-api/api';
+    window.api = 'qaApi';
+    // window.env = 'dev';
+    // window.profileApi = 'https://dev-gateway-kip.kerryonvip.com/api';
+    // window.cmrApi = 'https://dev-crm.kerryplus.com/xcrm-api/api';
+    // window.api = 'devApi';
     // window.env = 'prod';
     // window.env = 'prod';
     // window.profileApi = 'https://sl-apim.kerryplus.com/c/api';
     // window.profileApi = 'https://sl-apim.kerryplus.com/c/api';
     // window.cmrApi = 'https://sl-crm.kerryplus.com/xcrm-api/api';
     // window.cmrApi = 'https://sl-crm.kerryplus.com/xcrm-api/api';

+ 2 - 2
src/utils/uniHooks.js

@@ -48,8 +48,8 @@ function hideLoading() {
   ToastObj.clear();
   ToastObj.clear();
 }
 }
 
 
-function showToast({ title, duration, icon }) {
-  const params = {};
+function showToast({ title, duration, icon, ...obj }) {
+  const params = {...obj};
   if (title) {
   if (title) {
     params.message = title;
     params.message = title;
   }
   }