martial-arts/pages/tabbar/pagehome/pagehome.vue

120 lines
3.6 KiB
Vue
Raw Normal View History

2022-08-01 09:03:10 +00:00
<template>
<view>
<status-container :ifReturn="false" titlet="传武佳小程序">
<view slot="content">
<view class="" style="margin-top: -20rpx;">
2022-08-01 10:18:01 +00:00
<swiper-pu newBottom="20rpx" newHeight="460rpx"></swiper-pu>
2022-08-01 09:03:10 +00:00
</view>
2022-08-03 13:28:45 +00:00
<view class="posi-sticky" :style="{top:newtop+'px'}">
<swiper-tab id="tab" :list="dataList" v-model="current" @changeEv="clickTab" :itemColor="'#e42417'" :lineColor="'#e42417'"></swiper-tab>
</view>
<view class="pad-zy20 pad-s25">
<view class="radius8 bacf pad10 boxshow1">
<view class="posir">
<image src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" style="height: 518rpx;" mode="aspectFill" class="width100" lazy-load></image>
<view class="posia-xzy bac5 fon24 colf pad18">
<view class="clips1">动作教学动作教学动作教学动作教学</view>
<view class="disjbac ae">
<view class="">
<span class="bold">199.00</span>
<span class="fon20 colf8 mar-z20 tline-through">220.00</span>
</view>
<view class="radius18 pad-zy12 pad-sx4 borbot-f disjcac">购买</view>
</view>
</view>
</view>
</view>
<!-- 两列列表 start -->
<list @goDetail="goCourseDetail"></list>
<!-- 两列列表 end -->
<!-- 推荐视频 start -->
<view class="disjb ae mar-s40 mar-x20">
<view class="fon32 bold colb">推荐视频</view>
<view class="fon20" style="color: #bbb4b3;">更多+</view>
</view>
<view class="radius8 bacf pad10 boxshow1 mar-x30" v-for="(item,index) in 2" :key="index">
<view class="posir disjcac">
<image src="https://s6.jpg.cm/2022/02/14/L4oDhy.jpg" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image>
<image class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
</view>
<view class="fon24 pad-sx16 disjcac" style="color: #262626;">
<view class="clips2">动作教学动作教学动作教学动作教学动作教学动作教学</view>
</view>
</view>
<!-- 推荐视频 end -->
<!-- 推荐商品 start -->
<view class="disjb ae mar-s40">
<view class="fon32 bold colb">推荐商品</view>
<view class="fon20" style="color: #bbb4b3;">更多+</view>
</view>
<list @goDetail="goShopDetail"></list>
<!-- 推荐商品 end -->
</view>
2022-08-01 09:03:10 +00:00
</view>
</status-container>
<!-- 底部tab -->
<foot-tab></foot-tab>
</view>
</template>
<script>
import swiperPu from '@/components/swipers/swiper-pu.vue';
import swiperTab from '@/components/swiper-tab/swiper-tab.vue';
import footTab from '@/components/foot-tabs/foot-tab.vue';
2022-08-03 13:28:45 +00:00
import list from '@/components/list.vue';
2022-08-01 09:03:10 +00:00
export default {
components:{
'foot-tab' :footTab,
swiperTab,
2022-08-03 13:28:45 +00:00
swiperPu,
list
2022-08-01 09:03:10 +00:00
},
data() {
return {
2022-08-03 13:28:45 +00:00
newtop:uni.getSystemInfoSync().statusBarHeight + 40,
2022-08-01 09:03:10 +00:00
current:0,
dataList:[
{title:'课堂讲解'},
{title:'武德教育'},
{title:'爱国主义教育'},
{title:'示范动作讲解'},
],
}
},
2022-08-01 10:18:01 +00:00
onShow() {
// 开启banner图自动轮播
this.$store.commit('setAutoplay',true);
},
onHide() {
// 关闭banner图自动轮播
this.$store.commit('setAutoplay',false);
},
2022-08-01 09:03:10 +00:00
onLoad() {
},
methods: {
// tab点击事件
clickTab(index){
this.current = index;
2022-08-03 13:28:45 +00:00
},
// 去课程详情
goCourseDetail(id){
uni.navigateTo({
url:`/pagesB/course-detail/course-detail?id=${id}`
})
},
// 去商品详情
goShopDetail(id){
uni.navigateTo({
url:`/pagesB/shop-detail/shop-detail?id=${id}`
})
2022-08-01 09:03:10 +00:00
}
}
}
</script>
<style>
</style>