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 @@
-
+
高考资讯
-
+
@@ -27,14 +31,22 @@
diff --git a/src/hooks/useCityInfoHook.ts b/src/hooks/useCityInfoHook.ts
index 1499ea9..0c2a1e3 100644
--- a/src/hooks/useCityInfoHook.ts
+++ b/src/hooks/useCityInfoHook.ts
@@ -1,4 +1,9 @@
-import { getNewsTop, getVolunteerInitialization, getNewsDetailInfo } from '@/service/index/api'
+import {
+ getNewsTop,
+ getVolunteerInitialization,
+ getNewsDetailInfo,
+ getNewsList,
+} from '@/service/index/api'
import { useCityStore } from '@/store/city'
import { useUserStore } from '@/store/user'
import { City, News, NewsDetail } from '@/types/app-type'
@@ -48,9 +53,8 @@ const groupByFirstLetter = (lis: Province[]): { letter: string; provinces: Provi
.map((key) => ({ letter: key, provinces: grouped[key] }))
}
+export const newsList = ref([])
export const useCityNewTop = () => {
- const newsList = ref([])
-
const fetchNewTopFun = (provinceCode) => {
getNewsTop({ Top: 2, CategoryId: 1, provinceCode }).then((res) => {
if (res.code === 200) {
@@ -68,8 +72,6 @@ export const useCityNewTop = () => {
} else {
fetchNewTopFun(userStore.userInfo.city.code)
}
-
- return { newsList }
}
export const newsDetail = ref({
diff --git a/src/pages-sub/home/aiAutoFill/index.vue b/src/pages-sub/home/aiAutoFill/index.vue
new file mode 100644
index 0000000..e4be082
--- /dev/null
+++ b/src/pages-sub/home/aiAutoFill/index.vue
@@ -0,0 +1,11 @@
+
+{
+ layout: 'page',
+ style: {
+ navigationStyle: 'custom',
+ },
+}
+
+
+
+
diff --git a/src/pages-sub/home/news/newsList.vue b/src/pages-sub/home/news/newsList.vue
new file mode 100644
index 0000000..c0c3504
--- /dev/null
+++ b/src/pages-sub/home/news/newsList.vue
@@ -0,0 +1,107 @@
+
+{
+ layout: 'page',
+ style: {
+ navigationStyle: 'custom',
+ },
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+ 来源: {{ item.source }}
+ {{ item.createTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-sub/home/schoolRank/index.vue b/src/pages-sub/home/schoolRank/index.vue
index a078d1e..898fff8 100644
--- a/src/pages-sub/home/schoolRank/index.vue
+++ b/src/pages-sub/home/schoolRank/index.vue
@@ -52,7 +52,7 @@
@change="tabsChange"
ref="tabsRef"
>
-
+
@@ -61,7 +61,7 @@
{
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" |