|
@@ -210,9 +210,8 @@ export default {
|
|
|
title: '加载中',
|
|
|
});
|
|
|
try {
|
|
|
- // console.log('加载车场信息', this.$store.state.lbsId);
|
|
|
- // const res = await parkingLots('8aaa82ea804d07cd0180516ff03b0008'); // TODO: 临时写死
|
|
|
- const res = await parkingLots(this.$store.state.lbsId); // TODO: 临时写死
|
|
|
+ // 加载车场信息
|
|
|
+ const res = await parkingLots(this.$store.state.lbsId);
|
|
|
// console.log(res);
|
|
|
let reg = /[;;]/g;
|
|
|
this.description = res?.description?.replace(reg, '\r\n').replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>');
|
|
@@ -271,7 +270,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- async checkEligibility() {
|
|
|
+ async checkEligibility(vehicleNumber = this.vehicleNumber) {
|
|
|
try {
|
|
|
/*
|
|
|
* 如果是杭州,并且是登陆情况
|
|
@@ -291,7 +290,7 @@ export default {
|
|
|
*
|
|
|
* */
|
|
|
// 如果是杭州,并且是登陆情况
|
|
|
- this.eligibility = await checkEligibility(this.vehicleNumber)
|
|
|
+ this.eligibility = await checkEligibility(vehicleNumber)
|
|
|
/*this.eligibility = {
|
|
|
"eligible": false, // 是否优惠车
|
|
|
"isBound": false, // 是否绑定
|
|
@@ -398,6 +397,16 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 历史车牌快速查询
|
|
|
+ async toHandleSearchBefore(vehicleNo) {
|
|
|
+ // 不是杭州的车牌 或者 用户拒绝登陆的场景
|
|
|
+ if (!isHZ(this.mallId) || this.$route.query.isLogin === 'loginDenied') {
|
|
|
+ this.toHandleSearch(vehicleNo)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 查询车辆优惠资格并提示跳转页面
|
|
|
+ await this.checkEligibility(vehicleNo)
|
|
|
+
|
|
|
+ },
|
|
|
toHandleSearch(vehicleNo) {
|
|
|
uni.setStorageSync('carList', [...new Set([vehicleNo, ...this.carList])].slice(0, 6));
|
|
|
this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
|