预约记录

version/0412
liudan 9 months ago
parent a65f6df677
commit b8d504ddbd
  1. 32
      pages/news/park/recordHistory.vue

@ -17,7 +17,9 @@
<!-- <view class="btn btn-01">详情</view> -->
</view>
</view>
<u-empty text="暂无记录" v-if="presaList.length == 0" mode="list" style="margin-top: 160rpx;"></u-empty>
<view class="empty" v-if="presaList.length == 0">
<u-empty text="暂无记录" mode="list" style="margin-top: 160rpx;"></u-empty>
</view>
</view>
</template>
@ -28,6 +30,8 @@
return {
presaList: [],
isLoading: false,
total:0,
page:1,
};
},
onLoad() {
@ -72,19 +76,23 @@
},
async getPresaleList() {
let app = this
let {
status,
message,
data
} = await GoodsApi.presaleList();
if (status == 200 && data.length>0) {
data.forEach(function(item) {
let res = await GoodsApi.presaleList({page:this.page});
console.log(res)
if (res.status == 200 && res.data.list.data.length>0) {
res.data.list.data.forEach(function(item) {
item.p_time = app.beginTime(item.p_time)
});
app.presaList =data
app.presaList.push(...res.data.list.data)
app.total = res.data.list.total
}
},
},
onReachBottom() {
if(this.presaList.length <this.total){
this.pageNum ++;
this.getPresaleList();
}
},
}
</script>
@ -195,4 +203,10 @@
}
}
}
.empty{
height: calc(100vh - 88rpx);
display: flex;
align-items: center;
justify-content: center;
}
</style>

Loading…
Cancel
Save