|
|
@ -678,7 +678,7 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else if (this.pay_index == 1) { |
|
|
} else if (this.pay_index == 0) { |
|
|
let data = { |
|
|
let data = { |
|
|
_action: 'payorder', |
|
|
_action: 'payorder', |
|
|
order_id: this.payQuery.order_id, |
|
|
order_id: this.payQuery.order_id, |
|
|
@ -687,7 +687,7 @@ |
|
|
} |
|
|
} |
|
|
defaultRequest2(data).then(res => { |
|
|
defaultRequest2(data).then(res => { |
|
|
console.info(res, '支付') |
|
|
console.info(res, '支付') |
|
|
if (res.error == 1) { |
|
|
if (res.error == 0) { |
|
|
let url = res.data.prepay_data.checkoutnow_url |
|
|
let url = res.data.prepay_data.checkoutnow_url |
|
|
console.log(url) |
|
|
console.log(url) |
|
|
// plus.runtime.openURL(res.data.prepay_data.checkoutnow_url) |
|
|
// plus.runtime.openURL(res.data.prepay_data.checkoutnow_url) |
|
|
@ -699,9 +699,9 @@ |
|
|
} else { |
|
|
} else { |
|
|
defaultRequest2(this.payQuery).then(res => { |
|
|
defaultRequest2(this.payQuery).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
if (res.error == 1) { |
|
|
if (res.error == 0) { |
|
|
//订单对象,从服务器获取 |
|
|
//订单对象,从服务器获取 |
|
|
if (res.data.need_pay_amount == 1) return |
|
|
if (res.data.need_pay_amount == 0) return |
|
|
uni.requestPayment({ |
|
|
uni.requestPayment({ |
|
|
provider: 'alipay', |
|
|
provider: 'alipay', |
|
|
orderInfo: res.data.prepay_data.order_info, //支付宝订单数据 |
|
|
orderInfo: res.data.prepay_data.order_info, //支付宝订单数据 |
|
|
|