From b7f984161b089e026b84c1dfeb61dd636bc14a96 Mon Sep 17 00:00:00 2001 From: xjs Date: Fri, 28 Feb 2025 16:55:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E9=97=BB=E6=80=BB=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8F=8A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc-auto-import.json | 4 +- src/components/fab/Fab.vue | 2 +- src/components/home/Consultation.vue | 18 +++- src/hooks/useCityInfoHook.ts | 12 +-- src/pages-sub/home/aiAutoFill/index.vue | 11 +++ src/pages-sub/home/news/newsList.vue | 107 ++++++++++++++++++++++++ src/pages-sub/home/schoolRank/index.vue | 28 +------ src/pages.json | 16 ++++ src/service/index/api.ts | 9 ++ src/types/auto-import.d.ts | 3 + src/types/uni-pages.d.ts | 2 + 11 files changed, 177 insertions(+), 35 deletions(-) create mode 100644 src/pages-sub/home/aiAutoFill/index.vue create mode 100644 src/pages-sub/home/news/newsList.vue diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 9664d93..3ea8661 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -119,6 +119,8 @@ "useCityNewTop": true, "useCityNewDetail": true, "newDetail": true, - "newsDetail": true + "newsDetail": true, + "useNewsList": true, + "newsList": true } } diff --git a/src/components/fab/Fab.vue b/src/components/fab/Fab.vue index e85d7ce..f02e78b 100644 --- a/src/components/fab/Fab.vue +++ b/src/components/fab/Fab.vue @@ -1,5 +1,5 @@ { background: linear-gradient(270deg, #f2ce95 0%, #f8deba 100%); } -.item { +.item-wrapper { position: relative; display: flex; flex-direction: column; @@ -170,28 +170,6 @@ const virtualListChange = (_vList) => { padding: 0 32rpx; } -.item-content { - flex: 1; - margin-left: 20rpx; -} - -.item-detail { - margin-top: 10rpx; - border-radius: 10rpx; - font-size: 28rpx; - color: #aaaaaa; - word-break: break-all; -} - -.item-line { - position: absolute; - bottom: 0rpx; - left: 0rpx; - height: 1px; - width: 100%; - background-color: #eeeeee; -} - /* #ifdef H5 */ :deep(.uni-scroll-view-content) { display: flex; diff --git a/src/pages.json b/src/pages.json index 36677ed..f991be8 100644 --- a/src/pages.json +++ b/src/pages.json @@ -123,6 +123,14 @@ "navigationStyle": "custom" } }, + { + "path": "home/aiAutoFill/index", + "type": "page", + "layout": "page", + "style": { + "navigationStyle": "custom" + } + }, { "path": "home/autoFill/index", "type": "page", @@ -183,6 +191,14 @@ "navigationStyle": "custom" } }, + { + "path": "home/news/newsList", + "type": "page", + "layout": "page", + "style": { + "navigationStyle": "custom" + } + }, { "path": "home/rank/index", "type": "page" diff --git a/src/service/index/api.ts b/src/service/index/api.ts index f507e6e..0b8105e 100644 --- a/src/service/index/api.ts +++ b/src/service/index/api.ts @@ -55,3 +55,12 @@ export const getNewsTop = (params: { Top: number; CategoryId: number; provinceCo export const getNewsDetailInfo = (params: { id: number }) => { return http.get('/api/ZyNews/detail', params) } + +export const getNewsList = (params: { + CategoryId: number + provinceCode: string + PageIndex: number + PageSize: number +}) => { + return http.get('/api/ZyNews/newsPage', params) +} diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts index c03e2b9..d01f6fa 100644 --- a/src/types/auto-import.d.ts +++ b/src/types/auto-import.d.ts @@ -26,6 +26,7 @@ declare global { const markRaw: typeof import('vue')['markRaw'] const newDetail: typeof import('../hooks/useCityInfoHook')['newDetail'] const newsDetail: typeof import('../hooks/useCityInfoHook')['newsDetail'] + const newsList: typeof import('../hooks/useCityInfoHook')['newsList'] const nextTick: typeof import('vue')['nextTick'] const onActivated: typeof import('vue')['onActivated'] const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites'] @@ -96,6 +97,7 @@ declare global { const useModel: typeof import('vue')['useModel'] const useNatureList: typeof import('../hooks/useFilterSchool')['useNatureList'] const useNavbarWeixin: typeof import('../hooks/useNavbarWeixin')['default'] + const useNewsList: typeof import('../hooks/useCityInfoHook')['useNewsList'] const useRegionInfo: typeof import('../hooks/useFilterSchool')['useRegionInfo'] const useRequest: typeof import('../hooks/useRequest')['default'] const useRules: typeof import('../hooks/useRules')['useRules'] @@ -142,6 +144,7 @@ declare module 'vue' { readonly isRef: UnwrapRef readonly markRaw: UnwrapRef readonly newsDetail: UnwrapRef + readonly newsList: UnwrapRef readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef readonly onAddToFavorites: UnwrapRef diff --git a/src/types/uni-pages.d.ts b/src/types/uni-pages.d.ts index ed4b681..06d8737 100644 --- a/src/types/uni-pages.d.ts +++ b/src/types/uni-pages.d.ts @@ -11,6 +11,7 @@ interface NavigateToOptions { "/pages/place/index/index" | "/pages/ucenter/index/index" | "/pages-sub/customerService/index/index" | + "/pages-sub/home/aiAutoFill/index" | "/pages-sub/home/autoFill/index" | "/pages-sub/home/career/index" | "/pages-sub/home/city/index" | @@ -22,6 +23,7 @@ interface NavigateToOptions { "/pages-sub/home/line/index" | "/pages-sub/home/major/index" | "/pages-sub/home/news/index" | + "/pages-sub/home/news/newsList" | "/pages-sub/home/rank/index" | "/pages-sub/home/schoolRank/index" | "/components-sub/FilterMenu/FilterMenu" |