This commit is contained in:
@fawn-nine
2024-09-23 13:34:21 +08:00
parent 6ad01b5a89
commit 1a2df86df2
6 changed files with 260 additions and 124 deletions

View File

@@ -774,7 +774,6 @@
if (v.type == 0) {
//免费
this.$http
.request({
url: this.urlList.startStudyForMF,
@@ -795,7 +794,14 @@
}
this.$forceUpdate();
});
} else {
} else if(v.type == 2 && this.userMsg.vip != 1 ){
uni.showModal({
title:'提示',
content:'当前课程目录是超V专享,开通超V可观看',
confirmText:'好的',
showCancel:false
})
}else {
this.$http
.request({
url: this.urlList.goodsList,

View File

@@ -24,24 +24,20 @@
<view :class="['courseItemleve1',userMsg.vip != 0 ? 'isVip' :'']"
v-for="(item1, index1) in item.courseList" :key="index1"
@click="onPageJump('/pages/course/courseDetail',item1.id)">
<view class="vipSee" v-if="userMsg.vip != 0">
<view class="vipSee" v-if="userMsg.vip != 0 && userMsg.vip != 3">
<text>VIP畅学权益生效中</text>
</view>
<view :class="['text','courseItem','flexbox']"><u-icon name="pushpin" color="#2979ff"
size="24"></u-icon><text style="font-size: 32rpx;">{{item1.title}}</text>
</view>
<template v-if="item1.courseCatalogueEntityList && item1.courseCatalogueEntityList.length > 0">
<view class="" v-for="(item2, index2) in item1.courseCatalogueEntityList" :key="index2">
<view :class="['priceItem', item2.isBuy == 1 && userMsg.vip == 0 ? 'isBuy' : '']">
<text class="text mname" v-if="item1.courseCatalogueEntityList.length > 1"
style="font-weight: bold; margin-right: 10rpx;">{{item2.title}}</text>
<view class="pbox flexbox">
<text v-if="item2.type == 2" style="border: #ffb861 1px solid ; border-radius: 40rpx; font-size: 28rpx; display:inline-block; width: 40rpx;
height: 40rpx; text-align: center; line-height: 40rpx; color: #ffb861;">V</text>
<text class="text">半年{{item2.halfFee}} </text><text class="text"
style="margin-left: 20rpx;">整年{{item2.fee}} </text>
<text class="buybtns" @click.stop="goBuy(item2)"
@@ -341,8 +337,17 @@
closePup(e) {
this.pricespop = false
},
goBuy(val) {
goBuy(val) {
console.log(val, 'val')
if(val.type == 2 && this.userMsg.vip != 1){
uni.showModal({
title:'提示',
content:'当前课程目录是超V专享,开通超V可观看',
confirmText:'好的',
showCancel:false
})
return
}
$http.request({
url: "sociology/product/getProductListForCourse",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档