微调
This commit is contained in:
@@ -17,14 +17,13 @@ var iap = {
|
||||
console.log('检测支付通道')
|
||||
plus.payment.getChannels(async (channels) => {
|
||||
for (var i in channels) {
|
||||
console.log("channels",channels, );
|
||||
// 判断是否苹果支付1
|
||||
if (channels[i].id === "appleiap") {
|
||||
console.log("存在苹果内购channels",channels, );
|
||||
that.iapChannel = channels[i];
|
||||
// 先检测有没有未完成的订单
|
||||
that.restoreComplateRequest()
|
||||
}else{
|
||||
console.log('安卓客户端');
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -50,7 +49,7 @@ var iap = {
|
||||
// return false
|
||||
// 已经支付,但是没有走逻辑的内购订单 就发给后台做验证
|
||||
that.iapCheck(item, index)
|
||||
// that.finishTransaction(item)
|
||||
// that.finishTransaction(item)
|
||||
} else {
|
||||
// 其他状态的内购订单
|
||||
that.finishTransaction(item)
|
||||
@@ -110,6 +109,21 @@ var iap = {
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log('后台验证失败=>',e);
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
cancelColor:'#0081ff',
|
||||
content: `您的账户下存在验证异常的订单(订单编号为:${e.data.orderId}),可尝试稍后重启app,如不能解决您的问题,可联系官方客服`,
|
||||
cancelText:'已验证关闭订单',
|
||||
confirmText:'知道了',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
console.log("用户点击确定");
|
||||
}else{
|
||||
console.log('点了取消')
|
||||
that.finishTransaction(result);
|
||||
}
|
||||
},
|
||||
});
|
||||
// that.finishTransaction(result);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user