新增资产权证转让管理部分页面增加分页
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
<view class="title">
|
||||
限时抢购<text>海量商家优惠券</text>
|
||||
</view>
|
||||
<navigator class="more" url="/pages/coupons/couponList">查看更多</navigator>
|
||||
<navigator class="more" open-type="navigate" url="/pages/coupons/couponList">查看更多</navigator>
|
||||
</view>
|
||||
<view class="coupons" v-if="coupons.length > 0">
|
||||
<view class="coupons-item" v-for="(item, index) in coupons" :key="index">
|
||||
@@ -168,6 +168,8 @@
|
||||
</view>
|
||||
<!-- 优选商品 -->
|
||||
<goods-list :list="goods" priceType="CNY" @on-goods="onGoods" />
|
||||
<!-- 分页 -->
|
||||
<uni-load-more :status="pageStatus" :iconSize="16"></uni-load-more>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
@@ -205,14 +207,16 @@
|
||||
coupons : [],
|
||||
position : {},
|
||||
goods : [],
|
||||
pages : {},
|
||||
// 广场部分
|
||||
industryIndex: 0,
|
||||
recommendBus : [],
|
||||
hotBus : [],
|
||||
industryBus : [],
|
||||
busList : [],
|
||||
busPages : {}
|
||||
busPages : {},
|
||||
// 分页
|
||||
pageStatus : '',
|
||||
page : 1
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -267,8 +271,7 @@
|
||||
},
|
||||
// 易货首页
|
||||
getMall(){
|
||||
mall().then(res => {
|
||||
console.log(res.coupons)
|
||||
mall().then(res => {
|
||||
this.classify = res.categories.slice(0, 9)
|
||||
this.banners = res.banners
|
||||
this.coupons = res.coupons
|
||||
@@ -283,9 +286,15 @@
|
||||
},
|
||||
// 商品列表
|
||||
getGoods(){
|
||||
list().then(res => {
|
||||
this.goods = res.data
|
||||
this.pages = res.page
|
||||
list({
|
||||
page: this.goodsPage
|
||||
}).then(res => {
|
||||
if(res.page.current === 1){
|
||||
this.goods = []
|
||||
}
|
||||
this.goods = this.goods.concat(res.data)
|
||||
this.goodsPage = res.page.current
|
||||
this.pageStatus = res.page.has_more ? 'more': 'noMore'
|
||||
})
|
||||
},
|
||||
// 商品详情
|
||||
@@ -324,6 +333,16 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 下拉加载
|
||||
onReachBottom() {
|
||||
if(this.pageStatus == 'more'){
|
||||
this.pageStatus = 'loading'
|
||||
if(this.tabIndex === 0) {
|
||||
this.goodsPage += 1
|
||||
this.getGoods()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user