|
@@ -17,7 +17,7 @@ import uni from '@/utils/uniHooks.js';
|
|
|
// import { vehicles as vehiclesList } from './list';
|
|
|
import { wxToLoginCallback, isHZ } from '@/utils/index';
|
|
|
import { Toast } from 'vant';
|
|
|
-import { getVehicles, delVehicle } from '@/api/parking/index'
|
|
|
+import { getVehicles, delVehicle, parkingLots } from '@/api/parking/index'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -55,11 +55,14 @@ export default {
|
|
|
deleteDialogSwitch: false,
|
|
|
deleteSuccessDialogSwitch: false,
|
|
|
show: false, // 删除车牌时提示内容
|
|
|
+ parkingLotsInfo: {},
|
|
|
+ enableDiscountVehicle: false
|
|
|
};
|
|
|
},
|
|
|
|
|
|
async created() {
|
|
|
this.options = this.$route.query;
|
|
|
+ this.parkingLots()
|
|
|
},
|
|
|
async mounted() {
|
|
|
setTimeout(() => {
|
|
@@ -121,6 +124,12 @@ export default {
|
|
|
// #endif
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取车场信息
|
|
|
+ async parkingLots() {
|
|
|
+ const res = await parkingLots(this.$store.state.lbsId)
|
|
|
+ this.parkingLotsInfo = res;
|
|
|
+ this.enableDiscountVehicle = res.enableDiscountVehicle;
|
|
|
+ },
|
|
|
// 添加车牌号
|
|
|
toAdd() {
|
|
|
if(this.isNoLogin) return
|
|
@@ -129,7 +138,7 @@ export default {
|
|
|
// 跳转支付页面
|
|
|
toPayBefore(item) {
|
|
|
// 不是杭州的车牌 或者 是非优惠的车牌
|
|
|
- if(!this.isHZ || item.eligible){
|
|
|
+ if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
|
|
|
this.toPay(item.vehicleNo)
|
|
|
return
|
|
|
}
|
|
@@ -264,7 +273,7 @@ export default {
|
|
|
this.activeId = item.id;
|
|
|
this.activeCarno = item.vehicleNo;
|
|
|
// 不是杭州的车牌 或者 是非优惠的车牌
|
|
|
- if(!this.isHZ || !item.eligible) {
|
|
|
+ if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle) {
|
|
|
this.show = true
|
|
|
return
|
|
|
}
|
|
@@ -296,8 +305,8 @@ export default {
|
|
|
},
|
|
|
// 编辑
|
|
|
toEditBefore(item) {
|
|
|
- // TODO 不是杭州的车牌 或者 是非优惠的车牌
|
|
|
- if(!this.isHZ || !item.eligible){
|
|
|
+ // 不是杭州的车牌 或者 是非优惠的车牌
|
|
|
+ if(!this.isHZ || !item.eligible || !this.enableDiscountVehicle){
|
|
|
this.toEdit(item)
|
|
|
return
|
|
|
}
|