From 174e3ff868a005a09249d18f9d0538f84eb75ed2 Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Fri, 8 Dec 2023 17:01:48 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=8F=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/NewBottom.vue | 2 +-
src/components/NewBottomWhite.vue | 2 +-
src/components/SoftHardware/Header/index.vue | 6 +++---
src/router/index.js | 4 ++--
src/views/SoftDetail/index.vue | 26 +++++++++++++++-----------
5 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/src/components/NewBottom.vue b/src/components/NewBottom.vue
index e9076ce..49f9c85 100644
--- a/src/components/NewBottom.vue
+++ b/src/components/NewBottom.vue
@@ -58,7 +58,7 @@
diff --git a/src/components/NewBottomWhite.vue b/src/components/NewBottomWhite.vue
index 846a2b5..111060e 100644
--- a/src/components/NewBottomWhite.vue
+++ b/src/components/NewBottomWhite.vue
@@ -58,7 +58,7 @@
电子邮箱 | E-mail
商务邮箱:info@iflytop.com
-
招聘邮箱:info@iflytop.com
+
招聘邮箱:hr@iflytop.com
我们的位置 | Position
diff --git a/src/components/SoftHardware/Header/index.vue b/src/components/SoftHardware/Header/index.vue
index baec87f..ec42e5b 100644
--- a/src/components/SoftHardware/Header/index.vue
+++ b/src/components/SoftHardware/Header/index.vue
@@ -9,11 +9,11 @@
:src="isChange || active ? Logo2 : Logo1"
class="logo"
alt=""
- @click="toPage('/softhard')"
+ @click="toPage('/')"
/>
-
+
首页
{
}
const toDetail = t => {
document.body.scrollTop = document.documentElement.scrollTop = 0
- window.location.href = `${window.location.origin}/pc/hardware/#/softdetail?t=${t}`
+ window.location.href = `${window.location.origin}/pc/hardware/#/catalog/${t}`
}
const toPage = page => {
diff --git a/src/router/index.js b/src/router/index.js
index 0eeee92..1524067 100755
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -33,12 +33,12 @@ const routes = [
component: () => import('@/views/SoftHardware'),
},
{
- path: '/softdetail',
+ path: '/catalog/:pId',
name: 'softdetail',
component: () => import('@/views/SoftDetail'),
},
{
- path: '/softdetail/:pId/:id',
+ path: '/product/:pId/:id',
name: 'softdetail-product',
component: () => import('@/views/SoftDetail'),
},
diff --git a/src/views/SoftDetail/index.vue b/src/views/SoftDetail/index.vue
index 47772c4..5c7394a 100644
--- a/src/views/SoftDetail/index.vue
+++ b/src/views/SoftDetail/index.vue
@@ -165,22 +165,26 @@ onMounted(() => {
return
}
const { pId, id } = route.params || {}
- activeTab.value = pId
- // 展示该产品详情
- // 取消html的滚动条
- const rootTag = document.getElementById('iflytop')
- rootTag.style.overflow = 'hidden'
- rootTag.style.height = '100%'
- showModalVisible.value = true
- // 根据activeTab和id确定详情数据
- productInfo.value = case_detail_list[pId][id]
+ if (id) {
+ activeTab.value = pId
+ // 展示该产品详情
+ // 取消html的滚动条
+ const rootTag = document.getElementById('iflytop')
+ rootTag.style.overflow = 'hidden'
+ rootTag.style.height = '100%'
+ showModalVisible.value = true
+ // 根据activeTab和id确定详情数据
+ productInfo.value = case_detail_list[pId][id]
+ } else {
+ activeTab.value = pId
+ }
})
watch(
() => route.query?.t,
() => {
- if ((activeTab.value = route.query?.t)) {
- activeTab.value = route.query?.t
+ if (route.params?.pId) {
+ activeTab.value = route.params?.pId
}
},
{ immediate: true, deep: true },