feat: 修改获取更多拓展阅读逻辑,优化数据处理;调整推荐列表分页大小
This commit is contained in:
parent
d4cbc2c562
commit
032b7a1dab
|
|
@ -202,9 +202,14 @@ const jumpDetail = (item: any) => {
|
|||
|
||||
// 新闻id
|
||||
const news_id = ref("");
|
||||
// 获取更多拓展阅读
|
||||
const getFurtherReadData = () => {
|
||||
getDetailFurtherReadData(news_id.value).then((res: any) => {
|
||||
furtherReadData.value = [...furtherReadData.value, ...res.data];
|
||||
if (res.data.length > 0) {
|
||||
furtherReadData.value = res.data;
|
||||
} else {
|
||||
furtherReadData.value = [...furtherReadData.value, ...res.data];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -240,9 +245,9 @@ onLoad(async (option: any) => {
|
|||
res.data.content = res.data.content.replace(/\n{3,}/g, "\n");
|
||||
|
||||
columnName.value = res.data.columnName1;
|
||||
|
||||
|
||||
furtherReadData.value = res.data.furtherReadings || [];
|
||||
|
||||
|
||||
newList(res.data.columnId1);
|
||||
wxShare();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ const keyword = ref("");
|
|||
const isBottom = ref(false);
|
||||
const pages = reactive({
|
||||
page: 1,
|
||||
size: 20,
|
||||
size: 10,
|
||||
total: 0,
|
||||
});
|
||||
const getList = async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue