From 6429d4b210fadb4face2ade0bbdc02926c444f72 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Wed, 03 Jan 2024 10:32:12 +0800
Subject: [PATCH] fix:公司官网新建

---
 src/utils/require.ts            |    4 
 src/views/product.vue           |    2 
 src/assets/image/parameter7.jpg |    0 
 src/views/news.vue              |   24 ++++---
 public/favicon.ico              |    0 
 src/components/footerInfor.vue  |   44 ++++++++++----
 src/router/index.ts             |    1 
 src/utils/newDetail.json        |    4 
 src/App.vue                     |   16 -----
 src/components/headerNav.vue    |    6 +
 src/views/about.vue             |   31 ++++------
 11 files changed, 69 insertions(+), 63 deletions(-)

diff --git a/public/favicon.ico b/public/favicon.ico
index df36fcf..f60a2c3 100644
--- a/public/favicon.ico
+++ b/public/favicon.ico
Binary files differ
diff --git a/src/App.vue b/src/App.vue
index 852943d..99a46dd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,23 +7,9 @@
 <template>
   <div>
     <headerNav />
-    <RouterView />
+    <RouterView :key="$route.fullPath" />
     <footerInfor />
   </div>
-  <!-- <header>
-    <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
-
-    <div class="wrapper">
-      <HelloWorld msg="You did it!" />
-
-      <nav>
-        <RouterLink to="/">Home</RouterLink>
-        <RouterLink to="/about">About</RouterLink>
-      </nav>
-    </div>
-  </header> -->
-
-  <!-- <RouterView /> -->
 </template>
 
 <style scoped></style>
diff --git a/src/assets/image/parameter7.jpg b/src/assets/image/parameter7.jpg
new file mode 100644
index 0000000..5b98941
--- /dev/null
+++ b/src/assets/image/parameter7.jpg
Binary files differ
diff --git a/src/components/footerInfor.vue b/src/components/footerInfor.vue
index 77acf98..957f07d 100644
--- a/src/components/footerInfor.vue
+++ b/src/components/footerInfor.vue
@@ -8,6 +8,7 @@
           </div>
           <div v-for="(val, index) in item.list" :key="index" class="valName">
             <span
+              @click="goPage(val)"
               @mouseenter="val.show = !val.show"
               @mouseleave="val.show = !val.show"
               :class="{ hoverBorderBg: val.show }"
@@ -45,43 +46,58 @@
 
 <script setup lang="ts">
 import { reactive } from 'vue'
+import { useRouter } from 'vue-router'
+const router = useRouter()
+let goPage = (item: any) => {
+  if (item.path !== '') {
+    let hash = item.hash ? item.hash : ''
+    router.push({ path: item.path, hash: hash, query: { name: item.name, id: item.id } })
+  }
+}
 const footerinforList = reactive([
   {
     name: '������������',
+    path: '/solution',
     id: '2',
+    show: false,
     list: [
-      { name: '������&PM2.5������������', show: false, path: '/solution/o3-pm25' },
-      { name: '���������������������������������������', show: false, path: '/solution/o3-pm25' },
-      { name: '������������������', show: false, path: '/solution/o3-pm25' },
-      { name: '������������', show: false, path: '/solution/o3-pm25' }
+      { name: '������&PM2.5������������', show: false, path: '/solution', id: '2' },
+      { name: '���������������������������������������', show: false, path: '/solution', id: '21' },
+      { name: '������������������', show: false, path: '/solution', id: '22' },
+      { name: '������������', show: false, path: '/solution', id: '23' }
     ]
   },
   {
     name: '������������',
+    path: '/product',
+    show: false,
     id: '3',
     list: [
-      { name: '23���������������������', show: false, path: '/solution/o3-pm25' },
-      { name: '������������������������������������', show: false, path: '/solution/o3-pm25' },
-      { name: '������������������������������������', show: false, path: '/solution/o3-pm25' },
-      { name: '���������������������������', show: false, path: '/solution/o3-pm25' },
-      { name: '������������������������������������', show: false, path: '/solution/o3-pm25' }
+      { name: '23���������������������', show: false, path: '/product', id: '3' },
+      { name: '������������������������������������', show: false, path: '/product', id: '31' },
+      { name: '������������������������������������', show: false, path: '/product', id: '32' },
+      { name: '���������������������������', show: false, path: '/product', id: '33' }
     ]
   },
   {
     name: '������������',
+    path: '/news',
+    show: false,
     id: '4',
     list: [
-      { name: '������������', show: false, path: '' },
-      { name: '������������', show: false, path: '' }
+      { name: '������������', show: false, path: '/news', id: '4' },
+      { name: '������������', show: false, path: '/news', id: '41' }
     ]
   },
   {
     name: '������������',
+    path: '/about',
+    show: false,
     id: '5',
     list: [
-      { name: '������������', show: false, path: '' },
-      { name: '������������', show: false, path: '' },
-      { name: '������������', show: false, path: '' }
+      { name: '������������', show: false, path: '/about', id: '5', hash: '#mian1' },
+      { name: '������������', show: false, path: '/about', id: '51', hash: '#mian2' },
+      { name: '������������', show: false, path: '/about', id: '52', hash: '#mian3' }
     ]
   },
   {
diff --git a/src/components/headerNav.vue b/src/components/headerNav.vue
index fe2e0d4..500da22 100644
--- a/src/components/headerNav.vue
+++ b/src/components/headerNav.vue
@@ -105,7 +105,11 @@
 let goPage = (item: any) => {
   if (item.path !== '') {
     let hash = item.hash ? item.hash : ''
-    router.push({ path: item.path, hash: hash, query: { name: item.name, id: item.id } })
+    router.push({
+      path: item.path,
+      hash: hash,
+      query: { name: item.name, id: item.id, key: Math.random() }
+    })
   }
 }
 </script>
diff --git a/src/router/index.ts b/src/router/index.ts
index 7e48f4b..7c1e2f0 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -48,6 +48,7 @@
       component: () => import('../views/contact.vue')
     }
   ],
+
   // eslint-disable-next-line no-unused-vars
   scrollBehavior(to, from, savedPosition) {
     if (to.hash) {
diff --git a/src/utils/newDetail.json b/src/utils/newDetail.json
index 238deda..26287b8 100644
--- a/src/utils/newDetail.json
+++ b/src/utils/newDetail.json
@@ -208,7 +208,7 @@
       "index": 6,
       "name": "2020IEexp������������������������������������������",
       "abstract": "���������<span class='numFont'>2020</span>���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������...",
-      "time": "2021-09-16 14:22",
+      "time": "2021-02-19 14:22",
       "content": [
         {
           "type": "text",
@@ -244,7 +244,7 @@
       "index": 7,
       "name": "���������������������������������������������������������������",
       "abstract": "���������������������������21���������������������������������������������������������������15���������������������������������24������������������������8������������������������������������������������������������������������������������������������������������...",
-      "time": "2021-09-16 14:22",
+      "time": "2021-02-19 14:22",
       "content": [
         {
           "type": "text",
diff --git a/src/utils/require.ts b/src/utils/require.ts
index cbbbea3..28c13bf 100644
--- a/src/utils/require.ts
+++ b/src/utils/require.ts
@@ -1,8 +1,8 @@
 /* eslint-disable no-console */
 const require = (imgPath: string) => {
   try {
-    const handlePath = imgPath.replace('@', '..')
-    return new URL(handlePath, import.meta.url).href
+    const handlePath = imgPath.replace('@/assets/image/', '')
+    return new URL(`../assets/image/${handlePath}`, import.meta.url).href
   } catch (error) {
     console.log(error)
   }
diff --git a/src/views/about.vue b/src/views/about.vue
index 4ccfec2..19989ff 100644
--- a/src/views/about.vue
+++ b/src/views/about.vue
@@ -48,7 +48,7 @@
             </el-row>
           </el-col>
           <el-col :span="12">
-            <div class="overview">
+            <el-scrollbar height="375px" class="overview" always>
               <p>
                 ���������������������������������������������������������2013���������������������������������������������������������������������������������������������������������������������������������������������
               </p>
@@ -64,7 +64,8 @@
               <p>
                 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
               </p>
-            </div>
+            </el-scrollbar>
+            <!-- <div class="overview"></div> -->
           </el-col>
         </el-row>
       </div>
@@ -132,18 +133,9 @@
   console.log('router', route)
 })
 const menuList = reactive([
-  {
-    id: 0,
-    name: '������������'
-  },
-  {
-    id: 1,
-    name: '������������'
-  },
-  {
-    id: 2,
-    name: '������������'
-  }
+  { name: '������������', show: false, path: '/about', id: '5', hash: '#mian1' },
+  { name: '������������', show: false, path: '/about', id: '51', hash: '#mian2' },
+  { name: '������������', show: false, path: '/about', id: '52', hash: '#mian3' }
 ])
 const historyList = reactive([
   {
@@ -169,15 +161,19 @@
   },
   {
     id: 3,
-    time: '2021������������',
-    name: '2021������������',
-    content: '2021������������'
+    time: '2024������������',
+    name: '2024������������',
+    content: '2024������������'
   }
 ])
 const clickIndex = ref(menuList[0])
 let changeCarouselIndex = ref(0)
 let changeClickIndex = (item: any) => {
   clickIndex.value = item
+  if (item.path !== '') {
+    let hash = item.hash ? item.hash : ''
+    router.push({ path: item.path, hash: hash, query: { name: item.name, id: item.id } })
+  }
 }
 let remarkCaruselUp = ref()
 let changeCarouselItem = (index: any) => {
@@ -280,7 +276,6 @@
 .overview {
   width: 100%;
   height: 337px;
-  overflow: auto;
   p {
     color: #555555;
     line-height: 30px;
diff --git a/src/views/news.vue b/src/views/news.vue
index 6fabce7..1bb6bbc 100644
--- a/src/views/news.vue
+++ b/src/views/news.vue
@@ -104,9 +104,11 @@
 import _ from 'lodash'
 const route = useRoute()
 const router = useRouter()
+const isShowCar = ref(true)
 let configData = reactive(newDetail.data)
 onMounted(() => {
   console.log('router', route)
+  isShowCar.value = true
 })
 const menuList = reactive([
   {
@@ -118,7 +120,7 @@
         title: '������������������������',
         scr: require('@/assets/image/1-2109161410130-L.jpg'),
         time: '2021-09',
-        day: '19',
+        day: '16',
         content:
           '������������������������������������������������������������������������������������������������������������������������������������������������������ ������������������ ���������������������������������������������������������������������������...'
       },
@@ -126,7 +128,7 @@
         index: 1,
         title: '������������������������������������������������',
         scr: require('@/assets/image/1-210126150151245.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '���������������������������������������������������������������������������������������������FEI-S1������������������������������������������������������������������������������������������������������������������������������������������������������������...'
@@ -135,7 +137,7 @@
         index: 2,
         title: '���������������������������������������������������������������',
         scr: require('@/assets/image/1-210126145T2435.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������...'
@@ -144,7 +146,7 @@
         index: 3,
         title: '������������������������������������������������������������',
         scr: require('@/assets/image/1-1F12Q624570-L.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '������������������������������������������������������"������������"������������������������������������������������������5480������������������������������������������������������������������������������������������������������PM2.5���������������������...'
@@ -153,7 +155,7 @@
         index: 4,
         title: '���������������������������������������',
         scr: require('@/assets/image/1-210126145324G7.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������5480������������������������������������...'
@@ -162,7 +164,7 @@
         index: 5,
         title: '��������������������������� ������������',
         scr: require('@/assets/image/1-210126144ZY93.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������...'
@@ -173,7 +175,7 @@
         title: '2020IEexp������������������������������������������',
         name: 'menuChilderFirst3',
         scr: require('@/assets/image/1-210115110925X6.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '2020���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������...'
@@ -183,7 +185,7 @@
         title: '������������������������������������������������������������������',
         name: 'menuChilderFirst3',
         scr: require('@/assets/image/1-210126144130309.jpg'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '������������������21���������������������������������������������������������������15���������������������������������24������������������������8������������������������������������������������������������������������������������������������������������...'
@@ -199,7 +201,7 @@
         title: '������������������������������������������������������������',
         name: 'menuChilderFirst1',
         scr: require('@/assets/image/1-210126150I41W.png'),
-        time: '2021-09',
+        time: '2021-02',
         day: '19',
         content:
           '���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������...'
@@ -208,7 +210,7 @@
   }
 ])
 const clickIndex = ref(menuList[0])
-const isShowCar = ref(true)
+
 let clickNews: any = ref({})
 let changeClickIndex = (item: any) => {
   clickIndex.value = item
@@ -223,6 +225,8 @@
 watch(
   () => router.currentRoute.value,
   (newValue: any) => {
+    isShowCar.value = true
+    console.log(newValue)
     if (newValue.query.id === '41') {
       clickIndex.value = menuList[1]
     } else {
diff --git a/src/views/product.vue b/src/views/product.vue
index 377961d..cca30c7 100644
--- a/src/views/product.vue
+++ b/src/views/product.vue
@@ -37,7 +37,7 @@
         >
       </div>
     </div>
-    <router-view></router-view>
+    <router-view v-if="!isShowCar"></router-view>
   </div>
 </template>
 

--
Gitblit v1.8.0