diff --git a/config/requestConfig.js b/config/requestConfig.js index 29dd9fa..a24fe62 100644 --- a/config/requestConfig.js +++ b/config/requestConfig.js @@ -128,9 +128,8 @@ $http.requestStart = function(options) { } if (storeUserInfo.token) { options.header['token'] = storeUserInfo.token; - options.header['appType'] = 'medical'; - }; + options.header['appType'] = 'medical'; return options; } //请求结束 diff --git a/pages/course/index.vue b/pages/course/index.vue index 9135bb8..af8b9d3 100644 --- a/pages/course/index.vue +++ b/pages/course/index.vue @@ -3,16 +3,18 @@ - + + + {{item.title}} - + + + + + + + + + + {{item.title}} + + + + + + + + + + 课程详情 + + + @@ -30,7 +56,8 @@ - --> + @@ -52,6 +79,7 @@ return { playData: {}, tagId: null, + fixed: false, fatherTabId: null, subTabId: null, // bgiStyle: { @@ -73,13 +101,10 @@ subList: [], scrollable: false, pageTitle: '', - tabList: [{ - name: 111, - id: 1 - }], - curTagId:0, + tabList: [], + curTagId: 0, courseList: [], - status: 0, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据 + status: 3, // 0 不显示, 1 加载中,2 加载全部完成,3 暂无数据 page: 1, flag: true, // 函数是否执行完 }; @@ -93,6 +118,15 @@ console.log(e, '传入分类id') this.getCateList(this.tagId) }, + onPageScroll(e) { + this.scrollTop = e.scrollTop; + if (this.scrollTop > 500) { + this.fixed = true + } else { + this.fixed = false + } + // console.log(this.scrollTop,'this.scrollTop') + }, onReachBottom() { if (this.status != 2) { this.page++ @@ -115,6 +149,9 @@ }, //方法 methods: { + surl(imageurl) { + return `url(${imageurl})` + }, getCateList(id) { $http.request({ url: "medical/home/getChildCourseMedicalTree", @@ -156,7 +193,7 @@ } - } + } console.log(this.curTagId, '当前高亮') } }).catch(e => { @@ -253,6 +290,63 @@ } + .fixed { + position: fixed; + z-index: 1; width: 100%; background-color: #fff; + } + + .newBox { + + .item { + margin-bottom: 20rpx; + background-color: #fff; + border-radius: 20rpx; + @include ptop_bottm(10px); + @include pleft_right(10px); + + @include mshadow(10px, 1) .imgcontainer { + display: block; + width: 110rpx; + margin-right: 20rpx; + // background-size: cover; + // background-position: center; + height: 200rpx; + flex-grow: 1; + // @include ptop_bottm(10px); + overflow: hidden; + + // @include pleft_right(10px); + image { + width: 100%; + height: 200rpx; + } + } + .btn_box{ text-align: right; + text{ + border-radius: 20rpx; + padding: 3px 5px; @include theme("btn_bg"); + font-size: 28rpx; color: #fff; + } + } + .buyItems { + width: 60%; + } + + .jianjie { + margin-top: 10rpx; + font-size: 24rpx; + @include bov(); + color: #9c9c9c; + } + + .txt555 { + font-size: 30rpx; + color: #000; + @include bov() + } + } + } + .subCate { margin-top: 10px; margin-bottom: 5px; @@ -289,16 +383,13 @@ } .box { - background-color: #fff; - @include pleft_right(10px); + // background-color: #fff; min-height: calc(100vh - 270rpx); } .learnBox { - background-color: #fff; + // background-color: #fff; margin-top: 10px; - @include ptop_bottm(10px); - @include pleft_right(10px); .learn { flex-wrap: wrap; diff --git a/pages/peanut/home.vue b/pages/peanut/home.vue index 8c5ffa8..19c64eb 100644 --- a/pages/peanut/home.vue +++ b/pages/peanut/home.vue @@ -11,8 +11,7 @@ @click="onPageJump('/pages/peanut/searchFor')"> - - +
@@ -511,8 +510,8 @@ }, curseClickJump(item){ uni.navigateTo({ - url: `/pages/course/index?id=${item.id}&title=中医学` - // url: `/pages/course/index?id=${item.id}&title=${item.title}` + // url: `/pages/course/index?id=${item.id}&title=中医学` + url: `/pages/course/index?id=${item.id}&title=${item.title}` }); }, // 获取用户详情