更新通证权益相关页面
This commit is contained in:
@@ -8,12 +8,10 @@
|
||||
</scroll-view>
|
||||
|
||||
<!-- 订单列表 -->
|
||||
<store-order v-if="returnInfo.length > 0" :list="returnInfo" listType="deliver" />
|
||||
<store-order :list="returnInfo" listType="deliver" />
|
||||
|
||||
<view v-else class="pack-center">
|
||||
<image src="../../static/icons/order-null.png"></image>
|
||||
<view>您还没有相关订单</view>
|
||||
</view>
|
||||
<!-- 分页 -->
|
||||
<uni-load-more :status="pageStatus" :iconSize="16" v-if="returnInfo.length > 0"></uni-load-more>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -26,7 +24,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
returnInfo : '' ,// 列表
|
||||
returnInfo : [] ,// 列表
|
||||
navList : [{
|
||||
name : '待发货',
|
||||
state : '1'
|
||||
@@ -41,7 +39,11 @@
|
||||
state : '4'
|
||||
}
|
||||
],
|
||||
selectNavId : '1'
|
||||
selectNavId : '1',
|
||||
|
||||
// 分页
|
||||
pageStatus : '',
|
||||
page : 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -53,9 +55,16 @@
|
||||
methods: {
|
||||
// 退货单列表
|
||||
returnData(){
|
||||
storeDeliver(this.selectNavId).then(res=>{
|
||||
console.log(res)
|
||||
this.returnInfo = res.data
|
||||
storeDeliver({
|
||||
state: this.selectNavId,
|
||||
page : this.goodsPage
|
||||
}).then(res=>{
|
||||
if(res.page.current === 1){
|
||||
this.returnInfo = []
|
||||
}
|
||||
this.returnInfo = this.returnInfo.concat(res.data)
|
||||
this.goodsPage = res.page.current
|
||||
this.pageStatus = res.page.has_more ? 'more': 'noMore'
|
||||
})
|
||||
},
|
||||
|
||||
@@ -92,6 +101,18 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 下拉加载
|
||||
onReachBottom() {
|
||||
if(this.pageStatus == 'more'){
|
||||
this.pageStatus = 'loading'
|
||||
if(this.selectNavId === '1') {
|
||||
this.goodsPage += 1
|
||||
// 获取退货单列表
|
||||
this.returnData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user