diff --git a/pages.json b/pages.json index b95ce29..55e7b0a 100644 --- a/pages.json +++ b/pages.json @@ -19,7 +19,7 @@ { "path": "pages/mine/vip/index", "style": { - "navigationBarTitleText": "VIP定制", + "navigationBarTitleText": "VIP", "enablePullDownRefresh": true, "onReachBottomDistance": 100, "app-plus": { diff --git a/pages/course/courseDetail.vue b/pages/course/courseDetail.vue index b9e76ad..cf6b90a 100644 --- a/pages/course/courseDetail.vue +++ b/pages/course/courseDetail.vue @@ -5,7 +5,7 @@ - + {{goBuyTitle}} @@ -13,7 +13,7 @@ 立即购买 - + @@ -554,7 +554,9 @@ newPaymentProList:[], isFudu:false, // 是否复读 //是否有vip - userVip: null + userVip: null, + courseVipModule: [], //该课程需要什么类型的vip + textList: [], //转化文字集合 }; }, //第一次加载 @@ -920,7 +922,6 @@ } }, haveSelected(data) { - console.log(data, " 选择的是"); if (data.index == 0) { // 分享到好友 uni.share({ @@ -1182,15 +1183,51 @@ this.goBuyTitle = '尊贵的'+role+'VIP,您的有效期到'+res.userVip.endTime; this.goBuyType = 1; }else{ //否则没有开通vip - this.goBuyTitle = '购买VIP,即可畅享更多专属权益'; + this.goBuyTitle = ''; this.goBuyType = 0; + this.getCourseVipModule(); } } }) }, + //判断需要什么类型的vip + getCourseVipModule(){ + this.$http.request({ + url: 'common/userVip/getCourseVipModule', + method: "POST", + data: { + courseId: this.courseId, + }, + header: { + "Content-Type": "application/json", + }, + }) + .then((res) => { + if (res.code == 0) { + this.courseVipModule = res.list; + let text = ''; + this.courseVipModule.forEach((item, index) => { + if(item=='4'){ + text = '中医学'; + }else if(item=='5'){ + text = '针灸学'; + }else if(item=='6'){ + text = '肿瘤学'; + }else if(item=='7'){ + text = '国学'; + }else if(item=='8'){ + text = '心理学'; + } + this.textList.push(text); + }); + + const joinedText = this.textList.join('/'); + this.goBuyTitle = '购买'+joinedText+'VIP,即可畅享更多专属权益'; + } + }) + }, // 评论 showSayModule(data) { - console.log(data, "父级收到值了"); this.fatherSay = data.item; this.fatherIndex = data.index; console.log(this.fatherSay, this.fatherIndex, "父级收到值了"); @@ -3028,13 +3065,15 @@ } .describe_block text{ display: block; - font-size: 28rpx; + font-size: 26rpx; padding-right: 10rpx; } .describe_block button{ - font-size: 26rpx; + display: inline-block; + text-align: center; + width: 150rpx; + font-size: 24rpx; color: #fff; - padding: 0 15rpx; border-radius: 10rpx; line-height: 50rpx; height: 50rpx; diff --git a/pages/mine/mine/index.vue b/pages/mine/mine/index.vue index c384a29..dcd53bf 100644 --- a/pages/mine/mine/index.vue +++ b/pages/mine/mine/index.vue @@ -17,30 +17,31 @@ - - + 医学 国学心理学 - + -