|
@@ -120,31 +120,53 @@
|
|
|
deviceNo: this.deviceNo,
|
|
|
jumpUrl: this.jumpUrl,
|
|
|
payeeId: this.payeeId,
|
|
|
- payeeName: this.payeeName
|
|
|
+ payeeName: this.payeeName,
|
|
|
+ pursueType: this.pursueType,
|
|
|
+ sanPay: this.sanPay
|
|
|
};
|
|
|
- this.$u.api
|
|
|
- .payGzbank(params)
|
|
|
- .then((res) => {
|
|
|
+ if (this.exportFlag == true) {
|
|
|
+ this.$u.api.quickPayExportApi(params).then(res => {
|
|
|
if (res.data.needPay) {
|
|
|
let payUrl = res.data.url;
|
|
|
location.href = payUrl;
|
|
|
} else {
|
|
|
this.$refs.uToast.show({
|
|
|
title: '无需支付',
|
|
|
- type: 'info'
|
|
|
+ type: 'info',
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
uni.hideLoading();
|
|
|
- location.reload();
|
|
|
- }, 1000);
|
|
|
+ location.reload()
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
+ }).catch(err => {
|
|
|
this.$refs.uToast.show({
|
|
|
title: err.msg,
|
|
|
- type: 'error'
|
|
|
+ type: 'error',
|
|
|
});
|
|
|
});
|
|
|
+ } else {
|
|
|
+ this.$u.api.payGzbank(params).then(res => {
|
|
|
+ if (res.data.needPay) {
|
|
|
+ let payUrl = res.data.url;
|
|
|
+ location.href = payUrl;
|
|
|
+ } else {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '无需支付',
|
|
|
+ type: 'info',
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ location.reload()
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: err.msg,
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 聚合支付
|
|
@@ -161,39 +183,46 @@
|
|
|
* 微信支付
|
|
|
*/
|
|
|
wechatPay() {
|
|
|
- this.$u.api
|
|
|
- .wechatPayApi({
|
|
|
- orderList: this.curOrderList,
|
|
|
- openid: this.vuex_wxinfo.openId,
|
|
|
- deviceNo: this.deviceNo || undefined,
|
|
|
- payeeId: this.payeeId || undefined,
|
|
|
- payeeName: this.payeeName || undefined
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- $wxPay.wexinPay(res.data.wx).then((res1) => {
|
|
|
- switch (Number(res1.code)) {
|
|
|
- case 0: // 成功
|
|
|
- //#ifdef H5
|
|
|
- window.location.reload();
|
|
|
- //#endif
|
|
|
- break;
|
|
|
- case 1: // 取消
|
|
|
- this.$refs.uToast.show({
|
|
|
- title: '已取消支付',
|
|
|
- type: 'info'
|
|
|
- });
|
|
|
- break;
|
|
|
- case 2: // 支付失败
|
|
|
- this.$refs.uToast.show({
|
|
|
- title: '支付失败,请检查!',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ if (this.exportFlag) {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '停车场暂不支持微信支付!',
|
|
|
+ type: 'warning'
|
|
|
});
|
|
|
+ } else {
|
|
|
+ this.$u.api
|
|
|
+ .wechatPayApi({
|
|
|
+ orderList: this.curOrderList,
|
|
|
+ openid: this.vuex_wxinfo.openId,
|
|
|
+ deviceNo: this.deviceNo || undefined,
|
|
|
+ payeeId: this.payeeId || undefined,
|
|
|
+ payeeName: this.payeeName || undefined
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ $wxPay.wexinPay(res.data.wx).then((res1) => {
|
|
|
+ switch (Number(res1.code)) {
|
|
|
+ case 0: // 成功
|
|
|
+ //#ifdef H5
|
|
|
+ window.location.reload();
|
|
|
+ //#endif
|
|
|
+ break;
|
|
|
+ case 1: // 取消
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '已取消支付',
|
|
|
+ type: 'info'
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ case 2: // 支付失败
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '支付失败,请检查!',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 直接通过后台获取贵阳银行微信支付地址
|
|
@@ -203,33 +232,47 @@
|
|
|
getWXPayByJava(orderList, deviceNo) {
|
|
|
let params = {
|
|
|
orderList: orderList,
|
|
|
- openid: '',
|
|
|
+ openid: this.vuex_wxinfo.openId,
|
|
|
jumpUrl: this.jumpUrl,
|
|
|
deviceNo: deviceNo ? deviceNo : null,
|
|
|
payeeId: this.payeeId,
|
|
|
- payeeName: this.payeeName
|
|
|
+ payeeName: this.payeeName,
|
|
|
+ pursueType: this.pursueType,
|
|
|
+ sanPay: this.sanPay
|
|
|
};
|
|
|
- this.$u.api
|
|
|
- .ordinaryWxPay(params)
|
|
|
- .then((res) => {
|
|
|
- if (res.code === 200) {
|
|
|
- // if (getEnvIsWx()) {
|
|
|
- // location.href = res.data.qrCodeUrl + '&jump_url=' + encodeURIComponent(this.jumpUrl)
|
|
|
- // } else {
|
|
|
- // location.href = res.data.qrCodeUrl
|
|
|
- // }
|
|
|
- localStorage.setItem('jumpUrl', this.jumpUrl);
|
|
|
- location.href = res.data.qrCodeUrl;
|
|
|
- } else {
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- title: '无法调起微信支付!',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- });
|
|
|
+ if (this.exportFlag) {
|
|
|
+ this.$u.api.polyPayExportApi(params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ localStorage.setItem('jumpUrl', this.jumpUrl)
|
|
|
+ location.href = res.data.qrCodeUrl
|
|
|
+ } else {
|
|
|
+ uni.hideLoading();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '无法调起微信支付!',
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$u.api.ordinaryWxPay(params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ localStorage.setItem('jumpUrl', this.jumpUrl)
|
|
|
+ location.href = res.data.qrCodeUrl
|
|
|
+ } else {
|
|
|
+ uni.hideLoading();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '无法调起微信支付!',
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 关闭弹框
|