恢复h5全剧购买和10集购买代码
This commit is contained in:
@@ -198,7 +198,19 @@
|
||||
<view class="" style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin-bottom: 20rpx;">
|
||||
{{getRedEnvelopeTips}}
|
||||
</view>
|
||||
|
||||
|
||||
<view class="list-item" v-if="info&&info.price" >
|
||||
<view class="list-item-box flex align-center justify-center" @click="payVideo(2,'all')">
|
||||
<image src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
{{info.price}}元解锁全剧
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item" v-if="info&&info.wholesalePrice">
|
||||
<view class="list-item-box flex align-center justify-center" @click="payVideo(2,10)">
|
||||
<image src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
{{info.wholesalePrice}}元解锁10集视频
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
@@ -1260,7 +1272,7 @@
|
||||
* 1:购买整部视频
|
||||
* 2:购买单集视频
|
||||
*/
|
||||
payVideo(type) {
|
||||
payVideo(type, num) {
|
||||
if(!this.isOrder){
|
||||
return;
|
||||
}
|
||||
@@ -1275,7 +1287,7 @@
|
||||
return
|
||||
}
|
||||
// #endif
|
||||
this.submitPay(type)
|
||||
this.submitPay(type, num)
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
@@ -1305,13 +1317,17 @@
|
||||
this.showMoney = data
|
||||
},
|
||||
//使用金币购买
|
||||
submitPay(type) {
|
||||
submitPay(type, num) {
|
||||
let data = {
|
||||
courseId: this.courseId
|
||||
}
|
||||
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
this.$Request.getT('/app/order/insertCourseOrders', data).then(res => {
|
||||
if (!num) {
|
||||
console.log('进入num');
|
||||
//单集解锁
|
||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||
}
|
||||
this.$Request.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
|
||||
'/app/order/insertCourseOrders', data).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.ordersId = res.data.orders.ordersId //记录订单id
|
||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||
|
||||
Reference in New Issue
Block a user