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