增加10集和全剧解锁
This commit is contained in:
@@ -149,7 +149,19 @@
|
||||
style="font-size: 24rpx;color: #999;padding: 0 34rpx;margin: 20rpx 0; auto;text-align: left;width: 100%;">
|
||||
{{getRedEnvelopeTips}}
|
||||
</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)">
|
||||
<image class="pay-content-item-icon" src="../../static/images/me/rmIcon.png" mode=""></image>
|
||||
<text class="pay-content-items">
|
||||
@@ -1025,9 +1037,9 @@
|
||||
* 1:购买整部视频
|
||||
* 2:购买单集视频
|
||||
*/
|
||||
payVideo(type) {
|
||||
payVideo(type,num) {
|
||||
if (uni.getStorageSync('token')) {
|
||||
this.submitPay(type)
|
||||
this.submitPay(type,num)
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
@@ -1035,13 +1047,16 @@
|
||||
}
|
||||
},
|
||||
//使用金币购买
|
||||
submitPay(type) {
|
||||
submitPay(type,num) {
|
||||
let data = {
|
||||
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 => {
|
||||
httpsRequest.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