修改iOS H5支付

This commit is contained in:
YeMingfei666 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) {
console.log(this.orderId)
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
console.log('paypop payType='+paytype);
// 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)
// this.isCheckPay(ret.code, 'alipay', ret.data);
that.$emit('paySuccess', ret.data)
@ -585,7 +590,7 @@
let data = {
orderId: this.orderId,
}
this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(
this.$Request.getT("/app/wuyou/payOrder/"+ this.orderId+'?payType='+paytype, {}).then(
res => {
if (res.code === 0) {
console.log(res)

View File

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

View File

@ -528,7 +528,19 @@
this.getMyLoveStatus()
this.getMoneyList()
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: {
@ -755,8 +767,13 @@
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
})
} else if (this.openWay == 1) {
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
// 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)
uni.navigateTo({

View File

@ -580,6 +580,16 @@
if (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
// if (res.code == 0 && res.data) {
// this.zhengbu = res.data.value;
@ -699,6 +709,7 @@
// }
// })
this.getScale()
},
onReady() {
// #ifdef MP-WEIXIN || MP-KUAISHOU
@ -1211,6 +1222,8 @@
console.log(data)
// data.h5Url
this.showMoney = false //
uni.setStorageSync('noBuyVideoIndex',this.current)
this.noBuyVideoIndex=this.current
// this.payOrder(this.ordersId, this.payMoney)
// #ifdef APP
uni.navigateTo({
@ -1426,6 +1439,7 @@
},
//
getDataList(id, courseDetailsId, type) {
console.log('getDataList');
let data = {
id,
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
@ -1570,11 +1584,23 @@
this.showPay = true
this.noBuyVideoIndex=this.current
}else{
if(this.noBuyVideoIndex!==null&& this.current==this.noBuyVideoIndex){
uni.navigateTo({
url:'/me/choujaing/choujiang'
console.log('到达判断抽奖');
// if (this.noBuyVideoIndex != null ) {
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));
});
} else if (this.openWay == 1) {
let paytype='h5'
// #ifdef APP
paytype='app'
// #endif
// 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)
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});