|
@@ -144,8 +144,7 @@ const actions = {
|
|
async orderInit({ commit, dispatch, state }, { gateId='124p3LK1', vehicleNo = '浙A616A1', callback, endlessLoop }) {
|
|
async orderInit({ commit, dispatch, state }, { gateId='124p3LK1', vehicleNo = '浙A616A1', callback, endlessLoop }) {
|
|
try {
|
|
try {
|
|
dispatch('clearOrderInfo');
|
|
dispatch('clearOrderInfo');
|
|
- setTimeout(async () => {
|
|
|
|
- const unlicensed = vehicleNo.indexOf('临') > -1; // true: 临时车牌;false:普通车牌
|
|
|
|
|
|
+ const unlicensed = vehicleNo.indexOf('临') > -1 || !vehicleNo; // true: 临时车牌;false:普通车牌
|
|
// const res = await checkOut('浙A616A1');
|
|
// const res = await checkOut('浙A616A1');
|
|
// const res = await checkOut('闽AAQ5519', unlicensed);
|
|
// const res = await checkOut('闽AAQ5519', unlicensed);
|
|
// const res = await checkOut('粤A51113');
|
|
// const res = await checkOut('粤A51113');
|
|
@@ -165,13 +164,11 @@ const actions = {
|
|
}
|
|
}
|
|
// console.log(vehicleNo, res);
|
|
// console.log(vehicleNo, res);
|
|
// 所有的优惠时间长转为金额
|
|
// 所有的优惠时间长转为金额
|
|
- // console.log(112, '所有的优惠时间长转为金额');
|
|
|
|
|
|
+ console.log(112, '所有的优惠时间长转为金额');
|
|
// dispatch('orderInitRule', checkOutQHResponse);
|
|
// dispatch('orderInitRule', checkOutQHResponse);
|
|
dispatch('orderInitRule', res);
|
|
dispatch('orderInitRule', res);
|
|
- }, 100)
|
|
|
|
-
|
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
- // console.log('151151151151151', error);
|
|
|
|
|
|
+ console.log('151151151151151', error);
|
|
/* if (/NOT_FOUND|PARKING_RECORD_NOT_FOUND/.test(error.code)) {
|
|
/* if (/NOT_FOUND|PARKING_RECORD_NOT_FOUND/.test(error.code)) {
|
|
callback && callback(error)
|
|
callback && callback(error)
|
|
} */
|
|
} */
|
|
@@ -181,7 +178,9 @@ const actions = {
|
|
orderInitRule({ commit, dispatch, state }, checkOutResponse) {
|
|
orderInitRule({ commit, dispatch, state }, checkOutResponse) {
|
|
console.log(119, checkOutResponse);
|
|
console.log(119, checkOutResponse);
|
|
// 记录buildingId
|
|
// 记录buildingId
|
|
- window.localStorage.setItem('buildingId', checkOutResponse.parkInfo.buildingId);
|
|
|
|
|
|
+ if (checkOutResponse?.parkInfo?.buildingId) {
|
|
|
|
+ window.localStorage.setItem('buildingId', checkOutResponse.parkInfo.buildingId);
|
|
|
|
+ }
|
|
commit('setOrderDetail', checkOutResponse);
|
|
commit('setOrderDetail', checkOutResponse);
|
|
const isShowDiscounts = checkOutResponse?.parkingRule?.enableCoupon || false;
|
|
const isShowDiscounts = checkOutResponse?.parkingRule?.enableCoupon || false;
|
|
// 是否展示优惠
|
|
// 是否展示优惠
|
|
@@ -519,6 +518,8 @@ const actions = {
|
|
// 如果是扫码进入的用户,在出场时需要重新扫码,这时会在此处传入的一个回调函数,在获取到临牌时,返回给 qrCodesRule 函数
|
|
// 如果是扫码进入的用户,在出场时需要重新扫码,这时会在此处传入的一个回调函数,在获取到临牌时,返回给 qrCodesRule 函数
|
|
if(res.vehicleNo && callback) {
|
|
if(res.vehicleNo && callback) {
|
|
callback(res.vehicleNo);
|
|
callback(res.vehicleNo);
|
|
|
|
+ } else {
|
|
|
|
+ callback('error');
|
|
}
|
|
}
|
|
} catch (err) {
|
|
} catch (err) {
|
|
console.log(err);
|
|
console.log(err);
|