diff --git a/pages/course/courseDetail.vue b/pages/course/courseDetail.vue index 751b3a3..5a6d3c3 100644 --- a/pages/course/courseDetail.vue +++ b/pages/course/courseDetail.vue @@ -6,11 +6,11 @@ - - - + --> + - + - - - {{ course.title }} + + + {{ course.title }} - 进入学习 - - - - - - - + - - - - 精彩试听 - - - - - - - {{ v.title }} - - - - - - - - - 未购买 - - - 有效期至{{ v.endTime }} - - - - - - - - - - 开始学习 - - - - - - - - - - - - - - - {{ item.title }} - - + + + + + + + {{ + v.title + }} + - 【共{{ item.videoList.length }}课时】 + + + 未购买 + + + 有效期至{{ v.endTime }} + + + + + + + + + 开始学习 + + + + + + + + {{ item.title }} + + + + + + + - 暂无文章 - - - + 暂无文章 + + @@ -258,34 +270,38 @@ - - - - - - - + + + - - - - - + 请选择 @@ -498,10 +514,9 @@ - - - - + + + @@ -647,7 +662,7 @@ export default { }, computed: { ...mapState(["userInfo"]), - }, + }, //页面显示 onShow() { // 隐藏原生的tabbar @@ -684,47 +699,47 @@ export default { }, //方法 methods: { - haveSelected(data) { - console.log(data, " 选择的是"); - if (data.index == 0) { - // 分享到好友 - uni.share({ - provider: "weixin", - scene: "WXSceneSession", - type: 0, - href: this.$apkUrl, - title: `${this.course.title}这门课程讲的不错,快来围观吧-吴门医述app`, - summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!", - imageUrl: "static/icon/home_icon_logo.png", - success: function (res) { - console.log("success:" + JSON.stringify(res)); - }, - fail: function (err) { - console.log("fail:" + JSON.stringify(err)); - }, - }); - } else if (data.index == 1) { - // 分享到朋友圈 - uni.share({ - provider: "weixin", - scene: "WXSceneTimeline", - type: 0, - href: this.$apkUrl, - title: `${this.course.title}这门课程讲的不错,快来围观吧-吴门医述app`, - summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!", - imageUrl: "static/icon/home_icon_logo.png", - success: function (res) { - console.log("success:" + JSON.stringify(res)); - }, - fail: function (err) { - console.log("fail:" + JSON.stringify(err)); - }, - }); - } - }, - newOnShare() { - this.$refs.share.open(); - }, + haveSelected(data) { + console.log(data, " 选择的是"); + if (data.index == 0) { + // 分享到好友 + uni.share({ + provider: "weixin", + scene: "WXSceneSession", + type: 0, + href: this.$apkUrl, + title: `${this.course.title}这门课程讲的不错,快来围观吧-吴门医述app`, + summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!", + imageUrl: "static/icon/home_icon_logo.png", + success: function (res) { + console.log("success:" + JSON.stringify(res)); + }, + fail: function (err) { + console.log("fail:" + JSON.stringify(err)); + }, + }); + } else if (data.index == 1) { + // 分享到朋友圈 + uni.share({ + provider: "weixin", + scene: "WXSceneTimeline", + type: 0, + href: this.$apkUrl, + title: `${this.course.title}这门课程讲的不错,快来围观吧-吴门医述app`, + summary: "我正在使用吴门医述提升自己,赶紧跟我一起来体验吧!", + imageUrl: "static/icon/home_icon_logo.png", + success: function (res) { + console.log("success:" + JSON.stringify(res)); + }, + fail: function (err) { + console.log("fail:" + JSON.stringify(err)); + }, + }); + } + }, + newOnShare() { + this.$refs.share.open(); + }, goToGoodsList(data) { if (data.delFlag == -1) { this.$commonJS.showToast("商品已下架"); @@ -748,12 +763,22 @@ export default { } }, //课程详情 - async gotoDetail(v, videoIndex) { - console.log("v at line 668:", v); + async gotoDetail(v, courseIndex) { + console.log("v at line 668:", v); + this.currentCateIndex = courseIndex; + + // if ( + // this.courseList[this.currentCateIndex].isBuy == 1 || + // v.isAudition == 1 || + // this.vip.type != "0" + // ) { uni.navigateTo({ // url: '../bookShop/commodityDetail?id=' + item.id - url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&videoIndex=${videoIndex}`, - }); + url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}`, + }); + // } else { + // this.$commonJS.showToast("请先购买课程"); + // } }, handleClickSelectGoods(data) { this.selectGoodsData = data; @@ -1310,12 +1335,12 @@ export default { var list = await that.getChapterList(that.librayList[i]); console.log("list at line 1224:", list); - list.map(async (item, index) => { - console.log("item at line 1239:", item); - item.videoList = []; - var data = await that.getPath(item); - item.videoList = [...data]; - }); + // list.map(async (item, index) => { + // console.log("item at line 1239:", item); + // item.videoList = []; + // var data = await that.getPath(item); + // item.videoList = [...data]; + // }); console.log("list at line 1222:", list); that.courseList[i] = [...list]; @@ -1453,9 +1478,7 @@ export default { // item.tryListen = []; // }); - list = JSON.parse( - JSON.stringify(res.chapterList.filter((e) => e.isAudition == 1)) - ); + list = res.chapterList; console.log("at line 1343:", list); // console.log('status', res) @@ -1684,7 +1707,6 @@ export default { // .liuyanBox { - padding: 0 20rpx; margin-top: 20rpx; @@ -1764,8 +1786,8 @@ export default { } .linkPro { - margin-bottom:20rpx; - background:rgba(255, 255, 255, 0.85) !important; + margin-bottom: 20rpx; + background: rgba(255, 255, 255, 0.85) !important; // padding:0 20rpx; .more { font-size: 24rpx; @@ -1954,7 +1976,7 @@ export default { .supermarketBox { @include pleft_right(5px); - .borderbb { + .borderbb { background-image: linear-gradient(180deg, #468aff 0%, #46c0ff 100%); @include pleft_right(10px); border-radius: 20rpx; @@ -2125,8 +2147,6 @@ export default { // padding: 0 20rpx; font-size: 40rpx; - - .learnBtn { margin-bottom: 20rpx; width: 150rpx; @@ -2174,7 +2194,9 @@ export default { } } } -.curseSet{margin-right: 10px;} +.curseSet { + margin-right: 10px; +} .shitingLIst { background-color: #fff; padding: 20rpx; @@ -2233,7 +2255,7 @@ export default { color: #fff !important; } /deep/.uni-section { - background:transparent !important; + background: transparent !important; } /deep/.uni-section .uni-section-header { padding-top: 10rpx !important; @@ -2244,7 +2266,6 @@ export default { // padding-bottom: 10rpx !important; } - .chapter_title { width: 100%; font-size: 28rpx; @@ -2253,15 +2274,15 @@ export default { position: relative; // justify-content: space-between; - .top{ + .top { width: 100%; display: flex; align-items: center; - .left{ + .left { display: flex; align-items: center; } - .right{ + .right { // float: right; position: absolute; right: 0; @@ -2269,21 +2290,21 @@ export default { } .not_purchased { position: relative; -.spot{ - width: 8rpx; - height: 8rpx; - position: absolute; - right: -4rpx; - border-radius: 8rpx; - background-color: #33435D; - bottom: -4rpx; -} - color: #33435D; + .spot { + width: 8rpx; + height: 8rpx; + position: absolute; + right: -4rpx; + border-radius: 8rpx; + background-color: #33435d; + bottom: -4rpx; + } + color: #33435d; margin-left: 20rpx; font-size: 24rpx; - padding:0 20rpx; - border-bottom: 2rpx dotted #33435D; - text{ + padding: 0 20rpx; + border-bottom: 2rpx dotted #33435d; + text { margin: 0 10rpx; letter-spacing: 1rpx; } @@ -2382,29 +2403,27 @@ export default { justify-content: space-between; } .commonDetailPage { - } - -.course_info_box { -margin-bottom:10rpx; - // padding:20rpx; - .course_info{ - box-shadow: 0 2px 12px 0 rgba(0,0,0,.1); - background:#F2F8FF; - // border-radius:20rpx; - overflow:hidden; - } - } +.course_info_box { + margin-bottom: 10rpx; + // padding:20rpx; + .course_info { + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + background: #f2f8ff; + // border-radius:20rpx; + overflow: hidden; + } +} -.catalogue_title{ - background: linear-gradient(130deg,#162A4F 0%, #1E4C7D 100%); +.catalogue_title { + background: linear-gradient(130deg, #162a4f 0%, #1e4c7d 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-size: 42rpx; font-weight: bold; letter-spacing: 4rpx; - + // border:4rpx solid #1FB2F8; // box-shadow: 0 2px 12px 0 rgba(255,255,255,.1); // border-radius:40rpx; @@ -2413,78 +2432,74 @@ margin-bottom:10rpx; // height:70rpx; // display:inline-block; // padding:10rpx 20rpx; - } .chapter_content { padding: 20rpx; // padding-top:60rpx; - margin-top:40rpx; - border:4rpx solid #FFFFFC; - background-image: linear-gradient(52deg, #E8F6FF 0%, #E3F2FE 50%); + margin-top: 40rpx; + border: 4rpx solid #fffffc; + background-image: linear-gradient(52deg, #e8f6ff 0%, #e3f2fe 50%); // background-image: linear-gradient(-180deg, #8BBDFE 0%, #B4DCFF 100%); // background:rgba(255, 255, 255, 0.85); // background:rgba(255, 255, 255, 0.85); - box-shadow: 0px 0px 10px 0px #89C8E9 !important; - border-top-right-radius:40rpx; - border-bottom-left-radius:40rpx; - .videoList{ + box-shadow: 0px 0px 10px 0px #89c8e9 !important; + border-top-right-radius: 40rpx; + border-bottom-left-radius: 40rpx; + .videoList { // padding:0 20rpx; display: flex; align-items: center; // justify-content: space-between; - .video_item{ + .video_item { width: 24%; font-size: 22rpx; margin: 10rpx 0; - background:rgba(255, 255, 255, 0.85); - box-shadow: 0 2px 12px 0 rgba(255,255,255,.1); + background: rgba(255, 255, 255, 0.85); + box-shadow: 0 2px 12px 0 rgba(255, 255, 255, 0.1); border-radius: 10rpx; padding: 10rpx 20rpx; margin-right: 1%; color: #333; letter-spacing: 2rpx; - } } } -.line{ +.line { width: 16rpx; height: 50rpx; - border-top-right-radius:12rpx ; - border-bottom-right-radius:12rpx ; + border-top-right-radius: 12rpx; + border-bottom-right-radius: 12rpx; margin-right: 20rpx; - background-image: linear-gradient(108deg, #2786EB 0%, #35A6FF 100%); + background-image: linear-gradient(108deg, #2786eb 0%, #35a6ff 100%); } -.containerBg2{ +.containerBg2 { padding-top: 40rpx; // margin-top: 100rpx; - background: linear-gradient(108deg, #C3E7FF 0%, #59BAFE 100%) !important; + background: linear-gradient(108deg, #c3e7ff 0%, #59bafe 100%) !important; - .shiting{ + .shiting { line-height: 100rpx; - background: linear-gradient(130deg, #4FA1FD 0%, #12F3FF 100%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; + background: linear-gradient(130deg, #4fa1fd 0%, #12f3ff 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; margin-bottom: 20rpx; // background-image: linear-gradient(108deg, #4FA1FD 100%, #4FA1FD 0%); // border:4rpx solid #1FB2F8; - // box-shadow: 0 2px 12px 0 rgba(255,255,255,.1); - // border-radius:40rpx; - color:#fff; - // width:200rpx; - // height:70rpx; - // display:inline-block; - // padding:10rpx 20rpx; - font-size: 72rpx; - text-align: center; + // box-shadow: 0 2px 12px 0 rgba(255,255,255,.1); + // border-radius:40rpx; + color: #fff; + // width:200rpx; + // height:70rpx; + // display:inline-block; + // padding:10rpx 20rpx; + font-size: 72rpx; + text-align: center; } - .shiting_content{ - padding:20rpx; - + .shiting_content { + padding: 20rpx; } - }