deming/pageB/search/out.vue
2020-08-08 18:15:07 +08:00

59 lines
1.6 KiB
Vue

<template>
<view class="out">
<u-tabs :list="list" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="32" inactive-color="#333333"></u-tabs>
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
<!-- 店铺 -->
<swiper-item class="swiper-item" v-for="(item, index) in dataList[current]" :key="index">
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
<view class="store"></view>
</scroll-view>
</swiper-item>
<!-- 达人 -->
<swiper-item class="swiper-item" v-for="(item, index) in dataList[current]" :key="index">
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
<view class="anchor"></view>
</scroll-view>
</swiper-item>
<!-- 社区 -->
<swiper-item class="swiper-item" v-for="(item, index) in dataList[current]" :key="index">
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
<view class="community"></view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
name: "店铺"
}, {
name: "达人"
}, {
name: "社区"
}],
current: 0,
swiperCurrent: 0,
dataList: [[1],[2],[3]],
}
},
onLoad(option) {
},
methods: {
tabsChange(index) {
this.current = Number(index);
this.swiperCurrent = this.current;
},
animationfinish(e) {
const current = Number(e.detail.current);
this.current = current;
this.swiperCurrent = current;
},
}
}
</script>
<style lang="scss" scoped>
</style>