|
@@ -91,12 +91,13 @@
|
|
|
* 最后再调起微信支付
|
|
|
* */
|
|
|
wechatPay() {
|
|
|
- const openId = this.$store.state.vuex_wxinfo.openId
|
|
|
- if (openId) {
|
|
|
- this.getWXPay(this.curOrderList, this.deviceNo)
|
|
|
- } else {
|
|
|
- this.getCode()
|
|
|
- }
|
|
|
+ // const openId = this.$store.state.vuex_wxinfo.openId
|
|
|
+ // if (openId) {
|
|
|
+ // this.getWXPay(this.curOrderList, this.deviceNo)
|
|
|
+ // } else {
|
|
|
+ // this.getCode()
|
|
|
+ // }
|
|
|
+ this.getWXPayByJava(this.curOrderList, this.deviceNo)
|
|
|
},
|
|
|
/**
|
|
|
* 调起微信支付接口
|
|
@@ -132,6 +133,36 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 直接通过后台获取贵阳银行微信支付地址
|
|
|
+ * @param {Array} list 需要支付的订单组合数组
|
|
|
+ * @param {Number} deviceNo 设备编号(在停车锁部分需要)
|
|
|
+ * */
|
|
|
+ getWXPayByJava(orderList, deviceNo) {
|
|
|
+ let params = {
|
|
|
+ orderList: orderList,
|
|
|
+ openid: '',
|
|
|
+ jumpUrl: window.location.href,
|
|
|
+ deviceNo: deviceNo ? deviceNo : null
|
|
|
+ };
|
|
|
+ this.$u.api.ordinaryWxPay(params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ location.href = res.data.qrCodeUrl
|
|
|
+ } else {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: res.msg,
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: '无法调起微信支付!',
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 获取code
|
|
|
* 1 微信登录获取code
|