From 1c5c9b98118286dab93979da9509a721964bbef5 Mon Sep 17 00:00:00 2001 From: xvv Date: Mon, 29 Jul 2024 16:15:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=A1=A5=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/gw/home.js | 10 +++- ruoyi-ui/src/views/home.vue | 2 +- .../officialWebsite/Components/header.vue | 3 +- ruoyi-ui/src/views/officialWebsite/cases.vue | 22 +++++++- .../src/views/officialWebsite/contact.vue | 56 +++++++++---------- 5 files changed, 59 insertions(+), 34 deletions(-) diff --git a/ruoyi-ui/src/api/gw/home.js b/ruoyi-ui/src/api/gw/home.js index df919db..065a8c5 100644 --- a/ruoyi-ui/src/api/gw/home.js +++ b/ruoyi-ui/src/api/gw/home.js @@ -8,7 +8,7 @@ export function getTab(query) { params: query }) } - +// 获取一级 export function getbanner(data) { return request({ url: '/api/category', @@ -16,6 +16,14 @@ export function getbanner(data) { data }) } +// 获取二级内容 +export function getinfo(data) { + return request({ + url: '/api/category/content', + method: 'post', + data + }) +} export function getBaseInfo(){ return request({ diff --git a/ruoyi-ui/src/views/home.vue b/ruoyi-ui/src/views/home.vue index b4b06f1..a312def 100644 --- a/ruoyi-ui/src/views/home.vue +++ b/ruoyi-ui/src/views/home.vue @@ -339,7 +339,7 @@ export default { } }, mounted() { - console.log(this.$route.params.id) + console.log(this.$route.query.id) // 页面加载完毕调用 this.tabLsit(); this.getWebBaseInfo() diff --git a/ruoyi-ui/src/views/officialWebsite/Components/header.vue b/ruoyi-ui/src/views/officialWebsite/Components/header.vue index 637ec75..da78d8c 100644 --- a/ruoyi-ui/src/views/officialWebsite/Components/header.vue +++ b/ruoyi-ui/src/views/officialWebsite/Components/header.vue @@ -61,10 +61,9 @@ export default { methods:{ tabClick(url,id){ console.log(url,id) - this.$router.push({ name: url, - params:{ id: id } + query:{ id: id } }); }, diff --git a/ruoyi-ui/src/views/officialWebsite/cases.vue b/ruoyi-ui/src/views/officialWebsite/cases.vue index 2e9fe72..2c7c2df 100644 --- a/ruoyi-ui/src/views/officialWebsite/cases.vue +++ b/ruoyi-ui/src/views/officialWebsite/cases.vue @@ -11,7 +11,7 @@