增加10集和全剧解锁
This commit is contained in:
@@ -150,6 +150,18 @@
|
|||||||
{{getRedEnvelopeTips}}
|
{{getRedEnvelopeTips}}
|
||||||
</text>
|
</text>
|
||||||
<view class="pay-content" >
|
<view class="pay-content" >
|
||||||
|
<view class="pay-content-item" v-if="info&&info.price" @click="payVideo(2,'all')">
|
||||||
|
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||||
|
<text class="pay-content-items">
|
||||||
|
{{info.price}}元解锁全剧
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="pay-content-item" v-if="info&&info.wholesalePrice" @click="payVideo(2,10)">
|
||||||
|
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||||
|
<text class="pay-content-items">
|
||||||
|
{{info.wholesalePrice}}元解锁10集视频
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
<view class="pay-content-item" @click="payVideo(1)">
|
<view class="pay-content-item" @click="payVideo(1)">
|
||||||
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||||
<text class="pay-content-items">
|
<text class="pay-content-items">
|
||||||
@@ -1025,9 +1037,9 @@
|
|||||||
* 1:购买整部视频
|
* 1:购买整部视频
|
||||||
* 2:购买单集视频
|
* 2:购买单集视频
|
||||||
*/
|
*/
|
||||||
payVideo(type) {
|
payVideo(type,num) {
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
this.submitPay(type)
|
this.submitPay(type,num)
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login/login"
|
url: "/pages/login/login"
|
||||||
@@ -1035,13 +1047,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//使用金币购买
|
//使用金币购买
|
||||||
submitPay(type) {
|
submitPay(type,num) {
|
||||||
let data = {
|
let data = {
|
||||||
courseId: this.courseId
|
courseId: this.courseId
|
||||||
}
|
}
|
||||||
|
if(!num){
|
||||||
|
//单集解锁
|
||||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||||
httpsRequest.getT('/app/order/insertCourseOrders', data).then(res => {
|
}
|
||||||
|
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||||
|
httpsRequest.getT((num && num == 10)?'/app/order/insertCourseOrders/limit10': '/app/order/insertCourseOrders', data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.ordersId = res.data.orders.ordersId //记录订单id
|
this.ordersId = res.data.orders.ordersId //记录订单id
|
||||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- :autoplay="item.autoPlay" -->
|
<!-- :autoplay="item.autoPlay" -->
|
||||||
<!-- 没有视频权限则显示封面图 -->
|
<!-- 没有视频权限则显示封面图 -->
|
||||||
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true" :src="item.titleImg"
|
<image v-else @click="openShowPay(current,index,item.videoUrl);showControls = true"
|
||||||
class="swipers-items-imgsbg" mode="aspectFill"></image>
|
:src="item.titleImg" class="swipers-items-imgsbg" mode="aspectFill"></image>
|
||||||
<!-- 返回图标 -->
|
<!-- 返回图标 -->
|
||||||
<!-- #ifndef MP-TOUTIAO -->
|
<!-- #ifndef MP-TOUTIAO -->
|
||||||
<view @click.stop="goBack()" style="color: #ffffff;">
|
<view @click.stop="goBack()" style="color: #ffffff;">
|
||||||
@@ -199,6 +199,18 @@
|
|||||||
{{getRedEnvelopeTips}}
|
{{getRedEnvelopeTips}}
|
||||||
</view>
|
</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}}元解锁10集视频
|
||||||
|
</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" v-if="zhengbu === '是' && isWxIosPay == true">
|
||||||
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
|
<view class="list-item-box flex align-center justify-center" @click="payVideo(1)">
|
||||||
<image src="../../static/images/me/rmIcon.png" mode=""></image>
|
<image src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||||
@@ -1256,10 +1268,11 @@
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @param {Object} type 类型
|
* @param {Object} type 类型
|
||||||
|
* @param {Object} num 集数
|
||||||
* 1:购买整部视频
|
* 1:购买整部视频
|
||||||
* 2:购买单集视频
|
* 2:购买单集视频
|
||||||
*/
|
*/
|
||||||
payVideo(type) {
|
payVideo(type, num) {
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
// #ifdef MP-TOUTIAO
|
// #ifdef MP-TOUTIAO
|
||||||
if (!this.checked) {
|
if (!this.checked) {
|
||||||
@@ -1270,7 +1283,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
this.submitPay(type)
|
this.submitPay(type, num)
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/login/login"
|
url: "/pages/login/login"
|
||||||
@@ -1300,13 +1313,15 @@
|
|||||||
this.showMoney = data
|
this.showMoney = data
|
||||||
},
|
},
|
||||||
//使用金币购买
|
//使用金币购买
|
||||||
submitPay(type) {
|
submitPay(type, num) {
|
||||||
let data = {
|
let data = {
|
||||||
courseId: this.courseId
|
courseId: this.courseId
|
||||||
}
|
}
|
||||||
|
if(!num){
|
||||||
|
//单集解锁
|
||||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||||
this.$Request.getT('/app/order/insertCourseOrders', data).then(res => {
|
}
|
||||||
|
this.$Request.getT((num && num == 10)?'/app/order/insertCourseOrders/limit10': '/app/order/insertCourseOrders', data).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.ordersId = res.data.orders.ordersId //记录订单id
|
this.ordersId = res.data.orders.ordersId //记录订单id
|
||||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||||
|
|||||||
Reference in New Issue
Block a user