69 lines
2.2 KiB
Vue
69 lines
2.2 KiB
Vue
<template>
|
|
<view>
|
|
<status-container :ifReturn="false" titlet="课程列表">
|
|
<view slot="content" style="margin-top: -20rpx;">
|
|
<view class="posi-sticky" :style="{top:newtop+'px'}">
|
|
<view class="pad-sx26 pad-zy20" style="border-bottom: 2rpx solid #fcede8;">
|
|
<view class="radius40 pad-sx2 disjbac pad-zy20" style="background-color: #fff6f5;border: 2rpx solid #ece6e6;">
|
|
<input type="text" class="fon24 width100 pad-sx6" placeholder="关键字搜索" placeholder-style="color:#aaa4a3">
|
|
<image class="flexs" src="/static/tabbar/icon-search.png" mode="" style="width: 28rpx;height: 28rpx;" lazy-load></image>
|
|
</view>
|
|
</view>
|
|
<swiper-tab id="tab" :list="dataList" v-model="current" @changeEv="clickTab" :itemColor="'#e42417'" :lineColor="'#e42417'"></swiper-tab>
|
|
</view>
|
|
<view class="pad-zy20">
|
|
<list @goDetail="goDetail"></list>
|
|
<list @goDetail="goDetail"></list>
|
|
<list @goDetail="goDetail"></list>
|
|
<list @goDetail="goDetail"></list>
|
|
<list @goDetail="goDetail"></list>
|
|
<pitera textStr="上滑加载更多/到底了~~" textColor="#b0aaa9" paddingStr="40rpx 0 20rpx 0"></pitera>
|
|
</view>
|
|
</view>
|
|
</status-container>
|
|
<!-- 底部tab -->
|
|
<foot-tab current='0'></foot-tab>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
// 底部组件
|
|
import footTab from '@/components/foot-tabs/foot-tab.vue';
|
|
import swiperTab from '@/components/swiper-tab/swiper-tab.vue';
|
|
import list from '@/components/list.vue';
|
|
import pitera from '@/components/nothing/pitera.vue';
|
|
export default {
|
|
components:{'foot-tab' :footTab,swiperTab,list,pitera},
|
|
data() {
|
|
return {
|
|
newtop:uni.getSystemInfoSync().statusBarHeight + 42,
|
|
// newtop:uni.getSystemInfoSync().statusBarHeight + (140 / 750 * uni.getSystemInfoSync().windowWidth),
|
|
current:0,
|
|
dataList:[
|
|
{title:'课堂讲解'},
|
|
{title:'武德教育'},
|
|
{title:'爱国主义教育'},
|
|
{title:'示范动作讲解'},
|
|
],
|
|
}
|
|
},
|
|
onLoad() {
|
|
|
|
},
|
|
methods: {
|
|
// tab点击事件
|
|
clickTab(index){
|
|
this.current = index;
|
|
},
|
|
// 去课程详情
|
|
goDetail(id){
|
|
uni.navigateTo({
|
|
url:`/pagesB/course-detail/course-detail?id=${id}`
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style></style>
|