From d5cef721d46dd55b08eb28cb6cc300214b08d6a4 Mon Sep 17 00:00:00 2001 From: XiaoMo Date: Wed, 29 Mar 2023 16:20:11 +0800 Subject: [PATCH] =?UTF-8?q?a1300399510@qq.com=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=8E=202023/03/29=20-16:20:02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HeaderNav.vue | 2 +- src/router/index.js | 25 ++++++++----- .../{ => index}/allSections/AllSections.vue | 0 src/views/{ => index}/collect/Collect.vue | 0 src/views/index/index.vue | 2 +- src/views/{ => index}/recommend/Recommend.vue | 0 src/views/search/search.vue | 35 +++++++++++++++++++ .../search/searchResult/SearchResult.vue | 23 ++++++++++++ src/views/searchResult/SearchResult.vue | 19 ---------- 9 files changed, 77 insertions(+), 29 deletions(-) rename src/views/{ => index}/allSections/AllSections.vue (100%) rename src/views/{ => index}/collect/Collect.vue (100%) rename src/views/{ => index}/recommend/Recommend.vue (100%) create mode 100755 src/views/search/search.vue create mode 100755 src/views/search/searchResult/SearchResult.vue delete mode 100755 src/views/searchResult/SearchResult.vue diff --git a/src/components/HeaderNav.vue b/src/components/HeaderNav.vue index efa9df4..2318ba6 100755 --- a/src/components/HeaderNav.vue +++ b/src/components/HeaderNav.vue @@ -11,7 +11,7 @@
- +
diff --git a/src/router/index.js b/src/router/index.js index 16b7bf2..3e0da4f 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,11 +12,12 @@ VueRouter.prototype.push = function push(to) { import getPageTitle from "@/utils/title-config"; -const Index = () => import('views/index') -const Recommend = () => import('views/recommend/Recommend') -const Collect = () => import('views/collect/Collect') -const AllSections = () => import('views/allSections/AllSections') -const SearchResult = () => import('views/searchResult/SearchResult') +const Index = () => import('views/index/index') +const Recommend = () => import('views/index/recommend/Recommend') +const Collect = () => import('views/index/collect/Collect') +const AllSections = () => import('views/index/allSections/AllSections') +const search = () => import('views/search/search') +const SearchResult = () => import('views/search/searchResult/SearchResult') const routes = [ { @@ -50,16 +51,24 @@ const routes = [ title: "全部版块" } }, + + ] + }, { + path: '/searchResult', // 首页 + name: 'search', + redirect: "/searchResult", + component: search, + children: [ { path: '/searchResult', - name: 'SearchResult', + name: 'Recommend', component: SearchResult, meta: { title: "搜索帖子" } - } + }, ] - }, + } ] diff --git a/src/views/allSections/AllSections.vue b/src/views/index/allSections/AllSections.vue similarity index 100% rename from src/views/allSections/AllSections.vue rename to src/views/index/allSections/AllSections.vue diff --git a/src/views/collect/Collect.vue b/src/views/index/collect/Collect.vue similarity index 100% rename from src/views/collect/Collect.vue rename to src/views/index/collect/Collect.vue diff --git a/src/views/index/index.vue b/src/views/index/index.vue index a0314f3..7fb7036 100755 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -18,7 +18,7 @@ + + \ No newline at end of file diff --git a/src/views/search/searchResult/SearchResult.vue b/src/views/search/searchResult/SearchResult.vue new file mode 100755 index 0000000..334bc28 --- /dev/null +++ b/src/views/search/searchResult/SearchResult.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/src/views/searchResult/SearchResult.vue b/src/views/searchResult/SearchResult.vue deleted file mode 100755 index 01a10db..0000000 --- a/src/views/searchResult/SearchResult.vue +++ /dev/null @@ -1,19 +0,0 @@ - - - - - \ No newline at end of file