新增对接追剧数据
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<up-divider text="到底了~" v-if="listData.list.length && listData.finish"></up-divider>
|
||||
<emprty-card v-if="!listData.list.length && listData.status == 'nomore'" />
|
||||
<up-loadmore :status="listData.status" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -45,7 +46,7 @@ const listData = reactive({
|
||||
list: [],
|
||||
page: 1,
|
||||
size: 10,
|
||||
finish: false
|
||||
status: 'loading'
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
@@ -56,12 +57,9 @@ async function selectByUserIdAjax() {
|
||||
limit: listData.size,
|
||||
classify: type.value
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
listData.list = res.data.records;
|
||||
if (res.data.currPage >= res.data.totalPage) {
|
||||
listData.finish = true;
|
||||
}
|
||||
listData.list = res.records;
|
||||
if (res.currPage >= res.totalPage) {
|
||||
listData.status = 'nomore';
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user