个人中心
This commit is contained in:
@@ -5,51 +5,72 @@
|
||||
</view>
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container" v-for="(item, index) in 4" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[5]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;">
|
||||
<view class="item-container">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
||||
<view>
|
||||
<view class="item-container" v-for="(item, index) in orderList" :key="index">
|
||||
<OrderItem :current="current"></OrderItem>
|
||||
</view>
|
||||
<u-loadmore :status="loadStatus[6]" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
@@ -76,8 +97,11 @@ export default {
|
||||
}, {
|
||||
name: '售后'
|
||||
}],
|
||||
orderList: 5,
|
||||
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
||||
page: 0,
|
||||
current: 0,
|
||||
swiperCurrent: 0
|
||||
swiperCurrent: 0,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -90,7 +114,20 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reachBottom() {
|
||||
// console.log(this.page);
|
||||
if(this.page >= 3) return;
|
||||
// 修改当前的 loadStatus
|
||||
console.log(this.loadStatus);
|
||||
this.loadStatus.splice(this.current, 1, "loading");
|
||||
this.page++;
|
||||
setTimeout(() => {
|
||||
this.orderList += 5;
|
||||
this.loadStatus.splice(this.current, 1, "nomore");
|
||||
}, 1200);
|
||||
},
|
||||
tabsChange(index) {
|
||||
this.current = Number(index);
|
||||
this.swiperCurrent = Number(index);
|
||||
},
|
||||
animationfinish(e) {
|
||||
|
||||
Reference in New Issue
Block a user