From 8322e6a4c7c2a71b8a58563ef943166444aca4c3 Mon Sep 17 00:00:00 2001 From: master1lan <278457198@qq.com> Date: Sat, 28 Jan 2023 20:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E9=80=89?= =?UTF-8?q?=E5=8F=96tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routers/layout/nav/VideoTools.ts | 2 ++ src/store/tags/index.ts | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/routers/layout/nav/VideoTools.ts b/src/routers/layout/nav/VideoTools.ts index 001788e..4b8c25e 100644 --- a/src/routers/layout/nav/VideoTools.ts +++ b/src/routers/layout/nav/VideoTools.ts @@ -202,3 +202,5 @@ const nav_tag_list_no_id: Omit[] = [ id: nanoid(3), cancelable: false, })) as VideoNavQueryItemType[]; + +export const VideoQueryNavList = video_query_nav_list; diff --git a/src/store/tags/index.ts b/src/store/tags/index.ts index 89131f4..803ef06 100644 --- a/src/store/tags/index.ts +++ b/src/store/tags/index.ts @@ -1,5 +1,8 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { VideoNavQueryItemType } from "@routers/layout/nav/VideoTools"; +import { + VideoNavQueryItemType, + VideoQueryNavList, +} from "@routers/layout/nav/VideoTools"; import { PhotoNavQueryItemType, PhotoQueryNavList, @@ -10,7 +13,10 @@ const Photo_Topic_id_all = PhotoQueryNavList.find( (item) => item.queryString === 0 )!, Photo_type_default = PhotoQueryNavList.find( - (item) => item.queryString === "recommend" + (item) => item.queryString === "latest" + )!, + Video_default_show = VideoQueryNavList.find( + (item) => item.queryString === "pubdate" )!; interface TagStates { @@ -24,7 +30,7 @@ interface TagStates { PhotoActivetags: PhotoNavQueryItemType[]; } const initialState: TagStates = { - VideoActiveTags: [], + VideoActiveTags: [Video_default_show], PhotoActivetags: [Photo_Topic_id_all, Photo_type_default], }; export const ActiveTagsSlice = createSlice({