|
@@ -83,6 +83,9 @@ export default {
|
|
appId: state => state.appId,
|
|
appId: state => state.appId,
|
|
source: state => state.source,
|
|
source: state => state.source,
|
|
}),
|
|
}),
|
|
|
|
+ isNoLogin() {
|
|
|
|
+ return JSON.stringify(this.member) === '{}' || !this.member
|
|
|
|
+ },
|
|
// 支付按钮状态
|
|
// 支付按钮状态
|
|
payBtnDisabled() {
|
|
payBtnDisabled() {
|
|
// 当存在待支付金额 或者 用户登陆
|
|
// 当存在待支付金额 或者 用户登陆
|
|
@@ -122,11 +125,12 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 前往支付
|
|
// 前往支付
|
|
async toPay() {
|
|
async toPay() {
|
|
|
|
+ if (this.btnLoading) return
|
|
this.btnLoading = true
|
|
this.btnLoading = true
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
if ( this.btnLoading && !this.isPay ) {
|
|
if ( this.btnLoading && !this.isPay ) {
|
|
const toast1 = Toast({
|
|
const toast1 = Toast({
|
|
- message: '操作异常,返回上一页后请重试!',
|
|
|
|
|
|
+ message: '网络连接失败,请重试',
|
|
duration: 3000,
|
|
duration: 3000,
|
|
onClose: () => {
|
|
onClose: () => {
|
|
this.$router.replace({
|
|
this.$router.replace({
|
|
@@ -137,7 +141,7 @@ export default {
|
|
});
|
|
});
|
|
this.btnLoading = false
|
|
this.btnLoading = false
|
|
}
|
|
}
|
|
- }, 7000)
|
|
|
|
|
|
+ }, 10000)
|
|
const { parkingRecord, discountInfo = {}, parkingRule = {}} = this.orderDetail;
|
|
const { parkingRecord, discountInfo = {}, parkingRule = {}} = this.orderDetail;
|
|
const { coupons, points, memberGrade = [], paperCoupons = [], consume = [] } = discountInfo
|
|
const { coupons, points, memberGrade = [], paperCoupons = [], consume = [] } = discountInfo
|
|
const { hourPrice } = parkingRule
|
|
const { hourPrice } = parkingRule
|
|
@@ -244,6 +248,14 @@ export default {
|
|
} catch (err) {
|
|
} catch (err) {
|
|
this.btnLoading = false
|
|
this.btnLoading = false
|
|
this.isPay = false
|
|
this.isPay = false
|
|
|
|
+ if(err ==='ERR_NETWORK') {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$router.replace({
|
|
|
|
+ // path: 'parkingFeeSuccess?carno=' + this.parkInfo.carno,
|
|
|
|
+ path: 'home',
|
|
|
|
+ });
|
|
|
|
+ }, 2900)
|
|
|
|
+ }
|
|
console.log(err);
|
|
console.log(err);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -268,7 +280,8 @@ export default {
|
|
// console.log(1854, params);
|
|
// console.log(1854, params);
|
|
this.$md(params);
|
|
this.$md(params);
|
|
// let path = `/profileApi/payment/v1/services/session/${session}/transactions`;
|
|
// let path = `/profileApi/payment/v1/services/session/${session}/transactions`;
|
|
- let path = `${window.profileApi}/payment/v1/services/session/${session}/transactions`;
|
|
|
|
|
|
+ // let path = `${window.profileApi}/payment/v1/services/session/${session}/transactions`;
|
|
|
|
+ let path = `https://11111111111/payment/v1/services/session/${session}/transactions`;
|
|
this.$request({
|
|
this.$request({
|
|
url: path,
|
|
url: path,
|
|
data: params,
|
|
data: params,
|