优化
This commit is contained in:
@@ -76,9 +76,10 @@ Page({
|
||||
params.per_page = this.data.per_page;
|
||||
api.getDoctorWithdrawalOrder(params).then(response => {
|
||||
console.log(response);
|
||||
let list = this.data.order_list
|
||||
if(response.data.total > 0){
|
||||
this.setData({
|
||||
order_list: response.data.data,
|
||||
order_list: list.concat(response.data.data),
|
||||
current_page: response.data.current_page,
|
||||
per_page: response.data.per_page,
|
||||
last_page: response.data.last_page
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-empty": "@vant/weapp/empty/index"
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
},
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
@@ -18,6 +18,6 @@
|
||||
</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{order_list.length == 0}}" />
|
||||
|
||||
<van-divider contentPosition="center" wx:if="{{order_list.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
|
||||
</view>
|
||||
@@ -3,13 +3,14 @@ page{
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
.order_list{
|
||||
display: flex;
|
||||
width: 92vw;
|
||||
margin: 0 auto;
|
||||
flex-direction: column;
|
||||
padding-bottom: 180rpx;
|
||||
|
||||
}
|
||||
.order_item{
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user