From f5b47b6164adaa66f8a3e5282ff584378effbab6 Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Tue, 21 Apr 2026 17:53:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E5=92=8C?= =?UTF-8?q?=E8=A1=8C=E4=B8=9A=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 5 +- src/components/el/el17.vue | 148 +++++++++++++++++++++++++++++ src/components/menu/index.vue | 5 +- src/main.js | 2 + src/router/index.js | 80 +++++++++++----- src/views/index/index.vue | 4 +- src/views/index/newsCenter.vue | 30 +++--- src/views/index/newsDetail.vue | 36 +++++++ src/views/page/index.vue | 3 + src/views/productCenter/detail.vue | 3 + yarn.lock | 53 +++++++++++ 11 files changed, 326 insertions(+), 43 deletions(-) create mode 100644 src/components/el/el17.vue create mode 100644 src/views/index/newsDetail.vue diff --git a/package.json b/package.json index 9ca356a..53d0a56 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,10 @@ "less-loader": "5.0.0", "quill": "^2.0.3", "swiper": "^11.1.15", - "vue": "^2.5.2", "uuid": "^11.0.5", - "vue-router": "^3.0.1" + "vue": "^2.5.2", + "vue-router": "^3.0.1", + "vue2-editor": "^2.10.3" }, "devDependencies": { "@vue/cli-service": "~5.0.0", diff --git a/src/components/el/el17.vue b/src/components/el/el17.vue new file mode 100644 index 0000000..f06c02e --- /dev/null +++ b/src/components/el/el17.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/src/components/menu/index.vue b/src/components/menu/index.vue index 768132b..6949f9b 100644 --- a/src/components/menu/index.vue +++ b/src/components/menu/index.vue @@ -17,7 +17,10 @@ import {selectConfigTypeList} from "@/api/menu"; import {listHwWebMenu, selectMenuTree} from "@/api/hwWebMenu"; -const indexRoute = ['/index'] +const indexRoute = [ + '/index', + '/newsDetail' +] const contactUsRoute = ['/contactUs'] const industrySolutionsRoute = ['/industrySolutions'] const productCenterRoute = ['/productCenter'] diff --git a/src/main.js b/src/main.js index 1e5f781..d3ad7a7 100644 --- a/src/main.js +++ b/src/main.js @@ -7,12 +7,14 @@ import router from './router' import 'element-ui/lib/theme-chalk/index.css'; import 'animate.css' import AMapLoader from "@amap/amap-jsapi-loader"; +import Vue2Editor from "vue2-editor"; import 'swiper/css/bundle'; import "quill/dist/quill.core.css"; import "quill/dist/quill.snow.css"; import "quill/dist/quill.bubble.css"; Vue.config.productionTip = false Vue.use(ElementUI); +Vue.use(Vue2Editor); window._AMapSecurityConfig = { securityJsCode:'86aa5d3d73bfb4fb80874f18ab3bb755', } diff --git a/src/router/index.js b/src/router/index.js index 1ca2d2e..eb66480 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,31 +6,59 @@ Vue.use(Router) export default new Router({ routes: [ - { - path: '/', component: Layout, redirect: '/index', children: [{ - path: 'test', component: () => import('@/views/page/index.vue'), - }, { - path: 'index', component: () => import('@/views/index/index.vue'), - }, { - path: 'productCenter', component: () => import('@/views/productCenter/index.vue'), - }, { - path: 'productCenter/detail', component: () => import('@/views/productCenter/detail.vue'), - }, { - path: 'industrySolutions', component: () => import('@/views/industrySolutions/index.vue'), - }, { - path: 'index', component: () => import('@/views/index/index.vue'), - }, { - path: '/contactUs', component: () => import('@/views/contactUs/index.vue'), - }, { - path: '/contactUs/MediaCenterDetail', component: () => import('@/views/contactUs/MediaCenterDetail.vue'), - }, { - path: '/serviceSupport', component: () => import('@/views/serviceSupport/index.vue'), - },] - }], scrollBehavior() { - const el = document.getElementById('content') - if (el) { - el.scrollTop = 0 - } - return false + { + path: '/', + component: Layout, + redirect: '/index', + children: [ + { + path: 'test', + component: () => import('@/views/page/index.vue'), + }, + { + path: 'index', + component: () => import('@/views/index/index.vue'), + }, + { + path: 'newsDetail', + component: () => import('@/views/index/newsDetail.vue'), + }, + { + path: 'productCenter', + component: () => import('@/views/productCenter/index.vue'), + }, + { + path: 'productCenter/detail', + component: () => import('@/views/productCenter/detail.vue'), + }, + { + path: 'industrySolutions', + component: () => import('@/views/industrySolutions/index.vue'), + }, + { + path: 'index', + component: () => import('@/views/index/index.vue'), + }, + { + path: '/contactUs', + component: () => import('@/views/contactUs/index.vue'), + }, + { + path: '/contactUs/MediaCenterDetail', + component: () => import('@/views/contactUs/MediaCenterDetail.vue'), + }, + { + path: '/serviceSupport', + component: () => import('@/views/serviceSupport/index.vue'), + }, + ] + } + ], + scrollBehavior() { + const el = document.getElementById('content') + if (el) { + el.scrollTop = 0 + } + return false } }) diff --git a/src/views/index/index.vue b/src/views/index/index.vue index 48e2558..4e6d3d2 100644 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -3,7 +3,7 @@ - + @@ -62,7 +62,7 @@ export default {