解锁视频修改更新

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

@@ -144,23 +144,23 @@
</view>
</view>
<view class="pay-content">
<view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<!-- <view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
{{zongPrice}}金币解锁整部视频
</text>
</view>
</view> -->
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
<text class="pay-content-items">
{{countPrice}}金币解锁单集视频
{{countPrice}}解锁单集视频
</text>
</view>
<view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
开通会员
</text>
</view>
</view> -->
</view>
</view>
@@ -188,7 +188,7 @@
src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
<!-- 余额 -->
<view class="popuppay-money">
<!-- <view class="popuppay-money">
<view class="popuppay-money-l">
<text class="popuppay-money-l-ye">
账号余额:
@@ -208,9 +208,9 @@
{{payPrice}}金币
</text>
</view>
</view>
</view> -->
<!-- 充值类型列表 -->
<scroll-view scroll-y="true" class="payLists">
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
@@ -237,7 +237,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">
@@ -395,25 +395,28 @@
this.moneyTips = uni.getStorageSync('moneyTips')
// #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;
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 = uni.getStorageSync('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)
// }
} else {
let checkIosPay = uni.getStorageSync('checkIosPay');
if (checkIosPay === '是') {
@@ -424,29 +427,38 @@
}];
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 = 2;
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 = uni.getStorageSync('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
this.$nextTick(()=>{
this.closePopusPay()
})
if(this.courseId){
this.getDataList(this.courseId, this.courseDetailsId);
}
},
onLoad(e) {
//是开启整部购买
@@ -474,7 +486,6 @@
if (e.courseDetailsId && e.courseDetailsId != 'null') {
this.courseDetailsId = e.courseDetailsId
}
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
@@ -633,15 +644,12 @@
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => {
this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
})
} else if (this.openWay == 1) {
// APP支付宝支付
httpsRequest.postT("/app/aliPay/payMoney", {
classify: 1,
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
httpsRequest.getT("/app/wuyou/payOrder/"+this.ordersId, {}).then(ret => {
plus.runtime.openURL(ret.data.h5Url)
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
} else if (this.openWay == 3) {
let userId = uni.getStorageSync('userId');
@@ -865,7 +873,11 @@
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
uni.showToast({
title: res.msg,

View File

@@ -194,32 +194,32 @@
<!-- <u-icon name="lock" class="list-title-icon" color="#efbb6b" size="40"></u-icon> -->
当前视频 没有播放权限
</view>
<view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
<!-- <view class="list-item" v-if="zhengbu === '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
{{zongPrice}}金豆解锁整部视频
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(解锁后永久有效)
<!-- #endif -->
#ifdef MP-TOUTIAO || MP-WEIXIN-->
<!-- (解锁后永久有效) -->
<!-- #endif
</view>
</view>
</view> -->
<view class="list-item" v-if="danbu === '是' && isWxIosPay == true">
<view class="list-item-box" @click="payVideo(2)">
{{countPrice}}金豆解锁单集视频
{{countPrice}}解锁单集视频
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(解锁后永久有效)
<!-- #endif -->
</view>
</view>
<view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
<!-- <view class="list-item" v-if="isVips == '是' && isWxIosPay == true">
<view class="list-item-box flex align-center justify-center" @click="goNav('/pages/me/vip/index')">
<image src="../../static/images/me/rmIcon.png" mode=""></image>
开通会员
<!-- #ifdef MP-TOUTIAO || MP-WEIXIN-->
(会员期内免费观看)
<!-- #endif -->
#ifdef MP-TOUTIAO || MP-WEIXIN-->
<!-- (会员期内免费观看) -->
<!-- #endif
</view>
</view>
</view> -->
<!-- #ifdef MP-WEIXIN -->
<view class="list-item" v-if="isGuanggao == '是'&& adUnitId && advertising">
<view class="list-item-box" @click="openVideoAd()">
@@ -250,7 +250,7 @@
</view>
</u-popup>
<!-- 充值购买弹窗 -->
<payPopus v-if="showMoney" :payPrice="payPrice" :show="showMoney" @closeMoney="closeMoney"
<payPopus v-if="showMoney" :payPrice="payPrice" :orderId="ordersId" :show="showMoney" @closeMoney="closeMoney"
@paySuccess="paySuccess" />
<!-- #ifdef H5 -->
@@ -308,7 +308,6 @@
checked: false,
payPrice: 0, //需要支付的价格
showMoney: false, //是否显示充值弹窗
showPay: false,
dyCourseId: '',
nowBs: 1, //当前倍速
subList: [{
@@ -519,7 +518,6 @@
this.courseDetailsId = e.courseDetailsId
}
console.log(this.courseDetailsId, '跳转进来的id')
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
}
if (e.tt_album_id) {
@@ -528,7 +526,7 @@
if (e.tt_episode_id) {
this.tt_episode_id = e.tt_episode_id
}
console.log(1)
// this.$u.get('/app/common/type/817').then(res => { //是否开启购买整部视频 817
// if (res.code == 0 && res.data) {
// this.zhengbu = res.data.value;
@@ -622,6 +620,10 @@
}
// #endif
this.isVips = uni.getStorageSync('isVips') ? uni.getStorageSync('isVips') : '否'
console.log(2)
if(this.courseId){
this.getDataList(this.courseId, this.courseDetailsId);
}
// uni.$on('back', (data) => {
// if (data.flag == true) {
@@ -1100,8 +1102,14 @@
},
//子组件支付成功的回调
paySuccess() {
this.payOrder(this.ordersId, this.payMoney)
paySuccess(data) {
console.log(data)
// data.h5Url 跳转地址
this.showMoney = false //显示充值弹窗
// this.payOrder(this.ordersId, this.payMoney)
// #ifdef H5
window.open(data.h5Url)
// #endif
},
//自组件关闭的回调
closeMoney(data) {
@@ -1120,7 +1128,10 @@
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
this.showPay = false //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.showMoney = true //显示充值弹窗
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
uni.showToast({
title: res.msg,

View File

@@ -142,23 +142,23 @@
</view>
</view>
<view class="pay-content">
<view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<!-- <view class="pay-content-item" @click="payVideo(1)" v-if="zhengbu === '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
{{zongPrice}}金豆解锁整部视频
</text>
</view>
</view> -->
<view class="pay-content-item" @click="payVideo(2)" v-if="danbu === '是'">
<text class="pay-content-items">
{{countPrice}}金豆解锁单集视频
{{countPrice}}解锁单集视频
</text>
</view>
<view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<!-- <view class="pay-content-item" @click="goNav('/pages/me/vip/index')" v-if="isVips == '是'">
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
<text class="pay-content-items">
开通会员
</text>
</view>
</view> -->
</view>
</view>
@@ -186,7 +186,7 @@
src="../../static/images/me/closeIconss.png" mode=""></image>
</view>
<!-- 余额 -->
<view class="popuppay-money">
<!-- <view class="popuppay-money">
<view class="popuppay-money-l">
<text class="popuppay-money-l-ye">
账号余额:
@@ -206,9 +206,9 @@
{{payPrice}}金豆
</text>
</view>
</view>
</view> -->
<!-- 充值类型列表 -->
<scroll-view scroll-y="true" class="payLists">
<!-- <scroll-view scroll-y="true" class="payLists">
<view class="popuppay-payList">
<view class="payList-item" @click="wallCurr = index" :class="wallCurr == index?'activePrice':''"
v-for="(item,index) in wallet" :key="index">
@@ -235,7 +235,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">
@@ -396,58 +396,71 @@
this.moneyTips = uni.getStorageSync('moneyTips')
// #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 = uni.getStorageSync('syPaySel')
if (syPaySel === '是') {
let openListsItem = {
image: '/static/images/pay/shouyi.png',
text: '收益余额',
id: 4
};
this.openLists.push(openListsItem)
}
} else {
let checkIosPay = uni.getStorageSync('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;
},
];
this.openWay = 1;
let syPaySel = uni.getStorageSync('syPaySel')
// if (syPaySel === '是') {
// let openListsItem = {
// image: '/static/images/pay/shouyi.png',
// text: '收益余额',
// id: 4
// };
// this.openLists.push(openListsItem)
// }
} else {
let checkIosPay = uni.getStorageSync('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 = uni.getStorageSync('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
this.$nextTick(()=>{
this.closePopusPay()
})
if(this.courseId){
this.getDataList(this.courseId, this.courseDetailsId);
}
},
onLoad(e) {
let that = this
@@ -472,7 +485,6 @@
if (e.courseDetailsId) {
this.courseDetailsId = e.courseDetailsId;
}
this.getDataList(this.courseId, this.courseDetailsId);
this.getMyLoveStatus()
this.getMoneyList()
this.getMyMoney()
@@ -621,12 +633,9 @@
});
} else if (this.openWay == 1) {
// APP支付宝支付
httpsRequest.postT("/app/aliPay/payMoney", {
classify: 1,
payClassifyId: this.wallet[this.wallCurr].payClassifyId,
}).then(ret => {
console.log(ret)
this.isCheckPay(ret.code, 'alipay', ret.data);
httpsRequest.getT("/app/wuyou/payOrder/"+this.ordersId, {}).then(ret => {
plus.runtime.openURL(ret.data.h5Url)
// this.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
});
} else if (this.openWay == 3) {
let userId = uni.getStorageSync('userId');
@@ -868,7 +877,12 @@
if (res.code == 0) {
this.ordersId = res.data.orders.ordersId //记录订单id
this.payMoney = res.data.orders.payMoney //记录订单价格
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
this.closePay() //关闭购买选择弹窗
this.payPrice = res.data.orders.payMoney //需要支付的价格
this.openPopusPay() //显示充值弹窗
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
} else {
uni.showToast({
title: res.msg,