更新通证权益相关页面

This commit is contained in:
zhangmanman
2021-09-23 17:38:46 +08:00
parent 0d77682f00
commit db42cc974c
21 changed files with 17666 additions and 57851 deletions

View File

@@ -8,12 +8,10 @@
</scroll-view>
<!-- 订单列表 -->
<store-order v-if="returnInfo.length > 0" :list="returnInfo" />
<store-order :list="returnInfo" />
<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 : '待审核',
id : 'apply'
@@ -49,7 +47,11 @@
id : 'completed'
}
],
selectNavId : 'apply'
selectNavId : 'apply',
// 分页
pageStatus : '',
page : 1
}
},
created() {
@@ -61,8 +63,16 @@
methods: {
// 退货单列表
returnData(){
storeReturn(this.selectNavId).then(res=>{
this.returnInfo = res.data
storeReturn({
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'
})
},
@@ -122,6 +132,18 @@
}
}
})
},
// 下拉加载
onReachBottom() {
if(this.pageStatus == 'more'){
this.pageStatus = 'loading'
if(this.tabIndex === 'apply') {
this.goodsPage += 1
// 获取退货单列表
this.returnData();
}
}
}
}
}
@@ -154,18 +176,4 @@
color: $main-color;
}
}
// 暂无订单
.pack-center {
text-align: center;
font-size: $title-size-sm;
color: $text-gray;
padding-top: 50%;
image {
width: $uni-img-size-lg * 2;
height:$uni-img-size-lg * 2;
border-radius: $uni-border-radius-circle;
margin-bottom: $margin;
}
}
</style>