修改iOS H5支付

This commit is contained in:
2024-12-14 10:30:16 +08:00
parent e822e614b8
commit 4b9d78ec5a
5 changed files with 62 additions and 10 deletions

View File

@@ -573,9 +573,14 @@
} else if (this.openWay == 1) { } else if (this.openWay == 1) {
console.log(this.orderId) console.log(this.orderId)
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
console.log('paypop payType='+paytype);
// APP支付宝支付 // APP支付宝支付
// #ifdef APP // #ifdef APP
this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(ret => { this.$Request.getT("/app/wuyou/payOrder/"+ this.orderId+'?payType='+paytype,{}).then(ret => {
console.log(ret) console.log(ret)
// this.isCheckPay(ret.code, 'alipay', ret.data); // this.isCheckPay(ret.code, 'alipay', ret.data);
that.$emit('paySuccess', ret.data) that.$emit('paySuccess', ret.data)
@@ -585,7 +590,7 @@
let data = { let data = {
orderId: this.orderId, orderId: this.orderId,
} }
this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then( this.$Request.getT("/app/wuyou/payOrder/"+ this.orderId+'?payType='+paytype, {}).then(
res => { res => {
if (res.code === 0) { if (res.code === 0) {
console.log(res) console.log(res)

View File

@@ -2,8 +2,8 @@
"name" : "斯耀短剧", "name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1", "appid" : "__UNI__E0B05B1",
"description" : "", "description" : "",
"versionName" : "1.0.4", "versionName" : "1.0.5",
"versionCode" : 104, "versionCode" : 105,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@@ -528,7 +528,19 @@
this.getMyLoveStatus() this.getMyLoveStatus()
this.getMoneyList() this.getMoneyList()
this.getMyMoney() this.getMyMoney()
}else{
if(e.allId){
const arr=e.allId.split('-')
this.courseId = arr[0];
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
} }
}, },
methods: { methods: {
@@ -755,8 +767,13 @@
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data)); this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
}) })
} else if (this.openWay == 1) { } else if (this.openWay == 1) {
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
// APP支付宝支付 // APP支付宝支付
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId, {}).then(ret => { console.log('nvue payType='+paytype);
httpsRequest.getT("/app/wuyou/payOrder/" + this.ordersId+'?payType='+paytype, {}).then(ret => {
// plus.runtime.openURL(ret.data.h5Url) // plus.runtime.openURL(ret.data.h5Url)
uni.navigateTo({ uni.navigateTo({

View File

@@ -580,6 +580,16 @@
if (e.tt_episode_id) { if (e.tt_episode_id) {
this.tt_episode_id = e.tt_episode_id this.tt_episode_id = e.tt_episode_id
} }
if(e.allId){
const arr=e.allId.split('-')
this.courseId = arr[0];
if (arr[1] && arr[1] != 'null') {
this.courseDetailsId = arr[1]
}
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
}
// this.$u.get('/app/common/type/817').then(res => { //是否开启购买整部视频 817 // this.$u.get('/app/common/type/817').then(res => { //是否开启购买整部视频 817
// if (res.code == 0 && res.data) { // if (res.code == 0 && res.data) {
// this.zhengbu = res.data.value; // this.zhengbu = res.data.value;
@@ -699,6 +709,7 @@
// } // }
// }) // })
this.getScale() this.getScale()
}, },
onReady() { onReady() {
// #ifdef MP-WEIXIN || MP-KUAISHOU // #ifdef MP-WEIXIN || MP-KUAISHOU
@@ -1211,6 +1222,8 @@
console.log(data) console.log(data)
// data.h5Url 跳转地址 // data.h5Url 跳转地址
this.showMoney = false //显示充值弹窗 this.showMoney = false //显示充值弹窗
uni.setStorageSync('noBuyVideoIndex',this.current)
this.noBuyVideoIndex=this.current
// this.payOrder(this.ordersId, this.payMoney) // this.payOrder(this.ordersId, this.payMoney)
// #ifdef APP // #ifdef APP
uni.navigateTo({ uni.navigateTo({
@@ -1426,6 +1439,7 @@
}, },
// 资源详情 // 资源详情
getDataList(id, courseDetailsId, type) { getDataList(id, courseDetailsId, type) {
console.log('getDataList');
let data = { let data = {
id, id,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : '' token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
@@ -1570,11 +1584,23 @@
this.showPay = true this.showPay = true
this.noBuyVideoIndex=this.current this.noBuyVideoIndex=this.current
}else{ }else{
if(this.noBuyVideoIndex!==null&& this.current==this.noBuyVideoIndex){ console.log('到达判断抽奖');
uni.navigateTo({ // if (this.noBuyVideoIndex != null ) {
url:'/me/choujaing/choujiang' console.log(this.noBuyVideoIndex);
if (this.noBuyVideoIndex !== null&&this.noBuyVideoIndex !== undefined&&this.noBuyVideoIndex !=='' && this.videoList[this
.noBuyVideoIndex].videoUrl) {
this.$Request.getT('app/discSpinning/drawCount').then(res => {
console.log('转盘抽奖次数')
if (res.count >= 1) {
uni.navigateTo({
url: '/me/choujiang/choujiang'
})
}else{
}
}) })
} uni.removeStorageSync('noBuyVideoIndex')
this.noBuyVideoIndex = null
}
} }
}) })

View File

@@ -691,8 +691,12 @@
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data)); this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
}); });
} else if (this.openWay == 1) { } else if (this.openWay == 1) {
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
// APP支付宝支付 // APP支付宝支付
httpsRequest.getT("/app/wuyou/payOrder/"+this.ordersId, {}).then(ret => { httpsRequest.getT("/app/wuyou/payOrder/"+ this.ordersId+'?payType='+paytype, {}).then(ret => {
plus.runtime.openURL(ret.data.h5Url) plus.runtime.openURL(ret.data.h5Url)
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data)); // this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
}); });