|
@@ -402,25 +402,27 @@ export function usePay(opt = {}) {
|
|
|
taocanId: options.taocanId, // 套餐ID
|
|
taocanId: options.taocanId, // 套餐ID
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- console.log('res',res);
|
|
|
|
|
|
|
+ console.log('res',res.data);
|
|
|
|
|
+
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
if (res.code == 0 && res.data) {
|
|
if (res.code == 0 && res.data) {
|
|
|
// 完成内购
|
|
// 完成内购
|
|
|
- iapChannel.finishTransaction(data
|
|
|
|
|
|
|
+ console.log('123123123123');
|
|
|
|
|
+ iapChannel.finishTransaction(e
|
|
|
.transactionIdentifier);
|
|
.transactionIdentifier);
|
|
|
// 购买成功
|
|
// 购买成功
|
|
|
console.log('1231231',res);
|
|
console.log('1231231',res);
|
|
|
paySuccessResult();
|
|
paySuccessResult();
|
|
|
} else {
|
|
} else {
|
|
|
console.log('shibai');
|
|
console.log('shibai');
|
|
|
- iapChannel.finishTransaction(data
|
|
|
|
|
|
|
+ iapChannel.finishTransaction(e
|
|
|
.transactionIdentifier);
|
|
.transactionIdentifier);
|
|
|
toast("业务异常,订单支付失败,请联系管理员");
|
|
toast("业务异常,订单支付失败,请联系管理员");
|
|
|
applePayError &&
|
|
applePayError &&
|
|
|
applePayError({
|
|
applePayError({
|
|
|
type: "orderPayApple",
|
|
type: "orderPayApple",
|
|
|
msg: "业务异常,订单支付失败",
|
|
msg: "业务异常,订单支付失败",
|
|
|
- err: 'e',
|
|
|
|
|
|
|
+ err: e,
|
|
|
from: "apple",
|
|
from: "apple",
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|