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