修复转盘跳转问题,金币支付不出现支付宝确认弹窗
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"playground" : "standard",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
async function payOrder(data) {
|
||||
const res = await Api.payOrder(data)
|
||||
if (res) {
|
||||
uni.setStorageSync('nobuyCourseId', popup.data.courseId)
|
||||
uni.setStorageSync('nobuyCourseId', popup.data.courseDetailsId)
|
||||
// #ifdef APP
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?orderId=' + data.orderId + '&url=' + res.h5Url
|
||||
@@ -375,10 +375,13 @@
|
||||
}
|
||||
//确认支付
|
||||
async function payConfirm() {
|
||||
const [type, num] = popup.payType.split('-');
|
||||
if(type!='gold'){
|
||||
if (!isAgree.value) {
|
||||
return infoBox.showToast('请阅读并同意 《付费须知说明》')
|
||||
}
|
||||
const [type, num] = popup.payType.split('-');
|
||||
}
|
||||
|
||||
console.log(type, num);
|
||||
let data = {
|
||||
courseId: popup.data.courseId
|
||||
@@ -388,6 +391,13 @@
|
||||
}
|
||||
|
||||
const res = num == '10' ? await Api.buyTenVideo(data) : await Api.buyVideo(data)
|
||||
console.log(res);
|
||||
if(!res.orders){
|
||||
return uni.showToast({
|
||||
title:'创建订单失败',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
if (res) {
|
||||
if (type == 'gold') {
|
||||
goldPay({
|
||||
@@ -409,6 +419,9 @@
|
||||
function payBtnClick(type, num) {
|
||||
console.log(type, num);
|
||||
popup.payType = `${type}-${num}`
|
||||
if(type=='gold'){
|
||||
return payConfirm()
|
||||
}
|
||||
popupClose('show')
|
||||
popupShow('payTips')
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
const nobuyCourseId = uni.getStorageSync('nobuyCourseId')
|
||||
const item = state.list.find(v => v.courseId == nobuyCourseId)
|
||||
uni.removeStorageSync('nobuyCourseId')
|
||||
if(item){
|
||||
if (drawRes.count * 1 > 0 && nobuyCourseId !== null && nobuyCourseId !== undefined && item
|
||||
.videoUrl) {
|
||||
uni.navigateTo({
|
||||
@@ -88,6 +89,8 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user