style:根据不同浏览器环境 判断对应支付方式
This commit is contained in:
parent
cfb13dae85
commit
4632930025
|
@ -589,7 +589,6 @@
|
||||||
|
|
||||||
//根据环境去执行
|
//根据环境去执行
|
||||||
payWayRun (result) {
|
payWayRun (result) {
|
||||||
console.log(391, this.payType);
|
|
||||||
if (this.payType == 1) {// 1微信支付 2 支付宝支付
|
if (this.payType == 1) {// 1微信支付 2 支付宝支付
|
||||||
if (isWx()) {
|
if (isWx()) {
|
||||||
|
|
||||||
|
@ -599,7 +598,6 @@
|
||||||
}
|
}
|
||||||
if (this.payType == 2) {// 1微信支付 2 支付宝支付
|
if (this.payType == 2) {// 1微信支付 2 支付宝支付
|
||||||
if (isWx()) {
|
if (isWx()) {
|
||||||
this.openErrorDialog(`请在其他浏览器打开链接`, '点击复制')
|
|
||||||
this.href = result;
|
this.href = result;
|
||||||
} else {
|
} else {
|
||||||
window.location.href = result;
|
window.location.href = result;
|
||||||
|
|
|
@ -233,7 +233,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 去支付 */
|
/* 去支付 */
|
||||||
payFunction ({ payType, isSupport }) {
|
payFunction ({ payType }) {
|
||||||
/* payType 1:微信 2:支付宝 */
|
/* payType 1:微信 2:支付宝 */
|
||||||
/* 后端 微信是5 */
|
/* 后端 微信是5 */
|
||||||
this.active = payType === 2 ? 1 : 5
|
this.active = payType === 2 ? 1 : 5
|
||||||
|
@ -250,16 +250,16 @@
|
||||||
|
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
this.getOrderList()
|
this.getOrderList()
|
||||||
this.payRealFunction(isSupport)
|
this.payRealFunction()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.payRealFunction(isSupport)
|
this.payRealFunction()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* 调用支付 */
|
/* 调用支付 */
|
||||||
payRealFunction (isSupport) {
|
payRealFunction () {
|
||||||
req.axiosGet(`/key/coupon/createPay/${this.activeOrder.order_number}`, { token: localStorage.getItem('token') }).then(({ code, data, message }) => {
|
req.axiosGet(`/key/coupon/createPay/${this.activeOrder.order_number}`, { token: localStorage.getItem('token') }).then(({ code, data, message }) => {
|
||||||
if (code === 403) {
|
if (code === 403) {
|
||||||
this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true })
|
this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true })
|
||||||
|
@ -267,17 +267,10 @@
|
||||||
return this.redirect = true
|
return this.redirect = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 支付宝跳转链接 */
|
/* 跳转链接 */
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
/* 判断浏览器 */
|
|
||||||
if (isSupport) {
|
|
||||||
this.popFunction({ title: '温馨提示', text: `请在其他浏览器打开链接`, status: 2, b_text: '点击复制', show: true })
|
|
||||||
this.href = data
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
window.location.href = data
|
window.location.href = data
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue