解锁视频修改更新

This commit is contained in:
GaoHao
2024-12-05 10:25:34 +08:00
parent fb8c9f8431
commit 3bcc491fc2
7 changed files with 292 additions and 253 deletions

View File

@@ -3,7 +3,7 @@
<u-popup v-model="shows" @close="close" :mask-close-able="false" :safe-area-inset-bottom="true" mode="bottom"
border-radius="32" closeable>
<view class="title">购买后继续观看</view>
<view class="money">
<!-- <view class="money">
<view class="money-l flex align-center">
账号余额:
<text>{{moneyNum}}金豆</text>
@@ -15,22 +15,22 @@
解锁价格:
<text>{{payPrice}}金豆</text>
</view>
</view>
<scroll-view scroll-y="true" class="payLists">
</view> -->
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="payList">
<view class="payList-item" @click="current = index" :class="current == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
v-for="(item,index) in wallet" :key="index"> -->
<!-- #ifdef MP-TOUTIAO -->
<view class="payList-item-price">
<!-- <view class="payList-item-price">
{{item.payDiamond}}钻石
</view>
</view> -->
<!-- #endif -->
<!-- #ifndef MP-TOUTIAO -->
<view class="payList-item-price">
<!-- <view class="payList-item-price">
¥{{item.price}}
</view>
</view> -->
<!-- #endif -->
<view class="payList-item-dou">
<!-- <view class="payList-item-dou">
{{item.money}}金豆
</view>
<view class="payList-item-duo" v-if="item.giveMoney>0">
@@ -41,7 +41,7 @@
</view>
</view>
</view>
</scroll-view>
</scroll-view> -->
<!-- 支付类型 -->
<view class="payType">
<view class="payType-item" @tap='selectWay(item)' v-for="(item,index) in openLists" :key="index">
@@ -132,6 +132,10 @@
type: Boolean,
default: true
},
orderId: {
type: Number,
default: null
},
//需要支付的金豆
payPrice: {
type: Number,
@@ -176,55 +180,61 @@
// #endif
// #ifdef APP-PLUS
if (plus.os.name.toLowerCase() === 'android') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
} else {
let checkIosPay = this.$queue.getData('checkIosPay');
if (checkIosPay === '是') {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '苹果',
id: 3
}];
this.openWay = 3;
} else {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}, {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 2;
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
}
];
this.openWay = 1;
let syPaySel = this.$queue.getData('syPaySel')
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = this.$queue.getData('checkIosPay');
// if (checkIosPay === '是') {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '苹果',
// id: 3
// }];
// this.openWay = 3;
// } else {
this.openLists = [
// {
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// },
{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}
];
this.openWay = 1;
let syPaySel = this.$queue.getData('syPaySel')
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
// }
}
// #endif
@@ -240,31 +250,31 @@
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.openLists = [{
image: '/static/images/pay/weixin.png',
text: '微信',
id: 2
}];
this.openWay = 2;
} else {
// if (ua.indexOf('micromessenger') !== -1) {
// this.openLists = [{
// image: '/static/images/pay/weixin.png',
// text: '微信',
// id: 2
// }];
// this.openWay = 2;
// } else {
this.openLists = [{
image: '/static/images/pay/zhifubao.png',
text: '支付宝',
id: 1
}];
this.openWay = 1;
}
// }
let syPaySel = this.$queue.getData('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
// #endif
},
methods: {
@@ -562,28 +572,28 @@
// #endif
} else if (this.openWay == 1) {
console.log(this.orderId)
// APP支付宝支付
// #ifdef APP
this.$Request.postT("/app/aliPay/payMoney", {
classify: 1,
payClassifyId: this.wallet[this.current].payClassifyId,
}).then(ret => {
this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
// this.isCheckPay(ret.code, 'alipay', ret.data);
that.$emit('paySuccess', ret.data)
});
// #endif
// #ifdef H5
let data = {
classify: 2,
payClassifyId: this.wallet[this.current].payClassifyId,
orderId: this.orderId,
}
this.$Request.postT('/app/aliPay/payMoney', data).then(
this.$Request.getT("/app/wuyou/payOrder/"+this.orderId, {}).then(
res => {
if (res.code === 0) {
const div = document.createElement('div')
div.innerHTML = res.data //此处form就是后台返回接收到的数据
document.body.appendChild(div)
document.forms[0].submit()
console.log(res)
that.$emit('paySuccess', res.data)
// const div = document.createElement('div')
// div.innerHTML = res.data //此处form就是后台返回接收到的数据
// document.body.appendChild(div)
// document.forms[0].submit()
} else {
uni.showToast({
icon: 'none',
@@ -601,7 +611,7 @@
this.$Request.postT("/app/ios/insertPayMoneyOrders", data).then(res => {
if (res.code === 0) {
this.iosPayId = res.data.orderId;
this.iphonepay();
// this.iphonepay();
} else {
uni.showToast({
icon: 'none',