预约记录

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

Loading…
Cancel
Save