|
@@ -1,24 +1,18 @@
|
|
import plateNumber from '@/components/plate-number/plateNumber.vue';
|
|
import plateNumber from '@/components/plate-number/plateNumber.vue';
|
|
-import { REG_SOURCE } from '@/constants';
|
|
|
|
|
|
+import {LICENSE_PLATE_TYPE_ARR, REG_SOURCE} from '@/constants';
|
|
import LoginDom from '@/components/Login/Login.vue';
|
|
import LoginDom from '@/components/Login/Login.vue';
|
|
-import { mapState } from 'vuex';
|
|
|
|
-import { initWxJsSdkConfig } from '@/utils/login';
|
|
|
|
-import { getPlatform,requestInit } from '@/utils/index';
|
|
|
|
-import { wxToLoginCallback, getUrlParams, theCommunicationBetweenWechatAndH5IsNormal } from '@/utils';
|
|
|
|
-import {getAccessH5} from '@/utils/api-crm-member'
|
|
|
|
|
|
+import {mapState} from 'vuex';
|
|
|
|
+import {initWxJsSdkConfig} from '@/utils/login';
|
|
|
|
+import {getUrlParams, isHZ} from '@/utils';
|
|
import wxPointsAuth from '@/components/wx-points-auth/wx-points-auth.vue'
|
|
import wxPointsAuth from '@/components/wx-points-auth/wx-points-auth.vue'
|
|
|
|
+
|
|
const app = {
|
|
const app = {
|
|
globalData: {
|
|
globalData: {
|
|
regSource: '',
|
|
regSource: '',
|
|
},
|
|
},
|
|
};
|
|
};
|
|
import uni from '@/utils/uniHooks';
|
|
import uni from '@/utils/uniHooks';
|
|
-// import blueCom from '../components/blue/home.vue';
|
|
|
|
-// import greenCom from '../components/green/home.vue';
|
|
|
|
-// import officeBlueCom from '../components/officeBlue/home.vue';
|
|
|
|
-// import purpleCom from '../components/purple/home.vue';
|
|
|
|
-import { parkingLots, qrCodes, unlicensedCarCheckIn, getConfValueOfKey } from '@/api/parking';
|
|
|
|
-import { reject } from 'lodash';
|
|
|
|
|
|
+import {parkingLots, qrCodes, unlicensedCarCheckIn, getConfValueOfKey, getVehicles, parkingRecord} from '@/api/parking';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -89,20 +83,22 @@ export default {
|
|
// console.log('二次加载', this.$route.query.fromPage && !this.$store.state.pageHistory[this.$route.query.fromPage]);
|
|
// console.log('二次加载', this.$route.query.fromPage && !this.$store.state.pageHistory[this.$route.query.fromPage]);
|
|
const fromPage = localStorage.getItem(`${this.$route.query.fromPage}`)
|
|
const fromPage = localStorage.getItem(`${this.$route.query.fromPage}`)
|
|
// console.log(9191, this.$route.query?.fromPage);
|
|
// console.log(9191, this.$route.query?.fromPage);
|
|
- if(this.$route.query?.fromPage !== 'undefined' && !this.$store.state.pageHistory[this.$route.query.fromPage] && !fromPage) {
|
|
|
|
|
|
+ if (this.$route.query?.fromPage !== 'undefined' && !this.$store.state.pageHistory[this.$route.query.fromPage] && !fromPage) {
|
|
// console.log(93939);
|
|
// console.log(93939);
|
|
this.$store.commit('setPageHistory', {
|
|
this.$store.commit('setPageHistory', {
|
|
[this.$route.query.fromPage]: 1
|
|
[this.$route.query.fromPage]: 1
|
|
})
|
|
})
|
|
localStorage.setItem(`${this.$route.query.fromPage}`, this.$route.query.fromPage)
|
|
localStorage.setItem(`${this.$route.query.fromPage}`, this.$route.query.fromPage)
|
|
- this.$router.push({ path: this.$route.query.fromPage, query: {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- loginCount: 1
|
|
|
|
- }});
|
|
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: this.$route.query.fromPage, query: {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ loginCount: 1
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- const {type= '', code = ''} = this.$route.query
|
|
|
|
|
|
+ const {type = '', code = ''} = this.$route.query
|
|
// 无牌车流程
|
|
// 无牌车流程
|
|
- if(/unlicensedOut|unlicensedIn/.test(type) && code && !this.$store.state.pageHistory?.unlicensed && !this.endlessLoop) {
|
|
|
|
|
|
+ if (/unlicensedOut|unlicensedIn/.test(type) && code && !this.$store.state.pageHistory?.unlicensed && !this.endlessLoop) {
|
|
this.$store.commit('setPageHistory', {
|
|
this.$store.commit('setPageHistory', {
|
|
unlicensed: 1
|
|
unlicensed: 1
|
|
})
|
|
})
|
|
@@ -111,7 +107,7 @@ export default {
|
|
});
|
|
});
|
|
this.$store.commit('SET_ENDLESS_LOOP', type);
|
|
this.$store.commit('SET_ENDLESS_LOOP', type);
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.qrCodesRule(code);
|
|
|
|
|
|
+ this.qrCodesRule(code);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -149,8 +145,8 @@ export default {
|
|
// await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
|
|
// await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
|
|
// }
|
|
// }
|
|
this.getVehiclesINTMP()
|
|
this.getVehiclesINTMP()
|
|
- const openid= uni.getStorageSync('openid');
|
|
|
|
-
|
|
|
|
|
|
+ const openid = uni.getStorageSync('openid');
|
|
|
|
+
|
|
// 如果用户未登录的话,返回之后,重新获取数据用户的基础数据
|
|
// 如果用户未登录的话,返回之后,重新获取数据用户的基础数据
|
|
if (openid) {
|
|
if (openid) {
|
|
this.getParkInfo();
|
|
this.getParkInfo();
|
|
@@ -168,7 +164,7 @@ export default {
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
const href = window.location.href;
|
|
const href = window.location.href;
|
|
- if(!isAlipayClient && !/808[0-9]/.test(href)) {
|
|
|
|
|
|
+ if (!isAlipayClient && !/808[0-9]/.test(href)) {
|
|
setTimeout(async () => {
|
|
setTimeout(async () => {
|
|
await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
|
|
await initWxJsSdkConfig(['checkJsApi', 'scanQRCode']);
|
|
}, 1500)
|
|
}, 1500)
|
|
@@ -232,7 +228,7 @@ export default {
|
|
},
|
|
},
|
|
// 唤起键盘
|
|
// 唤起键盘
|
|
clickShowKeyboard(index) {
|
|
clickShowKeyboard(index) {
|
|
- if ( this.carType !== 1 && index === 7) return
|
|
|
|
|
|
+ if (this.carType !== 1 && index === 7) return
|
|
this.ind = index;
|
|
this.ind = index;
|
|
this.active = index;
|
|
this.active = index;
|
|
if (index === 0) {
|
|
if (index === 0) {
|
|
@@ -281,8 +277,8 @@ export default {
|
|
this.$store.commit('SET_REGRESH_PAGE_KEY')
|
|
this.$store.commit('SET_REGRESH_PAGE_KEY')
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
const query = {
|
|
const query = {
|
|
- ...this.$route.query,
|
|
|
|
- vehicleNo: this.vehicleNumber,
|
|
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ vehicleNo: this.vehicleNumber,
|
|
}
|
|
}
|
|
// fromPage && format && unlicensed
|
|
// fromPage && format && unlicensed
|
|
query.fromPage = ''
|
|
query.fromPage = ''
|
|
@@ -302,15 +298,15 @@ export default {
|
|
});
|
|
});
|
|
this.$store.commit('SET_REGRESH_PAGE_KEY')
|
|
this.$store.commit('SET_REGRESH_PAGE_KEY')
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- const query = {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- vehicleNo: vehicleNo,
|
|
|
|
- }
|
|
|
|
- // fromPage && format && unlicensed
|
|
|
|
- query.fromPage = ''
|
|
|
|
- query.format = ''
|
|
|
|
- query.unlicensed = ''
|
|
|
|
-
|
|
|
|
|
|
+ const query = {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ vehicleNo: vehicleNo,
|
|
|
|
+ }
|
|
|
|
+ // fromPage && format && unlicensed
|
|
|
|
+ query.fromPage = ''
|
|
|
|
+ query.format = ''
|
|
|
|
+ query.unlicensed = ''
|
|
|
|
+
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: 'parkingFeeDetail',
|
|
path: 'parkingFeeDetail',
|
|
query,
|
|
query,
|
|
@@ -365,14 +361,14 @@ export default {
|
|
this.parkingFeeDetailInit();
|
|
this.parkingFeeDetailInit();
|
|
uni.setStorageSync('isReload', '3');
|
|
uni.setStorageSync('isReload', '3');
|
|
// this.$destroy();
|
|
// this.$destroy();
|
|
- const query = {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- vehicleNo: carno,
|
|
|
|
- }
|
|
|
|
- // fromPage && format && unlicensed
|
|
|
|
- query.fromPage = ''
|
|
|
|
- query.format = ''
|
|
|
|
- query.unlicensed = ''
|
|
|
|
|
|
+ const query = {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ vehicleNo: carno,
|
|
|
|
+ }
|
|
|
|
+ // fromPage && format && unlicensed
|
|
|
|
+ query.fromPage = ''
|
|
|
|
+ query.format = ''
|
|
|
|
+ query.unlicensed = ''
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: 'parkingFeeDetail',
|
|
path: 'parkingFeeDetail',
|
|
query,
|
|
query,
|
|
@@ -452,7 +448,7 @@ export default {
|
|
const query = {
|
|
const query = {
|
|
...this.$route.query,
|
|
...this.$route.query,
|
|
// vehicleNo: vehicleNo,
|
|
// vehicleNo: vehicleNo,
|
|
- }
|
|
|
|
|
|
+ }
|
|
// fromPage && format && unlicensed
|
|
// fromPage && format && unlicensed
|
|
query.fromPage = ''
|
|
query.fromPage = ''
|
|
query.format = ''
|
|
query.format = ''
|
|
@@ -463,7 +459,7 @@ export default {
|
|
// return;
|
|
// return;
|
|
// }
|
|
// }
|
|
this.$store.commit('SET_REGRESH_PAGE_KEY')
|
|
this.$store.commit('SET_REGRESH_PAGE_KEY')
|
|
- this.$router.push({ path: 'parkingFeeList', query });
|
|
|
|
|
|
+ this.$router.push({path: 'parkingFeeList', query});
|
|
},
|
|
},
|
|
// 车牌管理
|
|
// 车牌管理
|
|
doRouter2: function () {
|
|
doRouter2: function () {
|
|
@@ -485,13 +481,13 @@ export default {
|
|
const query = {
|
|
const query = {
|
|
...this.$route.query,
|
|
...this.$route.query,
|
|
// vehicleNo: vehicleNo,
|
|
// vehicleNo: vehicleNo,
|
|
- }
|
|
|
|
|
|
+ }
|
|
// fromPage && format && unlicensed
|
|
// fromPage && format && unlicensed
|
|
query.fromPage = ''
|
|
query.fromPage = ''
|
|
query.format = ''
|
|
query.format = ''
|
|
query.loginCount = ''
|
|
query.loginCount = ''
|
|
uni.removeStorageSync('passLogin');
|
|
uni.removeStorageSync('passLogin');
|
|
- this.$router.push({ path: 'vehicleManagement', query });
|
|
|
|
|
|
+ this.$router.push({path: 'vehicleManagement', query});
|
|
},
|
|
},
|
|
async jumpToPreJudgmentOfParkingInvoice() {
|
|
async jumpToPreJudgmentOfParkingInvoice() {
|
|
return new Promise(async (resolve) => {
|
|
return new Promise(async (resolve) => {
|
|
@@ -501,7 +497,7 @@ export default {
|
|
// const res = await getAccessH5(`${this.mallId}-invoice`);
|
|
// const res = await getAccessH5(`${this.mallId}-invoice`);
|
|
const res = await getConfValueOfKey('HEJIInvoiceSwitch')
|
|
const res = await getConfValueOfKey('HEJIInvoiceSwitch')
|
|
const lbsId = uni.getStorageSync('lbsId')
|
|
const lbsId = uni.getStorageSync('lbsId')
|
|
- if(res?.switch && res.lbsId.length && res.lbsId.indexOf(lbsId) > -1) {
|
|
|
|
|
|
+ if (res?.switch && res.lbsId.length && res.lbsId.indexOf(lbsId) > -1) {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
// console.log(474, this.Dialog);
|
|
// console.log(474, this.Dialog);
|
|
this.$dialog({
|
|
this.$dialog({
|
|
@@ -527,7 +523,7 @@ export default {
|
|
//停车发票
|
|
//停车发票
|
|
doRouter1: async function () {
|
|
doRouter1: async function () {
|
|
const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
|
|
const isJump = await this.jumpToPreJudgmentOfParkingInvoice();
|
|
- if(isJump) return
|
|
|
|
|
|
+ if (isJump) return
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
uni.removeStorageSync('invoiceindex');
|
|
uni.removeStorageSync('invoiceindex');
|
|
this.$store.dispatch('clearUnlicensed');
|
|
this.$store.dispatch('clearUnlicensed');
|
|
@@ -543,7 +539,7 @@ export default {
|
|
const query = {
|
|
const query = {
|
|
...this.$route.query,
|
|
...this.$route.query,
|
|
// vehicleNo: vehicleNo,
|
|
// vehicleNo: vehicleNo,
|
|
- }
|
|
|
|
|
|
+ }
|
|
// fromPage && format && unlicensed
|
|
// fromPage && format && unlicensed
|
|
query.fromPage = ''
|
|
query.fromPage = ''
|
|
query.format = ''
|
|
query.format = ''
|
|
@@ -564,7 +560,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
*/
|
|
*/
|
|
- this.$router.push({ path: 'parkingReceipt', query });
|
|
|
|
|
|
+ this.$router.push({path: 'parkingReceipt', query});
|
|
},
|
|
},
|
|
//停车券兑换
|
|
//停车券兑换
|
|
doRouter3: function () {
|
|
doRouter3: function () {
|
|
@@ -587,7 +583,7 @@ export default {
|
|
// });
|
|
// });
|
|
|
|
|
|
wx.miniProgram.navigateTo({
|
|
wx.miniProgram.navigateTo({
|
|
- "url": "/pages/pointsMall/pointsMall?exchangeTypes=2" // 去 login 页面 1 去登录
|
|
|
|
|
|
+ "url": "/pages/pointsMall/pointsMall?exchangeTypes=2" // 去 login 页面 1 去登录
|
|
})
|
|
})
|
|
},
|
|
},
|
|
blueComChange(value) {
|
|
blueComChange(value) {
|
|
@@ -619,7 +615,7 @@ export default {
|
|
const url = res.result;
|
|
const url = res.result;
|
|
const {path} = getUrlParams(res.result)
|
|
const {path} = getUrlParams(res.result)
|
|
let params = null
|
|
let params = null
|
|
- if(path) {
|
|
|
|
|
|
+ if (path) {
|
|
params = getUrlParams(decodeURIComponent(path))
|
|
params = getUrlParams(decodeURIComponent(path))
|
|
}
|
|
}
|
|
/*
|
|
/*
|
|
@@ -639,7 +635,7 @@ export default {
|
|
针对微信的小程序码进行的兼容改造
|
|
针对微信的小程序码进行的兼容改造
|
|
微信扫码结束之后的返回参数 {"errMsg": "scanCode:ok", "scanType": "WX_CODE", "charSet": "ISO8859-1", "rawData": "bGsoP3gyT1Aud3QpbW1JeHRfVHJsUjg4JnR5cGU9dW5saWNlbnNlZElu", "path": "pages/automatic/automaticIndex?scene=code%3D9988%26type%3DunlicensedIn"}
|
|
微信扫码结束之后的返回参数 {"errMsg": "scanCode:ok", "scanType": "WX_CODE", "charSet": "ISO8859-1", "rawData": "bGsoP3gyT1Aud3QpbW1JeHRfVHJsUjg4JnR5cGU9dW5saWNlbnNlZElu", "path": "pages/automatic/automaticIndex?scene=code%3D9988%26type%3DunlicensedIn"}
|
|
*/
|
|
*/
|
|
- if(res.scanType && res.scanType === 'WX_CODE' && res.path) {
|
|
|
|
|
|
+ if (res.scanType && res.scanType === 'WX_CODE' && res.path) {
|
|
const params = getUrlParams(`?${decodeURIComponent(res.path.replace(/.*scene=/g, ''))}`)
|
|
const params = getUrlParams(`?${decodeURIComponent(res.path.replace(/.*scene=/g, ''))}`)
|
|
this.$store.commit('SET_UNLICENSED_INFO', params);
|
|
this.$store.commit('SET_UNLICENSED_INFO', params);
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -647,12 +643,12 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
// 兜底逻辑,如果是其他小程序扫描,则提取rawData,进行解析提取入参
|
|
// 兜底逻辑,如果是其他小程序扫描,则提取rawData,进行解析提取入参
|
|
- if(res.scanType && res.scanType === 'WX_CODE' && !res?.path){
|
|
|
|
|
|
+ if (res.scanType && res.scanType === 'WX_CODE' && !res?.path) {
|
|
let path = atob(res.rawData)
|
|
let path = atob(res.rawData)
|
|
path = path.replace(/.*([a-z0-9]{6}&type)/g, '8b$1')
|
|
path = path.replace(/.*([a-z0-9]{6}&type)/g, '8b$1')
|
|
const regex = /(\w+)&type=(\w+)/;
|
|
const regex = /(\w+)&type=(\w+)/;
|
|
const match = path.match(regex);
|
|
const match = path.match(regex);
|
|
- const obj = { code: match[1], type: match[2] };
|
|
|
|
|
|
+ const obj = {code: match[1], type: match[2]};
|
|
this.$store.commit('SET_UNLICENSED_INFO', obj);
|
|
this.$store.commit('SET_UNLICENSED_INFO', obj);
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.qrCodesRule(obj.code, 'scan');
|
|
this.qrCodesRule(obj.code, 'scan');
|
|
@@ -691,7 +687,7 @@ export default {
|
|
console.log(614, path);
|
|
console.log(614, path);
|
|
const regex = /(\w+)&type=(\w+)/;
|
|
const regex = /(\w+)&type=(\w+)/;
|
|
const match = path.match(regex);
|
|
const match = path.match(regex);
|
|
- const obj = { code: match[1], type: match[2] };
|
|
|
|
|
|
+ const obj = {code: match[1], type: match[2]};
|
|
console.log(618, obj);
|
|
console.log(618, obj);
|
|
console.log(696, this.qrCodesRule);
|
|
console.log(696, this.qrCodesRule);
|
|
this.$store.commit('SET_UNLICENSED_INFO', obj);
|
|
this.$store.commit('SET_UNLICENSED_INFO', obj);
|
|
@@ -716,11 +712,11 @@ export default {
|
|
async qrCodesRule(code, source = '') {
|
|
async qrCodesRule(code, source = '') {
|
|
console.log(717, code, source);
|
|
console.log(717, code, source);
|
|
// source 是为了避免重复刷新
|
|
// source 是为了避免重复刷新
|
|
- if(this.$store.state.pageHistory.parkingFeeMsg && !source) {
|
|
|
|
|
|
+ if (this.$store.state.pageHistory.parkingFeeMsg && !source) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
- if ( this.qrCodeHistory && this.qrCodeHistory === code ) {
|
|
|
|
|
|
+ if (this.qrCodeHistory && this.qrCodeHistory === code) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.qrCodeHistory = code
|
|
this.qrCodeHistory = code
|
|
@@ -735,17 +731,17 @@ export default {
|
|
console.log(735);
|
|
console.log(735);
|
|
// return
|
|
// return
|
|
if (this.unlicensedInfo?.type === 'unlicensedOut') {
|
|
if (this.unlicensedInfo?.type === 'unlicensedOut') {
|
|
- const query = {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- gateId: qrCodesres.gateId,
|
|
|
|
- vehicleNo: '',
|
|
|
|
- type: this.unlicensedInfo.type
|
|
|
|
- }
|
|
|
|
- // fromPage && format && unlicensed
|
|
|
|
- query.fromPage = ''
|
|
|
|
- query.format = ''
|
|
|
|
- query.unlicensed = ''
|
|
|
|
- query.code = ''
|
|
|
|
|
|
+ const query = {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ gateId: qrCodesres.gateId,
|
|
|
|
+ vehicleNo: '',
|
|
|
|
+ type: this.unlicensedInfo.type
|
|
|
|
+ }
|
|
|
|
+ // fromPage && format && unlicensed
|
|
|
|
+ query.fromPage = ''
|
|
|
|
+ query.format = ''
|
|
|
|
+ query.unlicensed = ''
|
|
|
|
+ query.code = ''
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: 'parkingFeeDetail',
|
|
path: 'parkingFeeDetail',
|
|
query
|
|
query
|
|
@@ -757,16 +753,16 @@ export default {
|
|
gateId: qrCodesres.gateId
|
|
gateId: qrCodesres.gateId
|
|
});
|
|
});
|
|
|
|
|
|
- const query = {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- type: 'success',
|
|
|
|
- vehicleNo: unlicensedCarCheckInres.vehicleNo
|
|
|
|
- }
|
|
|
|
- // fromPage && format && unlicensed
|
|
|
|
- query.fromPage = ''
|
|
|
|
- query.format = ''
|
|
|
|
- query.unlicensed = ''
|
|
|
|
- query.code = ''
|
|
|
|
|
|
+ const query = {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ type: 'success',
|
|
|
|
+ vehicleNo: unlicensedCarCheckInres.vehicleNo
|
|
|
|
+ }
|
|
|
|
+ // fromPage && format && unlicensed
|
|
|
|
+ query.fromPage = ''
|
|
|
|
+ query.format = ''
|
|
|
|
+ query.unlicensed = ''
|
|
|
|
+ query.code = ''
|
|
this.$store.commit('setPageHistory', {
|
|
this.$store.commit('setPageHistory', {
|
|
parkingFeeMsg: 1
|
|
parkingFeeMsg: 1
|
|
})
|
|
})
|
|
@@ -781,15 +777,15 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (/CAR_NOT_FOUND|INOUT_FAILED|UNLICENSED_PLATE_ACQUISITION_FAILED/.test(err.code)) {
|
|
if (/CAR_NOT_FOUND|INOUT_FAILED|UNLICENSED_PLATE_ACQUISITION_FAILED/.test(err.code)) {
|
|
- const query = {
|
|
|
|
- ...this.$route.query,
|
|
|
|
- type: 'fail'
|
|
|
|
- }
|
|
|
|
- // fromPage && format && unlicensed
|
|
|
|
- query.fromPage = ''
|
|
|
|
- query.format = ''
|
|
|
|
- query.unlicensed = ''
|
|
|
|
- query.code = ''
|
|
|
|
|
|
+ const query = {
|
|
|
|
+ ...this.$route.query,
|
|
|
|
+ type: 'fail'
|
|
|
|
+ }
|
|
|
|
+ // fromPage && format && unlicensed
|
|
|
|
+ query.fromPage = ''
|
|
|
|
+ query.format = ''
|
|
|
|
+ query.unlicensed = ''
|
|
|
|
+ query.code = ''
|
|
this.$store.commit('setPageHistory', {
|
|
this.$store.commit('setPageHistory', {
|
|
parkingFeeMsg: 1
|
|
parkingFeeMsg: 1
|
|
})
|
|
})
|
|
@@ -806,6 +802,58 @@ export default {
|
|
// 无牌车这边去支付的时候,属于场内缴费,需要调用场内缴费的接口 /parking/check-out
|
|
// 无牌车这边去支付的时候,属于场内缴费,需要调用场内缴费的接口 /parking/check-out
|
|
this.$store.commit('SET_ENDLESS_LOOP', '');
|
|
this.$store.commit('SET_ENDLESS_LOOP', '');
|
|
this.toHandleSearch(this.unlicensedCar);
|
|
this.toHandleSearch(this.unlicensedCar);
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 获取会员绑定的车牌列表
|
|
|
|
+ async getVehiclesINTMP() {
|
|
|
|
+ /*杭州*/
|
|
|
|
+ if (!isHZ(this.mallId)) return
|
|
|
|
+ try {
|
|
|
|
+ let vehicles = []
|
|
|
|
+ // 获取用户车场在停车辆数据集
|
|
|
|
+ vehicles = await parkingRecord({
|
|
|
|
+ userId: this.kipUserId,
|
|
|
|
+ lbsId: this.mallId
|
|
|
|
+ })
|
|
|
|
+ // 获取用户的所有车牌
|
|
|
|
+ const userVehicles = await getVehicles(this.kipUserId)
|
|
|
|
+ if (!vehicles.length) {
|
|
|
|
+ vehicles = userVehicles.content
|
|
|
|
+ }
|
|
|
|
+ if (vehicles.length) {
|
|
|
|
+ const vehicleNo = vehicles[0].vehicleNo
|
|
|
|
+ // 设置车牌类型
|
|
|
|
+ this.setVehicleNoType(vehicleNo, userVehicles.content)
|
|
|
|
+ // 赋值
|
|
|
|
+ this.numArr = vehicles[0].vehicleNo.split('');
|
|
|
|
+ this.vehicleNumber = vehicles[0].vehicleNo;
|
|
|
|
+ } else {
|
|
|
|
+ throw new Error('202')
|
|
|
|
+ }
|
|
|
|
+ } catch (e) {
|
|
|
|
+ // 设置默认参数
|
|
|
|
+ this.numArr = '浙,A,,,,,'.split(',')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ setVehicleNoType(vehicleNo, vehicles) {
|
|
|
|
+ if(vehicleNo.indexOf('临') === 0) {
|
|
|
|
+ this.tabbarActive = '无牌缴费'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const item = vehicles.filter(e => e.vehicleNo === vehicleNo)
|
|
|
|
+ if(item.length) {
|
|
|
|
+ let label = LICENSE_PLATE_TYPE_ARR.filter(e => e.value == item[0].licensePlateType)
|
|
|
|
+ const index = ['燃油车牌', '新能源', '特殊车牌'].indexOf(label[0].name)
|
|
|
|
+ this.$refs['k-tab'].changeTab(index)
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+ },
|
|
|
|
+ setLicensePlateList(arr) {
|
|
|
|
+ var array = []
|
|
|
|
+ arr.forEach(element => {
|
|
|
|
+ array.push(element.vehicleNo)
|
|
|
|
+ });
|
|
|
|
+ return array
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|