|
@@ -55,6 +55,7 @@ async function handelPay() {
|
|
}
|
|
}
|
|
// 调微信支付
|
|
// 调微信支付
|
|
function onBridgeReady(obj) {
|
|
function onBridgeReady(obj) {
|
|
|
|
+ var that = this
|
|
WeixinJSBridge.invoke(
|
|
WeixinJSBridge.invoke(
|
|
'getBrandWCPayRequest',
|
|
'getBrandWCPayRequest',
|
|
{
|
|
{
|
|
@@ -71,23 +72,24 @@ function onBridgeReady(obj) {
|
|
},
|
|
},
|
|
function (res) {
|
|
function (res) {
|
|
if (res.err_msg == 'get_brand_wcpay_request:ok') {
|
|
if (res.err_msg == 'get_brand_wcpay_request:ok') {
|
|
|
|
+ orderDetal.value.payStatus = 1
|
|
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
showConfirm({
|
|
showConfirm({
|
|
text: '成功了',
|
|
text: '成功了',
|
|
type: 'warn',
|
|
type: 'warn',
|
|
callback: (val) => {
|
|
callback: (val) => {
|
|
- console.log('我的测试计划', val)
|
|
|
|
|
|
+ handlePayresult()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
console.log('成功了', res)
|
|
console.log('成功了', res)
|
|
} else {
|
|
} else {
|
|
- console.log('失败了', res)
|
|
|
|
|
|
+ orderDetal.value.payStatus = 2
|
|
showConfirm({
|
|
showConfirm({
|
|
text: '失败了',
|
|
text: '失败了',
|
|
type: 'warn',
|
|
type: 'warn',
|
|
callback: (val) => {
|
|
callback: (val) => {
|
|
- console.log('我的测试计划', val)
|
|
|
|
|
|
+ handlePayresult()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -105,7 +107,7 @@ function getDetial() {
|
|
text: res.payStatus === 2 ? '支付失败' : '支付成功',
|
|
text: res.payStatus === 2 ? '支付失败' : '支付成功',
|
|
type: res.payStatus === 2 ? 'err' : 'success',
|
|
type: res.payStatus === 2 ? 'err' : 'success',
|
|
callback: () => {
|
|
callback: () => {
|
|
- handlePayresult(res)
|
|
|
|
|
|
+ handlePayresult()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
return
|
|
return
|
|
@@ -115,7 +117,8 @@ function getDetial() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-function handlePayresult(item){
|
|
|
|
|
|
+function handlePayresult(){
|
|
|
|
+ let item = orderDetal.value
|
|
if(item.orderType == 'incrementOrder'){
|
|
if(item.orderType == 'incrementOrder'){
|
|
location.replace(`/mobile.html#/information`)
|
|
location.replace(`/mobile.html#/information`)
|
|
}else{
|
|
}else{
|