From 3d387be4eb191337e3e8e1ceeefb0151bcb87bab Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Tue, 7 Jan 2025 11:02:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9=E6=8E=A5=E8=BF=BD?= =?UTF-8?q?=E5=89=A7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/emprty-card/emprty-card.vue | 26 ++++++++ pages/chasingDrama/index.vue | 67 +++++---------------- pages/watching_history/watching_history.vue | 14 ++--- 3 files changed, 47 insertions(+), 60 deletions(-) create mode 100644 components/emprty-card/emprty-card.vue diff --git a/components/emprty-card/emprty-card.vue b/components/emprty-card/emprty-card.vue new file mode 100644 index 0000000..09efd09 --- /dev/null +++ b/components/emprty-card/emprty-card.vue @@ -0,0 +1,26 @@ + + + + + + + + + diff --git a/pages/chasingDrama/index.vue b/pages/chasingDrama/index.vue index 3e87028..33a131c 100644 --- a/pages/chasingDrama/index.vue +++ b/pages/chasingDrama/index.vue @@ -7,57 +7,18 @@ 更多 - + - - 第三集 + + {{ item.courseDetailsName }} - 我在八十年代当后妈 - 言情 - - - - - - 第三集 - - - 我在八十年代当后妈 - 言情 - - - - - - 第三集 - - - 我在八十年代当后妈 - 言情 - - - - - - 第三集 - - - 我在八十年代当后妈 - 言情 - - - - - - 第三集 - - - 我在八十年代当后妈 - 言情 + {{ item.title }} + {{ item.courseLabel }} + @@ -65,19 +26,20 @@ 更多 - + - - 第三集 + + {{ item.courseDetailsName }} - 我在八十年代当后妈 - 言情 + {{ item.title }} + {{ item.courseLabel }} + @@ -87,12 +49,13 @@ import { reactive } from 'vue'; import { selectByUserId } from '@/api/me/me.js'; import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'; +// 获取数据 async function selectByUserIdAjax() { try { const res1 = await selectByUserId({ page: 1, limit: 6, classify: 3 }); const res2 = await selectByUserId({ page: 1, limit: 6, classify: 6 }); - console.log(res1); - console.log(res2); + data.list1 = res1.records; + data.list2 = res2.records; } catch (error) { console.log(error); } diff --git a/pages/watching_history/watching_history.vue b/pages/watching_history/watching_history.vue index 6bf4a95..04447a4 100644 --- a/pages/watching_history/watching_history.vue +++ b/pages/watching_history/watching_history.vue @@ -19,7 +19,8 @@ - + + @@ -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);