Commit af0b718a authored by 林文清's avatar 林文清

fix:学习

parent 7cb3e0cd
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<text class="title-view">学习</text> <text class="title-view">学习</text>
</u-navbar> </u-navbar>
<image :src="bannerImage" mode="" class="banner"></image> <image :src="bannerImage" mode="" class="banner"></image>
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" :bar-width="52" swiperWidth="750"></u-tabs-swiper> <u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs"
<swiper class="swiper_group" :current="swiperCurrent" @animationfinish="animationfinish"> :current="current" @change="tabsChange" :is-scroll="false" :bar-width="52" swiperWidth="750"></u-tabs-swiper>
<swiper class="swiper_group" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 0"> <swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 0">
<scroll-view scroll-y style="height:100%;width:100%;"> <scroll-view scroll-y style="height:100%;width:100%;">
<view class="jf-currency-class"> <view class="jf-currency-class">
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 1"> <swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 1">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onReachBottom" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @refresherpulling="onPulling" @refresherrefresh="onRefresh" @refresherrestore="onRestore" @refresherabort="onAbort"> <scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @refresherpulling="onPulling" @refresherrefresh="onRefresh" @refresherrestore="onRestore" @refresherabort="onAbort">
<view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)"> <view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head"> <view class="n-head">
{{item.title}} {{item.title}}
...@@ -447,8 +448,13 @@ export default { ...@@ -447,8 +448,13 @@ export default {
onAbort() { onAbort() {
console.log("onAbort"); console.log("onAbort");
}, },
transition(e) {
// swiper-item左右移动,通知tabs的滑块跟随移动
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
//scroll-view到底部加载更多 //scroll-view到底部加载更多
onReachBottom() { onreachBottom() {
//上拉触底函数 //上拉触底函数
if (!this.isLoadMore) { if (!this.isLoadMore) {
this.isLoadMore = true; this.isLoadMore = true;
......
...@@ -228,6 +228,7 @@ ...@@ -228,6 +228,7 @@
this.courseDesc = res.data.content.replace(/<p.*?>|<\/p>/ig, "") this.courseDesc = res.data.content.replace(/<p.*?>|<\/p>/ig, "")
this.section_id = res.data.id this.section_id = res.data.id
this.section_content = res.data.content this.section_content = res.data.content
this.status = res.data.isLearned ? 1 : 0
this.teacher.name = res.data.teachers[0].name this.teacher.name = res.data.teachers[0].name
this.teacherImage = res.data.teachers[0].avatar this.teacherImage = res.data.teachers[0].avatar
this.teacherIntro = res.data.teachers[0].intro.replace(/<.*?>|<\/.*?>/ig, "") this.teacherIntro = res.data.teachers[0].intro.replace(/<.*?>|<\/.*?>/ig, "")
...@@ -456,7 +457,6 @@ ...@@ -456,7 +457,6 @@
// padding: 20rpx; // padding: 20rpx;
padding-left: 20rpx; padding-left: 20rpx;
background: #fff; background: #fff;
white-space: nowrap;
// border: 1px solid red; // border: 1px solid red;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment