浏览代码

style: 订单支付

John-Hong 2 年之前
父节点
当前提交
8a47659029

+ 4 - 0
nginx_parking.conf

@@ -11,6 +11,10 @@ server {
         rewrite ^.*$ /index.html last;
     }
 
+    location /qaPayment {
+        proxy_pass https://qa-apim.kerryplus.com/c/api/payment/v1;
+    }
+
 
     error_page   500 502 503 504  /50x.html;
     location = /50x.html {

+ 10 - 10
public/index.html

@@ -15,16 +15,16 @@
   <script>
     // CONFIGURATIONS_PLACEHOLDER
     
-    if (window.injectConfig) {
-      window.injectConfig = {
-        ...window.injectConfig,
-        api: 'https://qa-crm-kpl.kerryprops.com.cn/',
-        TRACKING_API_URL:
-          'https://qa-tracking-cip.kerryplus.com/sa?project=kerry_tracking',
-        profileApi: 'https://qa-apim.kerryplus.com/c/api',
-        qaPayment: 'https://qa-payment.kerryonvip.com',
-      };
-    }
+    // if (window.injectConfig) {
+    //   window.injectConfig = {
+    //     ...window.injectConfig,
+    //     api: 'https://qa-crm-kpl.kerryprops.com.cn/',
+    //     TRACKING_API_URL:
+    //       'https://qa-tracking-cip.kerryplus.com/sa?project=kerry_tracking',
+    //     profileApi: 'https://qa-apim.kerryplus.com/c/api',
+    //     qaPayment: 'https://qa-payment.kerryonvip.com',
+    //   };
+    // }
     
   </script>
   <script>

+ 88 - 71
src/App.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
-<!--    <div @click="send">send</div>-->
-    <router-view></router-view>
+    <!--    <div @click="send">send</div>-->
+    <router-view v-if="isInit"></router-view>
   </div>
 </template>
 <script>
@@ -16,13 +16,14 @@ import { Encrypt, Decrypt } from '@/utils/crypto';
 import CacheTool from '@/utils/cache-tool';
 import uni from '@/utils/uniHooks';
 import { mapState } from 'vuex';
-import {initWxJsSdkConfig} from '@/utils/login.js';
+import { initWxJsSdkConfig } from '@/utils/login.js';
 
 export default {
   data() {
     return {
       ws: null,
       msg: '',
+      isInit: false,
       stompClient: null,
       host: 'https://dev-crm-kpl.kerryprops.com.cn/xcrm-api',
       token: '1234',
@@ -31,6 +32,11 @@ export default {
   created() {
     this.init();
   },
+  mounted() {
+    // if(!this.isInit) {
+    //   this.init();
+    // }
+  },
   computed: {
     disabledBtn() {
       return this.numArr.findIndex((val) => !val) !== -1;
@@ -45,40 +51,44 @@ export default {
   },
   methods: {
     async init() {
-      // console.log(33333333)
+      if (this.isInit) return
+      this.isInit = false;
       // initWxJsSdkConfig(['chooseImage', 'uploadImage']);
       // return
       // 当前页面是否是
       const token = uni.getStorageSync('kipAccessToken')
       console.log(!isMini() && !token, 35)
-      if(!isMini() && !token && false) {
+      if (!isMini() && !token && false) {
         this.$router.push({
           path: '/login'
         })
         return
       }
+      // 初始化环境变量
       CacheTool.init()
-      console.log(484848);
       if (window.location.href.search(/pageId=|token=/g) < 0) {
         return;
       }
-      window.token = window.location.href.replace(
-        /.*token=([0-9A-Za-z]*).*/g,
-        '$1'
-      );
+      console.log(77777777777, this.$route.query);
+      // window.token = window.location.href.replace(
+      //   /.*token=([0-9A-Za-z]*).*/g,
+      //   '$1'
+      // );
+      window.token = this.$route.query.token
       console.log(55);
       // this.getTicket()
       this.wss(() => {
-        console.log(565656);
         this.$store.dispatch('baseInit', {
           pageId: window.location.href.replace(/.*pageId=([0-9A-Z]*).*/g, '$1'),
           // callback: this.wss,
           callback: () => {
+            console.log(838383, this.isInit);
+            this.isInit = true
             // 当所有的数据都初始化之后再次执行
             this.getTicket()
           },
         });
-        
+
       });
     },
     send() {
@@ -97,19 +107,25 @@ export default {
       );
     },
     wss(callback) {
-      const socket = new SockJS(
-        this.host + '/hafengWebsocket' + '?token=' + window.token
-      );
-      window.stompClient = Stomp.over(socket);
-      window.stompClient.debug = null;
-      const self = this;
-      this.windowSendInit();
-      window.stompClient.connect({}, (frame) => {
-        callback && callback();
-        window.subscribe('projectId', (options) => {
-          self.$store.commit('SET_PROJECT_ID', options.projectId);
+      try {
+        console.log(107107, this.host + '/hafengWebsocket' + '?token=' + window.token);
+        const socket = new SockJS(
+          this.host + '/hafengWebsocket' + '?token=' + window.token
+        );
+        window.stompClient = Stomp.over(socket);
+        window.stompClient.debug = null;
+        const self = this;
+        this.windowSendInit();
+        window.stompClient.connect({}, (frame) => {
+          callback && callback();
+          window.subscribe('projectId', (options) => {
+            self.$store.commit('SET_PROJECT_ID', options.projectId);
+          });
         });
-      });
+      } catch (err) {
+        console.log(err);
+        callback && callback();
+      }
     },
     disconnect() {
       if (window.stompClient != null) {
@@ -119,7 +135,7 @@ export default {
     windowSendInit() {
       // uni.showToast({title: '哈哈哈哈'})
       // return
-      window.toWXSendMsg = function ({ type = '', funcName = '',options = {} }) {
+      window.toWXSendMsg = function ({ type = '', funcName = '', options = {} }) {
         /**
          * 向小程序端发送消息
          */
@@ -189,54 +205,55 @@ export default {
     // h5获取配置---公众号支付
     getTicket() {
       console.log(173);
-        let self = this
-        var datas = {
-          groupId: this.groupId,
-          mallid: this.mallId,
-          url: window.location.href.split("#")[0]
-        }
-        self.$md(datas)
-        console.log(199, datas);
-        uni.request({
-          url: self.$baseURL + "api/1.0/login/getTicket",
-          method: 'POST',
-          data: datas,
-          header: JSON.parse(uni.getStorageSync('handleUser')),
-          success: (res) => {
-            console.log(206, res);
-            if (res.data.code == 0) {
-              self.$wx.config({
-                debug: false, // 开启调试模式
-                appId: res.data.data.appId, // 必填,公众号的唯一标识
-                timestamp: res.data.data.timestamp, // 必填,生成签名的时间戳
-                nonceStr: res.data.data.nonceStr, // 必填,生成签名的随机串
-                signature: res.data.data.signature, // 必填,签名
-                jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表
-              });
-              self.$wx.ready(function() {
-                self.$wx.checkJsApi({
-                  jsApiList: ['chooseWXPay'],
-                  success: res => {
-                    console.log('checked api:', res)
-                  },
-                  fail: err => {
-                    console.log('check api fail:', err)
-                  }
-                })
-              });
-              self.$wx.error(function(res) {
-                console.log('err', res)
-              });
-            } else {
-              uni.showToast({
-                title: res.data.msg,
-                duration: 2000,
-                icon: 'none'
+      let self = this
+      var datas = {
+        groupId: this.groupId,
+        mallid: this.mallId,
+        url: window.location.href.split("#")[0]
+      }
+      self.$md(datas)
+      console.log(199, datas);
+      uni.request({
+        // url: self.$baseURL + "api/1.0/login/getTicket",
+        // url: 'https://qa-crm-kpl.kerryprops.com.cn/xcrm-api/' + "api/1.0/login/getTicket",
+        method: 'POST',
+        data: datas,
+        header: JSON.parse(uni.getStorageSync('handleUser')),
+        success: (res) => {
+          console.log(206, res);
+          if (res.data.code == 0) {
+            self.$wx.config({
+              debug: false, // 开启调试模式
+              appId: res.data.data.appId, // 必填,公众号的唯一标识
+              timestamp: res.data.data.timestamp, // 必填,生成签名的时间戳
+              nonceStr: res.data.data.nonceStr, // 必填,生成签名的随机串
+              signature: res.data.data.signature, // 必填,签名
+              jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表
+            });
+            self.$wx.ready(function () {
+              self.$wx.checkJsApi({
+                jsApiList: ['chooseWXPay'],
+                success: res => {
+                  console.log('checked api:', res)
+                },
+                fail: err => {
+                  console.log('check api fail:', err)
+                }
               })
-            }
+            });
+            self.$wx.error(function (res) {
+              console.log('err', res)
+            });
+          } else {
+            uni.showToast({
+              title: res.data.msg,
+              duration: 2000,
+              icon: 'none'
+            })
           }
-        });
-      },
+        }
+      });
+    },
   },
 };
 </script>

+ 1 - 1
src/constants.js

@@ -3,7 +3,7 @@
 // 嘉里link:CRM小程序
 // const APPID = 'wxd830fe4d1e04988e'
 // console.log('uni:::::', uni)
-const APPID = 'wx2a1741f02f7bb650' // uni.getAccountInfoSync().miniProgram.appId;
+const APPID = 'wxd830fe4d1e04988e' // uni.getAccountInfoSync().miniProgram.appId;
 // const APPID = 'wx2a1741f02f7bb650';
 
 const APPID_MAP = {

+ 2 - 2
src/main.js

@@ -6,7 +6,7 @@ import App from './App';
 import sensors from 'sa-sdk-javascript';
 import store from './store/index.js';
 import VueRouter from 'vue-router';
-import { Icon, Checkbox, CheckboxGroup, RadioGroup, Radio, Field } from 'vant';
+import { Icon, Checkbox, CheckboxGroup, RadioGroup, Radio, Field, Popup, CountDown } from 'vant';
 import router from './routes/index.js';
 import wx from '@/utils/js_sdk/weixin';
 
@@ -34,7 +34,7 @@ Vue.prototype.$sensors = sensors;
 Vue.config.productionTip = false;
 App.mpType = 'app';
 Vue.use(VueRouter);
-Vue.use(Icon).use(Checkbox).use(CheckboxGroup).use(RadioGroup).use(Radio).use(Field);
+Vue.use(Icon).use(Checkbox).use(CheckboxGroup).use(RadioGroup).use(Radio).use(Field).use(Popup).use(CountDown);
 
 const app = new Vue({
   store,

+ 6 - 9
src/pages/parkingFee/parkingFee.vue

@@ -1,8 +1,5 @@
 <template>
-  <!-- scroll-view -->
   <div style="background-color: #f4f7ff" scroll-y="true">
-    <!--    <authorize ref="authorize"></authorize>-->
-    <!--    <div v-if="userInfo && userInfo.vipcode">vipcode: {{userInfo.vipcode}}</div>-->
     <scroll-view class="wrap-box">
       <div class="parkingFee" ref="parkingFee">
         <div class="parkingFee-top bg">
@@ -13,19 +10,19 @@
           }" v-if="custTypeId >= 0">
             <div class="menu_item" @click="doRouter">
               <img :src="
-                require(`./static/images/icon2${colorAry[custTypeId]}.png`)
+                require(`./static/images/icon-order.png`)
               " />
               <span>缴费记录</span>
             </div>
             <div class="menu_item" @click="doRouter1">
               <img :src="
-                require(`./static/images/icon4${colorAry[custTypeId]}.png`)
+                require(`./static/images/icon-ticket.png`)
               " />
               <span>停车开票</span>
             </div>
             <div class="menu_item" @click="doRouter2">
               <img :src="
-                require(`./static/images/icon1${colorAry[custTypeId]}.png`)
+                require(`./static/images/icon-car.png`)
               " />
               <span>车辆管理</span>
             </div>
@@ -96,7 +93,6 @@
           <div class="vehicleMgt-list">
             <div class="vehicleMgt-title">
               <div>历史车辆</div>
-              <!-- <img src="static/images/icon5.png" class="vehicleMgt-title-img"/> -->
             </div>
             <div class="vehicleMgt-content" v-if="carList.length">
               <div class="item" v-for="(item, index) in carList" :key="index" @click="toHandleSearch(item)"
@@ -339,6 +335,7 @@ export default {
         openid: openid,
         // vipcode: app.globalData.member.vipcode
       };
+      console.log(342, params);
       this.$md(params);
       this.$request({
         url: this.$baseURL + 'api/1.0/park/parkInfo',
@@ -878,7 +875,7 @@ page {
             flex: 1;
             border: 1px solid rgba(206, 208, 210, 1);
             box-sizing: border-box;
-            margin: 0 2px;
+            margin: 0 18px;
             font-size: 50px;
             display: flex;
             align-items: center;
@@ -970,7 +967,7 @@ page {
           }
 
           .vehicleMgt-content_cls {
-            color: #f4f7ff;
+            // color: #f4f7ff;
             border: 2px solid #064c8a;
           }
 

文件差异内容过多而无法显示
+ 385 - 369
src/pages/parkingFee/parkingFeeDetail.vue


+ 499 - 465
src/pages/parkingFee/parkingFeeDiscounts.vue

@@ -1,115 +1,129 @@
 <template>
-	<scroll-view scroll-y="true" class="scroll-Y">
-		<checkbox-group @change="checkboxChange">
-		<div class="container" v-if="false"><!--todo: 杭州首停不显示暂时根据groupId写死-->
-			<div class="item">
-				<div class="title">首停优惠</div>
-				<div class="content">首停减免{{parkInfoEntity.parkHour}}小时。可优惠{{firstParkDiscountFee}}元</div>
-			</div>
-			<checkbox value="firstPark" color="#fff" :checked="isCheck('firstPark')" />
-		</div>
-		<div class="container" v-if="parkInfoEntity.memberLevelReduce">
-			<div class="item">
-				<div class="title">会员等级减免</div>
-				<div class="content">{{memberDiscount.memberOrderdesc || ''}}减免{{memberDiscount.reduceContent || 0}}小时。可优惠{{memberDiscountFee || 0}}元</div>
-			</div>
-			<checkbox value="member" color="#fff" :disabled="(!isCheck('member') && isDiscountDisabled) || isMemberDiscountDisabled || memberDiscount.reduceContent <= 0" :checked="isCheck('member')" />
-			<div class="member-discount-info" v-if="isMemberDiscountDisabled">当日已使用</div>
-		</div>
-		<div class="container" v-if="isShowReduceDiscount">
-			<div class="item">
-				<div class="title">消费减免</div>
-				<!-- <uni-view class="content" v-if="parkInfoEntity.parkMallCode === 1 && parkInfoEntity.expirationDate">{{reduceDiscountMessage}}</uni-view> -->
-				<div class="content" v-if="parkInfoEntity.parkMallCode !== 1">{{todayReduceDiscountMessage}}</div>
-				<uni-number-box v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0" :min="1" :max="maxReduceDiscount" v-model="reduceHours" @input="reducesChange"></uni-number-box>
-			</div>
-			<checkbox value="reduces" color="#fff" :disabled="(!isCheck('reduces') && isDiscountDisabled) || !reducesDiscount.recuceContent" :checked="isCheck('reduces')" />
-		</div>
-		<div class="flewx">
-			<div class="flewx-content">应付<span style="color: red;font-size: 32px;padding-left: 20px;">{{actualFee | currency}}</span> 元 <span style="color: #8d8d8d;padding-left: 30px;font-size: 28px;">已优惠{{discountFee | currency}}元</span></div>
-			<div :class="{'flewx_index3': true, 'blue_flewx_index3': custTypeId === 1, 'green_flewx_index3': custTypeId === 2, 'btn-disabled': !parkInfo.servicefee}" @click="confirm">确定</div>
-		</div>
-		</checkbox-group>
-	</scroll-view>
+  <scroll-view scroll-y="true" class="scroll-Y">
+    <van-checkbox-group v-model="active" checked-color="#064C8A" @change="checkboxChange">
+      <div class="container" v-if="false">
+        <!--todo: 杭州首停不显示暂时根据groupId写死-->
+        <div class="item">
+          <div class="title">首停优惠</div>
+          <div class="content">首停减免{{parkInfoEntity.parkHour}}小时。可优惠{{firstParkDiscountFee}}元</div>
+        </div>
+        <van-checkbox value="firstPark" color="#fff" :checked="isCheck('firstPark')" />
+      </div>
+      <div class="container" v-if="parkInfoEntity.memberLevelReduce">
+        <div class="item">
+          <div class="title">会员等级减免</div>
+          <div class="content">{{memberDiscount.memberOrderdesc || ''}}减免{{memberDiscount.reduceContent ||
+          0}}小时。可优惠{{memberDiscountFee || 0}}元</div>
+        </div>
+        <van-checkbox value="member" color="#fff"
+        name="a"
+          :disabled="(!isCheck('member') && isDiscountDisabled) || isMemberDiscountDisabled || memberDiscount.reduceContent <= 0"
+          :checked="isCheck('member')" />
+        <div class="member-discount-info" v-if="isMemberDiscountDisabled">当日已使用</div>
+      </div>
+      <div class="container" v-if="isShowReduceDiscount">
+        <div class="item">
+          <div class="title">消费减免</div>
+          <!-- <uni-view class="content" v-if="parkInfoEntity.parkMallCode === 1 && parkInfoEntity.expirationDate">{{reduceDiscountMessage}}</uni-view> -->
+          <div class="content" v-if="parkInfoEntity.parkMallCode !== 1">{{todayReduceDiscountMessage}}</div>
+          <uni-number-box v-if="parkInfoEntity.isSplit === 0 && maxReduceDiscount > 0" :min="1" :max="maxReduceDiscount"
+            v-model="reduceHours" @input="reducesChange"></uni-number-box>
+        </div>
+        <van-checkbox value="reduces" color="#fff"
+          :disabled="(!isCheck('reduces') && isDiscountDisabled) || !reducesDiscount.recuceContent"
+          :checked="isCheck('reduces')" />
+      </div>
+      <div class="flewx">
+        <div class="flewx-content">合计<span style="color: #333;font-weight: 600; font-size: 36px;padding-left: 0px;">{{actualFee |
+        currency}}</span> 元 <span style="color: #999;padding-left: 0px;font-size: 28px;">已优惠{{discountFee |
+            currency}}元</span>
+        </div>
+        <div
+          class="flewx_index3"
+          @click="confirm">确定</div>
+      </div>
+    </van-checkbox-group>
+  </scroll-view>
 </template>
 
 <script>
 import { mapState } from 'vuex';
 import uniNumberBox from '@/components/uni-number-box/uni-number-box.vue';
+import uni from '@/utils/uniHooks';
 // const app = getApp()
- const app = {};
+const app = {};
 export default {
-	components: { uniNumberBox },
-	created() {
-		// 纸质优惠券
-		if (uni.getStorageSync('paperCouponInfo')) {
-			this.paperCouponFee = uni.getStorageSync('paperCouponInfo').paperDiscountFee || 0;
-		}
-		// 电子券
-		if (uni.getStorageSync('couponInfo')) {
-			this.couponFee = uni.getStorageSync('couponInfo').couponfee || 0;
-		}
-		this.servicefee = uni.getStorageSync('servicefee'); // 应缴金额
-		this.parkDiscountTotal = uni.getStorageSync('parkingTotal'); // 总停车优惠
-		// 重置优惠 防止二次叠加
-		this.discountTotal = uni.getStorageSync('discountTotal');
-		if (this.discountTotal) {
-			this.parkDiscountTotal.feeCopy -= this.discountTotal.fee;
-		}
-
-		this.parkFee = JSON.parse(uni.getStorageSync('parkFee'));
+  components: { uniNumberBox },
+  created() {
+    // 纸质优惠券
+    if (uni.getStorageSync('paperCouponInfo')) {
+      this.paperCouponFee = uni.getStorageSync('paperCouponInfo').paperDiscountFee || 0;
+    }
+    // 电子券
+    if (uni.getStorageSync('couponInfo')) {
+      this.couponFee = uni.getStorageSync('couponInfo').couponfee || 0;
+    }
+    this.servicefee = uni.getStorageSync('servicefee'); // 应缴金额
+    this.parkDiscountTotal = uni.getStorageSync('parkingTotal'); // 总停车优惠
+    // 重置优惠 防止二次叠加
+    this.discountTotal = uni.getStorageSync('discountTotal');
+    if (this.discountTotal) {
+      this.parkDiscountTotal.feeCopy -= this.discountTotal.fee;
+    }
+
+    this.parkFee = JSON.parse(uni.getStorageSync('parkFee'));
     console.log(616161, this.parkFee)
-		this.parkInfoEntity = this.parkFee.parkInfoEntity;
-		this.parkInfoEntity.useReduceTime = this.parkInfoEntity.useReduceTime ? this.parkInfoEntity.useReduceTime : 0; // 已用优惠时长
-		this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.remainReduceTime > 0 ? this.parkInfoEntity.remainReduceTime : 0; // 剩余可用优惠时长
-		this.parkMallCode = this.parkInfoEntity.parkMallCode;
-		// 浦东每次上限处理
-		if (this.parkMallCode === 1 && this.parkInfoEntity.remainReduceTime > this.parkInfoEntity.maxonetimediscount) {
-			this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxonetimediscount;
-		}
-
-		// 沈阳上限处理
-		if (this.parkMallCode === 4) {
-			this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
-			if (this.couponFee) {
-				this.parkInfoEntity.remainReduceTime -= this.couponFee / this.parkInfoEntity.needmoney;
-			}
-		}
-
-		// 上限金额
-		this.maxonetimediscountFee = this.parkInfoEntity.maxonetimediscount * this.parkInfoEntity.needmoney;
-		this.maxonedaydiscountFee = (this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) * this.parkInfoEntity.needmoney || 0;
-		if (this.maxonedaydiscountFee < 0) {
-			this.maxonedaydiscountFee = 0;
-		}
-
-		// 会员优惠
-		if (this.parkFee.parkMemberOrderReducesEntityList && this.parkFee.parkMemberOrderReducesEntityList[0]) {
-			this.memberDiscount = this.parkFee.parkMemberOrderReducesEntityList[0];
-		}
-
-		// 消费减免
-		if (this.parkFee.parkConsumeReducesEntityList && this.parkFee.parkConsumeReducesEntityList.length) {
-			this.reducesDiscount = this.parkFee.parkConsumeReducesEntityList[0];
-		} else {
-			this.reducesDiscount = {consumerLimit: 0, recuceContent: 0};
-		}
-
-		// 消费减免可拆分上限
-		this.maxReduceDiscount = this.reducesDiscount.recuceContent;
-		if (this.maxReduceDiscount > this.parkInfoEntity.remainReduceTime) {
-			this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime;
-		}
-		this.reduceHours = this.maxReduceDiscount;
-
-		// 反显处理
-		if(this.discountTotal.consumeFee) {
-			this.reduceHours = (this.discountTotal.consumeFee / this.parkInfoEntity.needmoney) || 0;
-		}
-		const checkedList = uni.getStorageSync('checkedList');
-		if (checkedList && checkedList.length) {
-			this.checkedList = checkedList;
-		}/* else {
+    this.parkInfoEntity = this.parkFee.parkInfoEntity;
+    this.parkInfoEntity.useReduceTime = this.parkInfoEntity.useReduceTime ? this.parkInfoEntity.useReduceTime : 0; // 已用优惠时长
+    this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.remainReduceTime > 0 ? this.parkInfoEntity.remainReduceTime : 0; // 剩余可用优惠时长
+    this.parkMallCode = this.parkInfoEntity.parkMallCode;
+    // 浦东每次上限处理
+    if (this.parkMallCode === 1 && this.parkInfoEntity.remainReduceTime > this.parkInfoEntity.maxonetimediscount) {
+      this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxonetimediscount;
+    }
+
+    // 沈阳上限处理
+    if (this.parkMallCode === 4) {
+      this.parkInfoEntity.remainReduceTime = this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour;
+      if (this.couponFee) {
+        this.parkInfoEntity.remainReduceTime -= this.couponFee / this.parkInfoEntity.needmoney;
+      }
+    }
+
+    // 上限金额
+    this.maxonetimediscountFee = this.parkInfoEntity.maxonetimediscount * this.parkInfoEntity.needmoney;
+    this.maxonedaydiscountFee = (this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) * this.parkInfoEntity.needmoney || 0;
+    if (this.maxonedaydiscountFee < 0) {
+      this.maxonedaydiscountFee = 0;
+    }
+
+    // 会员优惠
+    if (this.parkFee.parkMemberOrderReducesEntityList && this.parkFee.parkMemberOrderReducesEntityList[0]) {
+      this.memberDiscount = this.parkFee.parkMemberOrderReducesEntityList[0];
+    }
+
+    // 消费减免
+    if (this.parkFee.parkConsumeReducesEntityList && this.parkFee.parkConsumeReducesEntityList.length) {
+      this.reducesDiscount = this.parkFee.parkConsumeReducesEntityList[0];
+    } else {
+      this.reducesDiscount = { consumerLimit: 0, recuceContent: 0 };
+    }
+
+    // 消费减免可拆分上限
+    this.maxReduceDiscount = this.reducesDiscount.recuceContent;
+    if (this.maxReduceDiscount > this.parkInfoEntity.remainReduceTime) {
+      this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime;
+    }
+    this.reduceHours = this.maxReduceDiscount;
+
+    // 反显处理
+    if (this.discountTotal.consumeFee) {
+      this.reduceHours = (this.discountTotal.consumeFee / this.parkInfoEntity.needmoney) || 0;
+    }
+    const checkedList = uni.getStorageSync('checkedList');
+    if (checkedList && checkedList.length) {
+      this.checkedList = checkedList;
+    }/* else {
 			if (this.memberDiscount.reduceContent > 0) {
 				// 浦东上限控制
 				if (this.parkMallCode === 1) {
@@ -130,381 +144,401 @@ export default {
 				}
 			}
 		}*/
-		// 浦东上限控制
-		if (this.parkMallCode === 1 || this.parkMallCode === 4) {
-			if (this.discountTotal.memberGradeFee) {
-				this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - (this.discountTotal.memberGradeFee / this.parkInfoEntity.needmoney);
-				if (this.parkMallCode === 4 && this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
-					this.maxReduceDiscount = this.reducesDiscount.recuceContent;
-				}
-			}
-			if (this.crossMessage()) {
-				if (this.isCheck('reduces')) {
-					this.maxReduceDiscount = this.reduceHours;
-				} else {
-					this.maxReduceDiscount = 0;
-					this.reduceHours = 0;
-				}
-			} else {
-				if (!this.isCheck('reduces')) {
-					this.reduceHours = this.maxReduceDiscount;
-				}
-			}
-		}
-
-		// 会员优惠每天只可使用一次
-		if (this.parkInfoEntity.memberLevelFlag == 1) {
-			this.isMemberDiscountDisabled = true;
-			const memberIndex = this.checkedList.indexOf('member');
-			if (memberIndex !== -1) {
-				this.checkedList.splice(memberIndex, 1);
-			}
-		}
-
-		// 超限提示
-		this.crossMessage();
-	},
-	data() {
-		return {
-			parkFee: {}, // 停车规则信息及优惠信息
-			parkInfoEntity: {}, // 停车规则信息
-			memberDiscount: {}, // 会员优惠
-			isMemberDiscountDisabled: false, // 会员等级减免是否可用(当天仅限使用一次)
-			isDiscountDisabled: false, // 浦东减免是否超限
-			reducesDiscount: {}, // 消费优惠
-			checkedList: [], // 已选优惠列表
-			firstPark: 0, // 首停减免金额
-			member: 0, // 会员优惠金额
-			reduces: 0, // 消费减免金额
-			reduceHours: 0, // 消费减免拆分时长
-			maxReduceDiscount: 0, // 消费减免规则最大优惠
-			servicefee: 0, // 应缴金额
-			parkDiscountTotal: {}, // 总停车优惠
-			discountTotal: {}, // 首停、会员、消费优惠合计
-			groupId: app.globalData.groupId,
-			maxonetimediscountFee: 0, // 每次优惠上限金额
-			maxonedaydiscountFee: 0, // 每天优惠上限金额
-			parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
-			paperCouponFee: 0, // 纸质优惠金额
-			couponFee: 0, // 电子券优惠金额
-		}
-	},
-	computed: {
-		// 是否显示消费减免
-		isShowReduceDiscount() {
-			if (this.parkInfoEntity.parkMallCode === 0 || this.parkInfoEntity.parkMallCode === 1) {
-				return this.parkInfoEntity.consumeReduce && this.reducesDiscount.consumerLimit
-			}
-			return this.parkInfoEntity.consumeReduce
-		},
-		// 首停减免金额
-		firstParkDiscountFee() {
-			return this.parkInfoEntity.parkHour * this.parkInfoEntity.needmoney;
-		},
-		// 会员减免金额
-		memberDiscountFee() {
-			return this.memberDiscount.reduceContent * this.parkInfoEntity.needmoney;
-		},
-		// 消费减免金额
-		reducesDiscountFee() {
-			return this.reduceHours * this.parkInfoEntity.needmoney;
-		},
-		// 浦东有效期内消费提示
-		reduceDiscountMessage() {
-			return this.parkInfoEntity.expirationDate + '日内消费了' + this.parkInfoEntity.totalAmont + '元,已使用' +
-				parseInt(this.parkInfoEntity.useConsumeFee / this.parkInfoEntity.needmoney) + '小时满减抵扣。';
-		},
-		// 消费减免(拆分部分)提示文本
-		reduceSplitMessage() {
-			if (this.parkInfoEntity.isSplit === 0) {
-				return `选择${this.reduceHours}小时,`;
-			}
-			return '';
-		},
-		// 当日消费提示
-		todayReduceDiscountMessage() {
-			if (this.parkInfoEntity.remainReduceTime || this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) {
-				if (this.reducesDiscount.consumerLimit) {
-					if (this.parkMallCode === 0) {
-						return `今日可减免${this.reducesDiscount.recuceContent}小时`;
-					}
-					// 沈阳提示信息
-					if (this.parkMallCode === 4) {
-						return `未达上限时今日可减免${this.reducesDiscount.recuceContent}小时`;
-					}
-					if (this.reducesDiscount.recuceContent > this.parkInfoEntity.remainReduceTime) {
-						return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。超出优惠上限,可减免${this.maxReduceDiscount}小时,${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
-					}
-					return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
-				}
-				return '消费金额未达到最低优惠要求'
-			}
-			if (this.parkInfoEntity.dateReduceUpperliLimit) {
-				return `您今日消费减免已达${this.parkInfoEntity.dateReduceUpperliLimit}小时上限`
-			}
-		},
-		// 选择优惠数量
-		checkedTotal() {
-			return this.checkedList.length;
-		},
-		// 首停、会员、消费优惠总计金额
-		totalFee() {
-			this.first = 0;
-			this.member = 0;
-			this.reduces = 0;
-			let total = 0;
-			this.checkedList.forEach(item => {
-				this[item] = this[item+'DiscountFee'];
-				total += this[item+'DiscountFee'];
-			});
-			return total;
-		},
-		// 首停、会员、消费优惠总计时长
-		totalTime() {
-			return this.totalFee / this.parkInfoEntity.needmoney;
-		},
-		// 实际支付金额
-		actualFee() {
-			const fee = this.servicefee - this.discountFee;
-			return fee > 0 ? fee : 0;
-		},
-		// 已优惠金额
-		discountFee() {
-			let total = this.parkDiscountTotal.feeCopy + this.totalFee;
-			// 超出上限按上限计算
-			if (this.parkMallCode === 1) {
-				if (total - this.paperCouponFee > this.maxonetimediscountFee) {
-					total = this.maxonetimediscountFee + this.paperCouponFee;
-				}
-			}
-			if (this.parkMallCode === 4) {
-				if (total - this.paperCouponFee - this.parkDiscountTotal.bonusfee > this.maxonedaydiscountFee) {
-					total = this.maxonedaydiscountFee + this.parkDiscountTotal.bonusfee + this.paperCouponFee;
-				}
-			}
-			return total;
-		},
-		...mapState({
-			custTypeId: state => state.custTypeId
-		})
-	},
-	methods: {
-		// 选择回调
-		checkboxChange(e) {
-			console.log('checkboxChange')
-			console.log('paperCouponFee------>', this.paperCouponFee)
-			this.checkedList = e.detail.value;
-			// 浦东上限控制
-			if (this.parkMallCode === 1) {
-				if (this.isCheck('member')) {
-					this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
-					this.reduceHours = this.maxReduceDiscount;
-				} else {
-					if (this.isCheck('reduces')) {
-						this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
-					} else {
-						this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee) / this.parkInfoEntity.needmoney);
-						this.reduceHours = this.maxReduceDiscount;
-					}
-				}
-			}
-			// 沈阳上限控制
-			if (this.parkMallCode === 4) {
-				if (this.isCheck('member')) {
-					this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - this.memberDiscount.reduceContent;
-					if (this.maxReduceDiscount < 0) {
-						this.maxReduceDiscount = 0;
-					}
-					if (this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
-						this.maxReduceDiscount = this.reducesDiscount.recuceContent;
-					}
-					this.reduceHours = this.maxReduceDiscount;
-				} else {
-					this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime;
-					if (this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
-						this.maxReduceDiscount = this.reducesDiscount.recuceContent;
-					}
-					this.reduceHours = this.maxReduceDiscount;
-				}
-			}
-			this.crossMessage();
-		},
-
-		// 是否选中
-		isCheck(val) {
-			return this.checkedList.findIndex(e => e==val) !== -1;
-		},
-
-		// 计数器回调
-		reducesChange() {
-			console.log('reducesChange')
-			if (this.isCheck('reduces')) {
-				this.crossMessage();
-			}
-		},
-
-		// 超限提示
-		crossMessage() {
-			let totalFee = this.parkDiscountTotal.feeCopy;
-			const remainReduceFee = this.parkInfoEntity.remainReduceTime * this.parkInfoEntity.needmoney;
-			// if (this.discountTotal && this.discountTotal.fee !== 0) {
-			// 	totalFee += this.totalFee - this.discountTotal.fee;
-			// } else {
-			// 	totalFee += this.totalFee;
-			// }
-			totalFee += this.totalFee;
-			// 浦东每次总优惠上限
-			this.isDiscountDisabled = false;
-			if (this.parkMallCode === 1 && totalFee - this.paperCouponFee >= this.maxonetimediscountFee) {
-				this.isDiscountDisabled = true;
-				return uni.showToast({
-					title: `超出抵扣上限,每次最高可抵扣${this.parkInfoEntity.maxonetimediscount}小时`,
-					icon: 'none'
-				});
-			}
-			// 沈阳超限处理(maxonedaydiscountFee 会员、消费、电子券减免)
-			if (this.parkMallCode === 4 && totalFee - this.paperCouponFee - this.parkDiscountTotal.bonusfee >= this.maxonedaydiscountFee) {
-				this.isDiscountDisabled = true;
-				return uni.showToast({
-					title: `(会员等级、消费、电子券)每日最高可抵扣${this.parkInfoEntity.maxOneDayHour}小时`,
-					icon: 'none'
-				});
-			}
-			// 消费每天优惠上限(非浦东、沈阳)
-			if (this.parkMallCode !== 1 && this.parkMallCode !== 4 && this.reduces > remainReduceFee) {
-				this.reduces = remainReduceFee;
-				return uni.showToast({
-					title: `超出抵扣上限,消费减免每天最高可抵扣${this.parkInfoEntity.dateReduceUpperliLimit}小时,可使用${this.parkInfoEntity.remainReduceTime}小时`,
-					icon: 'none'
-				});
-			}
-		},
-
-		// 确认
-		confirm() {
-			// 计算单价
-			const cost = this.reducesDiscount.consumerLimit / this.reducesDiscount.recuceContent;
-			// 算出消费减免在哪个档
-			let useConsumeFee = 0;
-			if (this.reduces) {
-				if (this.parkInfoEntity.isSplit === 0) {
-					useConsumeFee = this.reduceHours * cost;
-				} else {
-					useConsumeFee = this.reducesDiscount.consumerLimit;
-				}
-			}
-			uni.setStorageSync('checkedList', this.checkedList);
-			uni.setStorageSync('checkedTotal', this.checkedTotal);
-			uni.setStorageSync('discountTotal', {
-				firstParkFee: this.firstPark,
-				memberGradeFee: this.member,
-				consumeFee: this.reduces,
-				useConsumeFee: useConsumeFee,
-				time: this.totalTime,
-				fee: this.totalFee
-			});
-			this.$router.back();
-		},
-
-	}
+    // 浦东上限控制
+    if (this.parkMallCode === 1 || this.parkMallCode === 4) {
+      if (this.discountTotal.memberGradeFee) {
+        this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - (this.discountTotal.memberGradeFee / this.parkInfoEntity.needmoney);
+        if (this.parkMallCode === 4 && this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
+          this.maxReduceDiscount = this.reducesDiscount.recuceContent;
+        }
+      }
+      if (this.crossMessage()) {
+        if (this.isCheck('reduces')) {
+          this.maxReduceDiscount = this.reduceHours;
+        } else {
+          this.maxReduceDiscount = 0;
+          this.reduceHours = 0;
+        }
+      } else {
+        if (!this.isCheck('reduces')) {
+          this.reduceHours = this.maxReduceDiscount;
+        }
+      }
+    }
+
+    // 会员优惠每天只可使用一次
+    if (this.parkInfoEntity.memberLevelFlag == 1) {
+      this.isMemberDiscountDisabled = true;
+      const memberIndex = this.checkedList.indexOf('member');
+      if (memberIndex !== -1) {
+        this.checkedList.splice(memberIndex, 1);
+      }
+    }
+
+    // 超限提示
+    this.crossMessage();
+  },
+  data() {
+    return {
+      parkFee: {}, // 停车规则信息及优惠信息
+      parkInfoEntity: {}, // 停车规则信息
+      memberDiscount: {}, // 会员优惠
+      isMemberDiscountDisabled: false, // 会员等级减免是否可用(当天仅限使用一次)
+      isDiscountDisabled: false, // 浦东减免是否超限
+      reducesDiscount: {}, // 消费优惠
+      checkedList: [], // 已选优惠列表
+      firstPark: 0, // 首停减免金额
+      member: 0, // 会员优惠金额
+      reduces: 0, // 消费减免金额
+      reduceHours: 0, // 消费减免拆分时长
+      maxReduceDiscount: 0, // 消费减免规则最大优惠
+      servicefee: 0, // 应缴金额
+      parkDiscountTotal: {}, // 总停车优惠
+      discountTotal: {}, // 首停、会员、消费优惠合计
+      // groupId: app.globalData.groupId,
+      maxonetimediscountFee: 0, // 每次优惠上限金额
+      maxonedaydiscountFee: 0, // 每天优惠上限金额
+      parkMallCode: 1, // 0静安 1浦东 2杭州 3北京 4沈阳 5深圳
+      paperCouponFee: 0, // 纸质优惠金额
+      couponFee: 0, // 电子券优惠金额
+      active: 'a'
+    }
+  },
+  computed: {
+    // 是否显示消费减免
+    isShowReduceDiscount() {
+      if (this.parkInfoEntity.parkMallCode === 0 || this.parkInfoEntity.parkMallCode === 1) {
+        return this.parkInfoEntity.consumeReduce && this.reducesDiscount.consumerLimit
+      }
+      return this.parkInfoEntity.consumeReduce
+    },
+    // 首停减免金额
+    firstParkDiscountFee() {
+      return this.parkInfoEntity.parkHour * this.parkInfoEntity.needmoney;
+    },
+    // 会员减免金额
+    memberDiscountFee() {
+      return this.memberDiscount.reduceContent * this.parkInfoEntity.needmoney;
+    },
+    // 消费减免金额
+    reducesDiscountFee() {
+      return this.reduceHours * this.parkInfoEntity.needmoney;
+    },
+    // 浦东有效期内消费提示
+    reduceDiscountMessage() {
+      return this.parkInfoEntity.expirationDate + '日内消费了' + this.parkInfoEntity.totalAmont + '元,已使用' +
+        parseInt(this.parkInfoEntity.useConsumeFee / this.parkInfoEntity.needmoney) + '小时满减抵扣。';
+    },
+    // 消费减免(拆分部分)提示文本
+    reduceSplitMessage() {
+      if (this.parkInfoEntity.isSplit === 0) {
+        return `选择${this.reduceHours}小时,`;
+      }
+      return '';
+    },
+    // 当日消费提示
+    todayReduceDiscountMessage() {
+      if (this.parkInfoEntity.remainReduceTime || this.parkInfoEntity.maxOneDayHour - this.parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour) {
+        if (this.reducesDiscount.consumerLimit) {
+          if (this.parkMallCode === 0) {
+            return `今日可减免${this.reducesDiscount.recuceContent}小时`;
+          }
+          // 沈阳提示信息
+          if (this.parkMallCode === 4) {
+            return `未达上限时今日可减免${this.reducesDiscount.recuceContent}小时`;
+          }
+          if (this.reducesDiscount.recuceContent > this.parkInfoEntity.remainReduceTime) {
+            return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。超出优惠上限,可减免${this.maxReduceDiscount}小时,${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
+          }
+          return `消费已满${this.reducesDiscount.consumerLimit}元,减免${this.reducesDiscount.recuceContent}小时。${this.reduceSplitMessage}可优惠${this.reducesDiscountFee}元`
+        }
+        return '消费金额未达到最低优惠要求'
+      }
+      if (this.parkInfoEntity.dateReduceUpperliLimit) {
+        return `您今日消费减免已达${this.parkInfoEntity.dateReduceUpperliLimit}小时上限`
+      }
+    },
+    // 选择优惠数量
+    checkedTotal() {
+      return this.checkedList.length;
+    },
+    // 首停、会员、消费优惠总计金额
+    totalFee() {
+      this.first = 0;
+      this.member = 0;
+      this.reduces = 0;
+      let total = 0;
+      this.checkedList.forEach(item => {
+        this[item] = this[item + 'DiscountFee'];
+        total += this[item + 'DiscountFee'];
+      });
+      return total;
+    },
+    // 首停、会员、消费优惠总计时长
+    totalTime() {
+      return this.totalFee / this.parkInfoEntity.needmoney;
+    },
+    // 实际支付金额
+    actualFee() {
+      const fee = this.servicefee - this.discountFee;
+      return fee > 0 ? fee : 0;
+    },
+    // 已优惠金额
+    discountFee() {
+      let total = this.parkDiscountTotal.feeCopy + this.totalFee;
+      // 超出上限按上限计算
+      if (this.parkMallCode === 1) {
+        if (total - this.paperCouponFee > this.maxonetimediscountFee) {
+          total = this.maxonetimediscountFee + this.paperCouponFee;
+        }
+      }
+      if (this.parkMallCode === 4) {
+        if (total - this.paperCouponFee - this.parkDiscountTotal.bonusfee > this.maxonedaydiscountFee) {
+          total = this.maxonedaydiscountFee + this.parkDiscountTotal.bonusfee + this.paperCouponFee;
+        }
+      }
+      return total;
+    },
+    ...mapState({
+      custTypeId: state => state.custTypeId,
+      groupId: state => state.groupId,
+    })
+  },
+  methods: {
+    // 选择回调
+    checkboxChange(e) {
+      console.log('checkboxChange')
+      console.log('paperCouponFee------>', this.paperCouponFee)
+      this.checkedList = e.detail.value;
+      // 浦东上限控制
+      if (this.parkMallCode === 1) {
+        if (this.isCheck('member')) {
+          this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
+          this.reduceHours = this.maxReduceDiscount;
+        } else {
+          if (this.isCheck('reduces')) {
+            this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee - this.reduces) / this.parkInfoEntity.needmoney);
+          } else {
+            this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - ((this.discountFee - this.paperCouponFee) / this.parkInfoEntity.needmoney);
+            this.reduceHours = this.maxReduceDiscount;
+          }
+        }
+      }
+      // 沈阳上限控制
+      if (this.parkMallCode === 4) {
+        if (this.isCheck('member')) {
+          this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime - this.memberDiscount.reduceContent;
+          if (this.maxReduceDiscount < 0) {
+            this.maxReduceDiscount = 0;
+          }
+          if (this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
+            this.maxReduceDiscount = this.reducesDiscount.recuceContent;
+          }
+          this.reduceHours = this.maxReduceDiscount;
+        } else {
+          this.maxReduceDiscount = this.parkInfoEntity.remainReduceTime;
+          if (this.maxReduceDiscount > this.reducesDiscount.recuceContent) {
+            this.maxReduceDiscount = this.reducesDiscount.recuceContent;
+          }
+          this.reduceHours = this.maxReduceDiscount;
+        }
+      }
+      this.crossMessage();
+    },
+
+    // 是否选中
+    isCheck(val) {
+      return this.checkedList.findIndex(e => e == val) !== -1;
+    },
+
+    // 计数器回调
+    reducesChange() {
+      console.log('reducesChange')
+      if (this.isCheck('reduces')) {
+        this.crossMessage();
+      }
+    },
+
+    // 超限提示
+    crossMessage() {
+      let totalFee = this.parkDiscountTotal.feeCopy;
+      const remainReduceFee = this.parkInfoEntity.remainReduceTime * this.parkInfoEntity.needmoney;
+      // if (this.discountTotal && this.discountTotal.fee !== 0) {
+      // 	totalFee += this.totalFee - this.discountTotal.fee;
+      // } else {
+      // 	totalFee += this.totalFee;
+      // }
+      totalFee += this.totalFee;
+      // 浦东每次总优惠上限
+      this.isDiscountDisabled = false;
+      if (this.parkMallCode === 1 && totalFee - this.paperCouponFee >= this.maxonetimediscountFee) {
+        this.isDiscountDisabled = true;
+        return uni.showToast({
+          title: `超出抵扣上限,每次最高可抵扣${this.parkInfoEntity.maxonetimediscount}小时`,
+          icon: 'none'
+        });
+      }
+      // 沈阳超限处理(maxonedaydiscountFee 会员、消费、电子券减免)
+      if (this.parkMallCode === 4 && totalFee - this.paperCouponFee - this.parkDiscountTotal.bonusfee >= this.maxonedaydiscountFee) {
+        this.isDiscountDisabled = true;
+        return uni.showToast({
+          title: `(会员等级、消费、电子券)每日最高可抵扣${this.parkInfoEntity.maxOneDayHour}小时`,
+          icon: 'none'
+        });
+      }
+      // 消费每天优惠上限(非浦东、沈阳)
+      if (this.parkMallCode !== 1 && this.parkMallCode !== 4 && this.reduces > remainReduceFee) {
+        this.reduces = remainReduceFee;
+        return uni.showToast({
+          title: `超出抵扣上限,消费减免每天最高可抵扣${this.parkInfoEntity.dateReduceUpperliLimit}小时,可使用${this.parkInfoEntity.remainReduceTime}小时`,
+          icon: 'none'
+        });
+      }
+    },
+
+    // 确认
+    confirm() {
+      // 计算单价
+      const cost = this.reducesDiscount.consumerLimit / this.reducesDiscount.recuceContent;
+      // 算出消费减免在哪个档
+      let useConsumeFee = 0;
+      if (this.reduces) {
+        if (this.parkInfoEntity.isSplit === 0) {
+          useConsumeFee = this.reduceHours * cost;
+        } else {
+          useConsumeFee = this.reducesDiscount.consumerLimit;
+        }
+      }
+      uni.setStorageSync('checkedList', this.checkedList);
+      uni.setStorageSync('checkedTotal', this.checkedTotal);
+      uni.setStorageSync('discountTotal', {
+        firstParkFee: this.firstPark,
+        memberGradeFee: this.member,
+        consumeFee: this.reduces,
+        useConsumeFee: useConsumeFee,
+        time: this.totalTime,
+        fee: this.totalFee
+      });
+      this.$router.back();
+    },
+
+  }
 }
 </script>
 
 <style lang="less" scoped>
 @import '../../styles/common.less';
+
 .scroll-Y {
-		width: 100%;
-		display: flex;
-		flex-direction: column;
-		height: 100vh;
-		background: #F1F1F1;
-	}
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background: #F4F7FF;
+}
+
 .container {
-	background-color: #fff;
-	width: 650px;
-	margin:25px 30px;
-	padding-left: 40px;
-	border-radius: 10px;
-	display: flex;
-	align-items: center;
-	line-height: 70px;
-	position: relative;
-	.item {
-		width: 570px;
-		padding: 20px 0;
-		.title {
-			font-size: 34px;
-		}
-		.content {
-			font-size: 28px;
-			color:#989898;
-		}
-	}
-	.member-discount-info {
-		font-size: 20px;
+  background-color: #FAFBFF;
+  width: calc(100% - 100px);
+  margin: 30px;
+  padding-left: 40px;
+  border-radius: 4px;
+  display: flex;
+  align-items: center;
+  line-height: 70px;
+  position: relative;
+  height: inherit;
+  border: 1px solid #D8DAE0;
+
+  .item {
+    width: 570px;
+    padding: 20px 0;
+
+    .title {
+      font-size: 34px;
+    }
+
+    .content {
+      font-size: 28px;
+      color: #989898;
+    }
+  }
+
+  .member-discount-info {
+    font-size: 20px;
     position: absolute;
     right: 12px;
     bottom: 0;
     color: #989898;
-	}
-	.page_img {
-		width: 49px;
-		height: 49px;
-		border: 1px solid #E6E6E6;
-		border-radius: 50%;
-		overflow: hidden;
-		img {
-			width: 50px;
-			height: 50px;
-			margin-left: -1px;
-		}
-	}
+  }
+
+  .page_img {
+    width: 49px;
+    height: 49px;
+    border: 1px solid #E6E6E6;
+    border-radius: 50%;
+    overflow: hidden;
+
+    img {
+      width: 50px;
+      height: 50px;
+      margin-left: -1px;
+    }
+  }
 }
+
 .flewx {
-		width: 100%;
-		height: 100px;
-		background-color: #fff;
-		position: fixed;
-		bottom: 0;
-		font-size: 30px;
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-		// padding-bottom: constant(safe-area-inset-bottom);
-		// padding-bottom: env(safe-area-inset-bottom);
-		padding-bottom: 20px;
-		.flewx-content {
-			position: absolute;
-    	left: 16px;
-		}
-		.flewx_index3 {
-			width: 150px;
-			height: 70px;
-			border-radius: 50px;
-			text-align: center;
-			font-size: 28px;
-			line-height: 70px;
-			color: #fff;
-			background-image: linear-gradient(to right, #7e4fa1 , #433c7f);
-			box-shadow: 2px 3px 5px #888888;
-			position: absolute;
-    	right: 16px;
-		}
-		.blue_flewx_index3 {
-			.color-background-color('blue')
-		}
-		.green_flewx_index3 {
-			.color-background-color('green')
-		}
-	}
-	/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
-		background-color: red !important;
-		border-radius: 50% !important;
-		border: 1px solid red;
-	}
-	/deep/ checkbox .wx-checkbox-input {
-		border-radius: 50% !important;
-	}
+  width: 100%;
+  height: 130px;
+  background-color: #fff;
+  position: fixed;
+  bottom: 0;
+  font-size: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  // padding-bottom: constant(safe-area-inset-bottom);
+  // padding-bottom: env(safe-area-inset-bottom);
+  padding-bottom: 20px;
+
+  .flewx-content {
+    position: absolute;
+    left: 16px;
+  }
+
+  .flewx_index3 {
+    width: 150px;
+    height: 70px;
+    border-radius: 45px;
+    text-align: center;
+    font-size: 30px;
+    line-height: 70px;
+    color: #fff;
+    // background-image: linear-gradient(to right, #7e4fa1, #433c7f);
+    background: #064C8A;
+    box-shadow: 2px 3px 5px #888888;
+    position: absolute;
+    right: 16px;
+  }
+
+  .blue_flewx_index3 {
+    .color-background-color('blue')
+  }
+
+  .green_flewx_index3 {
+    .color-background-color('green')
+  }
+}
+
+/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+  background-color: red !important;
+  border-radius: 50% !important;
+  border: 1px solid red;
+}
+
+/deep/ checkbox .wx-checkbox-input {
+  border-radius: 50% !important;
+}
 </style>
 
 

文件差异内容过多而无法显示
+ 0 - 0
src/pages/parkingFee/parkingFeePayment.vue


二进制
src/pages/parkingFee/static/images/icon-car.png


二进制
src/pages/parkingFee/static/images/icon-order.png


二进制
src/pages/parkingFee/static/images/icon-ticket.png


二进制
src/pages/parkingFee/static/images/icon-车牌类型.png


+ 1 - 1
src/plugins/install.js

@@ -43,7 +43,7 @@ Vue.prototype.$userName = 'sys_miniprogram';
 // #endif
 
 // #ifdef H5
-Vue.prototype.$wx = wx;
+// Vue.prototype.$wx = wx;
 Vue.prototype.$authorizeH5 = authorizeH5;
 Vue.prototype.$getCode = getCode;
 Vue.prototype.$postCode = postCode;

+ 20 - 6
src/store/index.js

@@ -9,10 +9,16 @@ Vue.use(Vuex);
 
 const store = new Vuex.Store({
   state: {
-    groupId: '8a84819f7c6e260e017c72669bbe01c2',
-    kipUserId: '8a888aea82c9ac970182ecfa259a0ddf',
-    mallId: '8a8486a37f48f7bd017f4e5bddd10000',
-    openid: 'oudWQ5SCDElfn-IQH6eBR5JesOz4',
+    // groupId: '8a84819f7c6e260e017c72669bbe01c2',
+    // kipUserId: '8a888aea82c9ac970182ecfa259a0ddf',
+    // mallId: '8a8486a37f48f7bd017f4e5bddd10000',
+    // openid: 'oudWQ5SCDElfn-IQH6eBR5JesOz4',
+    // appId: 'wx92c3e55fbef6b2af',
+    groupId: '',
+    kipUserId: '',
+    mallId: '',
+    openid: '',
+    appId: '',
     member: {},
     userInfo: {},
     mobile: '',
@@ -76,9 +82,16 @@ const store = new Vuex.Store({
           )
         );
         if (!pageId) return;
-        const [groupId, kipUserId, mallId, openid, mobile] =
+        let [groupId, kipUserId, mallId, openid, mobile] =
           Decrypt(pageId).split('#');
           console.log(8181, groupId, kipUserId, mallId, openid, mobile);
+
+        groupId = '8a84853b7c91ac5b017c962dab55030e'
+        kipUserId = '8a84810483bc013e0183d44773bf002a'
+        mallId = '8a84853b7c91ac5b017c961a9b2a030d'
+        openid = 'oudWQ5SCDElfn-IQH6eBR5JesOz4'
+        mobile = '15267617473'
+
         commit('SET_GROUP_ID', groupId);
         commit('SET_KIP_USER_ID', kipUserId);
         commit('SET_MALL_ID', mallId);
@@ -100,10 +113,11 @@ const store = new Vuex.Store({
           // commit('SET_USER_INFO', memberRes.data);
           commit('SET_MEMBER', memberRes.data);
         }
-        // console.log(929292, marketListRes);
+        console.log(929292, marketListRes);
         callback && callback();
       } catch (e) {
         console.log(e);
+        callback && callback();
       }
     },
     async getUserDetail({ commit }) {

+ 6 - 3
src/utils/cache-tool.js

@@ -10,12 +10,12 @@ export default {
 	init() {
 		const href = `${window.location.href}`
 		// dev
-		if (/8080|dev-crm-kpl/g.test(href)) {
+		if (/8080|dev-tparking/g.test(href)) {
 			this.setEnv('qa')
 			return
 		}
 		// qa
-		if (/qa-crm-kpl/g.test(href)) {
+		if (/qa-tparking/g.test(href)) {
 			this.setEnv('qa')
 			return
 		}
@@ -48,7 +48,10 @@ export default {
 			if (key === 'KIP_API') {
 				return window?.injectConfig?.profileApi
 			}
-			// return
+			curEnvConst.constants = {
+				...curEnvConst?.constants,
+				...window?.injectConfig
+			}
 		}
 		if (key) {
 			return curEnvConst?.constants[key];

+ 3 - 1
src/utils/index.js

@@ -42,5 +42,7 @@ export function getQueryParam() {
 }
 
 export function isInWeixinH5() {
-  return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
+  // TODO: 发布前取消注释
+  // return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
+  return true;
 }

+ 6 - 5
src/utils/login.js

@@ -17,7 +17,7 @@ const OAUTH_PREFIX = '/oauth/v1';
  verifyCode: string;
  }
  */
-export function login() {
+export function login(params) {
   // request.post(url, params, {contentType: 'form', ...DEFAULT_CONFIG, noToken: true});
   return request.post(`${ OAUTH_PREFIX }/auth/phone-login`,params,{isAuthRequest: true,isHandleError: false});
 }
@@ -32,7 +32,7 @@ export function login() {
  }
  : Promise<{ code: string, data: Token }>
  */
-export function loginWeixinH5() {
+export function loginWeixinH5(params) {
   return request.post(`${ OAUTH_PREFIX }/auth/subscription-phone-login`,params,{isAuthRequest: true,isHandleError: false});
 }
 
@@ -45,7 +45,7 @@ export function loginWeixinH5() {
 
  : Promise<{ code: string, data: Token }>
  */
-export function loginByWxOnClick() {
+export function loginByWxOnClick(params) {
   return request.post(`${ OAUTH_PREFIX }/auth/authorized-phone-login`,params,{isAuthRequest: true,isHandleError: false});
 }
 
@@ -149,11 +149,11 @@ async function WxJsSdkConfig( jsApiList = [],url = '',openTagList = [] ) {
   const res = await WxJsSdkSignature({url: url ? url : location.href}); // 这个接口需要登录!
   let debug = false;
   try {
-    debug = uni.getStorageSync("WX_JSSDK_DEBUG");
+    // debug = uni.getStorageSync("WX_JSSDK_DEBUG");
   } catch { }
   return new Promise(( resolve,reject ) => {
     wx.config({
-      debug,
+      debug: true,
       appId: res.data.appId,
       timestamp: res.data.timestamp,
       nonceStr: res.data.nonceStr,
@@ -161,6 +161,7 @@ async function WxJsSdkConfig( jsApiList = [],url = '',openTagList = [] ) {
       jsApiList,
       openTagList: openTagList ? openTagList : []
     });
+    console.log(164, wx);
     wx.ready(function () {
       // 来自微信官方文档:
       // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,

+ 20 - 4
src/utils/request-kip.js

@@ -51,11 +51,27 @@ function getToken() {
   return token
 }
 
-function getUrl( url ) {
-  if ( url.indexOf('http') > -1 && url.indexOf('/profileApi') > -1 ) {
-    return url;
+function getUrl( path ) {
+  console.log(555555555, path);
+  // 如果是dev、qa、prod环境
+  if (window.ininjectConfig) {
+    if(path.indexOf('/profileApi') > -1) {
+      console.log(58, path);
+      return `${window.ininjectConfig.profileApi}${path}`
+    }
+    if(/\/qaPayment/g.test(path)) {
+      console.log(58, path);
+      return `${window.ininjectConfig.qaPayment}${path}`
+    }
+  }
+  // 本地开发环境
+  if ( path.indexOf('http') > -1 && path.indexOf('/profileApi') > -1 ) {
+    return path;
+  } else if (/\/qaPayment/g.test(path)) {
+    // 支付
+    return `https://qa-payment.kerryonvip.com${path}`
   } else {
-    return CacheTool.getCurEnvConst('KIP_API') + url
+    return CacheTool.getCurEnvConst('KIP_API') + path
   }
 }
 

+ 1 - 1
vue.config.js

@@ -92,7 +92,7 @@ module.exports = {
         },
       },
       '/qaPayment': {
-          target: 'https://dev-payment.kerryonvip.com', //代理地址,这里设置的地址会代替axios中设置的baseURL
+          target: 'https://qa-apim.kerryplus.com/c/api/payment/v1', //代理地址,这里设置的地址会代替axios中设置的baseURL
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
         //ws: true, // proxy websockets
         //pathRewrite方法重写url

部分文件因为文件数量过多而无法显示