|
@@ -83,6 +83,9 @@ export default {
|
|
|
appId: state => state.appId,
|
|
|
source: state => state.source,
|
|
|
}),
|
|
|
+ isNoLogin() {
|
|
|
+ return JSON.stringify(this.member) === '{}' || !this.member
|
|
|
+ },
|
|
|
// 支付按钮状态
|
|
|
payBtnDisabled() {
|
|
|
// 当存在待支付金额 或者 用户登陆
|
|
@@ -122,11 +125,12 @@ export default {
|
|
|
methods: {
|
|
|
// 前往支付
|
|
|
async toPay() {
|
|
|
+ if (this.btnLoading) return
|
|
|
this.btnLoading = true
|
|
|
setTimeout(() => {
|
|
|
if ( this.btnLoading && !this.isPay ) {
|
|
|
const toast1 = Toast({
|
|
|
- message: '操作异常,返回上一页后请重试!',
|
|
|
+ message: '网络连接失败,请重试',
|
|
|
duration: 3000,
|
|
|
onClose: () => {
|
|
|
this.$router.replace({
|
|
@@ -137,7 +141,7 @@ export default {
|
|
|
});
|
|
|
this.btnLoading = false
|
|
|
}
|
|
|
- }, 7000)
|
|
|
+ }, 10000)
|
|
|
const { parkingRecord, discountInfo = {}, parkingRule = {}} = this.orderDetail;
|
|
|
const { coupons, points, memberGrade = [], paperCoupons = [], consume = [] } = discountInfo
|
|
|
const { hourPrice } = parkingRule
|
|
@@ -242,8 +246,17 @@ export default {
|
|
|
}
|
|
|
this.kerryPayment(res.sessionId);
|
|
|
} catch (err) {
|
|
|
- this.btnLoading = false
|
|
|
- this.isPay = false
|
|
|
+ if(err ==='ERR_NETWORK') {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.replace({
|
|
|
+ // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
|
|
|
+ path: 'home',
|
|
|
+ });
|
|
|
+ }, 2900)
|
|
|
+ } else {
|
|
|
+ this.btnLoading = false
|
|
|
+ this.isPay = false
|
|
|
+ }
|
|
|
console.log(err);
|
|
|
}
|
|
|
},
|
|
@@ -335,7 +348,17 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- console.log(1854, err);
|
|
|
+ if(err.code === "ERR_NETWORK") {
|
|
|
+ this.btnLoading = true;
|
|
|
+ uni.showToast({ title: '网络连接失败,请重试', duration: 3000, icon: 'fail' });
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.replace({
|
|
|
+ // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
|
|
|
+ path: 'home',
|
|
|
+ });
|
|
|
+ }, 2900)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.reCreateParkOrder();
|
|
|
});
|
|
|
},
|