|
|
@ -6,7 +6,12 @@ |
|
|
<swiper :style="{height: 'calc('+ windowHeight +'px - 110rpx)', width: '750rpx'}" :current="current" @change="swiperChange"> |
|
|
<swiper :style="{height: 'calc('+ windowHeight +'px - 110rpx)', width: '750rpx'}" :current="current" @change="swiperChange"> |
|
|
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex"> |
|
|
<swiper-item v-for="(tabItem, tabIndex) in tab_list" :key="tabIndex"> |
|
|
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh"> |
|
|
<scroll-view class="com" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="isRefresher" @scrolltolower="onScrolltolower" @refresherrefresh="onRefresherrefresh"> |
|
|
1111 |
|
|
|
|
|
|
|
|
<view class="lf-m-t-20"></view> |
|
|
|
|
|
<lf-waterfall :list="tabItem.list"></lf-waterfall> |
|
|
|
|
|
<view class="loading-more"> |
|
|
|
|
|
<text class="loading-more-text" v-if="tabItem.list.length">正在加载</text> |
|
|
|
|
|
<lf-nocontent v-else></lf-nocontent> |
|
|
|
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</swiper-item> |
|
|
</swiper-item> |
|
|
</swiper> |
|
|
</swiper> |
|
|
@ -38,14 +43,62 @@ |
|
|
}], |
|
|
}], |
|
|
current: 0, |
|
|
current: 0, |
|
|
windowHeight: 0, |
|
|
windowHeight: 0, |
|
|
isRefresher: false // scroll-view下拉刷新状态,当前默认没有触发 |
|
|
|
|
|
|
|
|
isRefresher: false, // scroll-view下拉刷新状态,当前默认没有触发 |
|
|
|
|
|
list: [ |
|
|
|
|
|
{ |
|
|
|
|
|
price: 35, |
|
|
|
|
|
title: '北国风光,千里冰封,万里雪飘', |
|
|
|
|
|
shop: '李白杜甫白居易旗舰店', |
|
|
|
|
|
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23327_s.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
price: 75, |
|
|
|
|
|
title: '望长城内外,惟余莽莽', |
|
|
|
|
|
shop: '李白杜甫白居易旗舰店', |
|
|
|
|
|
image: 'http://pic.sc.chinaz.com/Files/pic/pic9/202002/zzpic23325_s.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
price: 385, |
|
|
|
|
|
title: '大河上下,顿失滔滔', |
|
|
|
|
|
shop: '李白杜甫白居易旗舰店', |
|
|
|
|
|
image: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
price: 784, |
|
|
|
|
|
title: '欲与天公试比高', |
|
|
|
|
|
shop: '李白杜甫白居易旗舰店', |
|
|
|
|
|
image: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/zzpic23369_s.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
price: 7891, |
|
|
|
|
|
title: '须晴日,看红装素裹,分外妖娆', |
|
|
|
|
|
shop: '李白杜甫白居易旗舰店', |
|
|
|
|
|
image: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2130_s.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
price: 2341, |
|
|
|
|
|
shop: '李白杜甫白居易旗舰店', |
|
|
|
|
|
title: '江山如此多娇,引无数英雄竞折腰', |
|
|
|
|
|
image: 'http://pic1.sc.chinaz.com/Files/pic/pic9/202002/zzpic23346_s.jpg', |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(){ |
|
|
onLoad(){ |
|
|
this.windowHeight = getApp().globalData.windowHeight; |
|
|
this.windowHeight = getApp().globalData.windowHeight; |
|
|
|
|
|
this.addRandomData(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
tabChange(){ |
|
|
|
|
|
|
|
|
addRandomData() { |
|
|
|
|
|
for(let i = 0; i < 10; i++) { |
|
|
|
|
|
let index = this.$u.random(0, this.list.length - 1); |
|
|
|
|
|
// 先转成字符串再转成对象,避免数组对象引用导致数据混乱 |
|
|
|
|
|
let item = JSON.parse(JSON.stringify(this.list[index])) |
|
|
|
|
|
item.id = this.$u.guid(); |
|
|
|
|
|
this.tab_list[0].list.push(item); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
tabChange(current){ |
|
|
this.current = current; |
|
|
this.current = current; |
|
|
}, |
|
|
}, |
|
|
// 滑块下标值变化 |
|
|
// 滑块下标值变化 |
|
|
@ -87,5 +140,7 @@ |
|
|
.com{ |
|
|
.com{ |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
padding: 0rpx 32rpx; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |