前端:H5 首页增加 Banner 列表

This commit is contained in:
YunaiV 2019-03-31 10:24:36 +08:00
parent 1fd9ab2a18
commit 397ea9d764
2 changed files with 11 additions and 5 deletions

View File

@ -7,7 +7,7 @@
<script>
import navigate from '../components/footer/navigate.vue'
import page from './page/page.vue'
import page from './page/index.vue'
export default {
components:{

View File

@ -3,7 +3,9 @@
<div :style="'height:'+topheight+'px'" ></div>
<van-swipe :autoplay="3000" indicator-color="white" height="160">
<van-swipe-item v-for="(banner, index) in banners" :key="index" >
<img :src="banner.picUrl" height="100%" width="100%">
<a :href="banner.url">
<img :src="banner.picUrl" height="100%" width="100%" >
</a>
</van-swipe-item>
</van-swipe>
<div v-for="(item,index) in page.Sections" :key="index">
@ -78,6 +80,10 @@ export default {
});
},
methods:{
onBannerClick: function(event, index) {
debugger;
console.log(event);
},
settopheight:function(value){
this.topheight=value;
}