Refactor API requests and update component styles

This commit is contained in:
wangqiao
2025-08-23 22:55:59 +08:00
parent ee8ce32af6
commit b603d9d854
12 changed files with 136 additions and 112 deletions

View File

@ -1,7 +1,7 @@
<template>
<!-- 导航 -->
<KlNavTab active="交流频道" />
<div class="ma-auto mt-30px w-1440px flex">
<div class="ma-auto mt-[30px] w-[1440px] flex">
<LeftContent v-model="pageReq.channelId"></LeftContent>
<RightContent v-model="pageRes" v-model:lun-tan-res="lunTanRes" v-model:page-no="pageReq.pageNo" @update-page-no="handleUpdatePageNo"></RightContent>
</div>
@ -24,7 +24,12 @@
list: [],
total: 0,
})
// 获得频道帖子分页
// const {data:pageRes, refresh:getPage} = await useAsyncData(`prod-api/app-api/business/posts/page-${Date.now()}`, async () => {
// const res = await page(pageReq)
// return res.data as TpageRes
// })
// 获得频道帖子分页
const getPage = () => {
page(pageReq).then((res) => {
pageRes.list = res.data.list
@ -52,6 +57,8 @@
() => pageReq.channelId,
(val) => {
if (val) {
console.log(val);
getPage()
getLunTanDetaiil(val)
}