From 69f735c8d544be626981d620e5076a07acd2af8c Mon Sep 17 00:00:00 2001 From: suixy <2277317060@qq.com> Date: Thu, 14 May 2026 17:43:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E9=97=BB=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/news.js | 36 ++ .../editEl/industrySolutionsEl/el3.vue | 3 - src/layout/index.vue | 15 + src/router/index.js | 4 + src/views/editPage/index.vue | 1 - src/views/indexEdit.vue | 2 +- src/views/otherEdit/newsEdit.vue | 66 ++- src/views/otherEdit/newsEdit1.vue | 90 ++++ src/views/otherEdit/newsList.vue | 423 ++++++++++++++++++ src/views/productCenter/edit/index.vue | 13 +- 10 files changed, 626 insertions(+), 27 deletions(-) create mode 100644 src/api/news.js create mode 100644 src/views/otherEdit/newsEdit1.vue create mode 100644 src/views/otherEdit/newsList.vue diff --git a/src/api/news.js b/src/api/news.js new file mode 100644 index 0000000..a844450 --- /dev/null +++ b/src/api/news.js @@ -0,0 +1,36 @@ +import request from '@/utils/request' + +// 查询新闻列表 +export function listNews(query) { + return request({ + url: '/portal/news/list', + method: 'get', + params: query + }) +} + +// 新增新闻 +export function addNews(data) { + return request({ + url: '/portal/news/add', + method: 'post', + data: data + }) +} + +// 修改新闻 +export function updateNews(data) { + return request({ + url: '/portal/news/update', + method: 'put', + data: data + }) +} + +// 删除新闻 +export function deleteNews(newsId) { + return request({ + url: '/portal/news/delete/' + newsId, + method: 'delete' + }) +} diff --git a/src/components/editEl/industrySolutionsEl/el3.vue b/src/components/editEl/industrySolutionsEl/el3.vue index 2b461ab..7b58165 100644 --- a/src/components/editEl/industrySolutionsEl/el3.vue +++ b/src/components/editEl/industrySolutionsEl/el3.vue @@ -28,7 +28,6 @@ title="跳转到" :visible.sync="linkDialogVisible" width="50%"> - 关于海威--> 行业方案 产品中心 + 新闻列表 @@ -22,16 +23,30 @@ export default { '3': {path: '/industrySolutionsEdit',}, '4': {path: '/productCenterEdit'}, '5': {path: '/serviceSupportEdit'}, + '6': {path: '/newsList'}, } }; }, mounted() { + this.syncActiveIndex(); }, watch: { $route() { + this.syncActiveIndex(); } }, methods: { + syncActiveIndex() { + const pathActiveIndexMap = { + '/indexEdit': '1', + '/contactUsEdit': '2', + '/industrySolutionsEdit': '3', + '/productCenterEdit': '4', + '/serviceSupportEdit': '5', + '/newsList': '6', + }; + this.activeIndex = pathActiveIndexMap[this.$route.path] || '1'; + }, handleSelect(key) { const target = this.menuRouteMap[key]; if (!target) { diff --git a/src/router/index.js b/src/router/index.js index bef5962..b9db976 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -32,6 +32,10 @@ export default new Router({ path: '/serviceSupportEdit', component: () => import('@/views/productCenter/edit/index.vue'), }, + { + path: '/newsList', + component: () => import('@/views/otherEdit/newsList.vue'), + }, ] }, { diff --git a/src/views/editPage/index.vue b/src/views/editPage/index.vue index abd8c5c..cdb1eb8 100644 --- a/src/views/editPage/index.vue +++ b/src/views/editPage/index.vue @@ -70,7 +70,6 @@ 小图轮播图 -
图标 +文字+内容横铺4个 diff --git a/src/views/indexEdit.vue b/src/views/indexEdit.vue index 85ce81c..5f89782 100644 --- a/src/views/indexEdit.vue +++ b/src/views/indexEdit.vue @@ -5,7 +5,7 @@ - +
+ diff --git a/src/views/otherEdit/newsList.vue b/src/views/otherEdit/newsList.vue new file mode 100644 index 0000000..3847e7e --- /dev/null +++ b/src/views/otherEdit/newsList.vue @@ -0,0 +1,423 @@ + + + + + diff --git a/src/views/productCenter/edit/index.vue b/src/views/productCenter/edit/index.vue index 6f49ed4..cfae751 100644 --- a/src/views/productCenter/edit/index.vue +++ b/src/views/productCenter/edit/index.vue @@ -3,10 +3,6 @@ 保 存 @@ -62,7 +58,6 @@ export default { return item }) this.pageData = pageData - console.log(pageData) }) selectMenuTree().then(e => { let tabsData = e.data.find(v => v.webMenuId === 7).children @@ -87,7 +82,12 @@ export default { this.pageData.productList.forEach(e => { id = Math.max(id, e.id) }) - this.pageData.productList.push({id: id + 1, banner: '', list: [], name: '新分类'}) + this.pageData.productList.push({ + id: id + 1, + banner: '', + list: [], + name: '新分类' + }) }, save() { updateHwWeb({ @@ -187,6 +187,7 @@ export default { } } } + .contactUs { width: 100%; background-color: #2e445c;