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 @@
电子邮箱 | E-mail

商务邮箱:info@iflytop.com

-

招聘邮箱:info@iflytop.com

+

招聘邮箱:hr@iflytop.com

我们的位置 | Position
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/design/CaseCard/index.vue b/src/components/design/CaseCard/index.vue index 6d9299e..311d704 100644 --- a/src/components/design/CaseCard/index.vue +++ b/src/components/design/CaseCard/index.vue @@ -57,10 +57,7 @@ const router = useRouter() const toDetail = t => { document.body.scrollTop = document.documentElement.scrollTop = 0 router.push({ - path: '/design-detail', - query: { - t, - }, + path: `/catalog/${t}`, }) } diff --git a/src/components/design/Header/index.vue b/src/components/design/Header/index.vue index aadb281..ee000c8 100644 --- a/src/components/design/Header/index.vue +++ b/src/components/design/Header/index.vue @@ -100,10 +100,7 @@ const toHomePage = (path, p) => { const toDetail = t => { document.body.scrollTop = document.documentElement.scrollTop = 0 router.push({ - path: '/design-detail', - query: { - t, - }, + path: `/catalog/${t}`, }) } diff --git a/src/router/index.js b/src/router/index.js index e0bf637..43f87af 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -33,12 +33,12 @@ const routes = [ component: () => import('@/views/Design'), }, { - path: '/design-detail', + path: '/catalog/:pId', name: 'design-detail', component: () => import('@/views/DesignDetail'), }, { - path: '/design-detail/:pId/:id', + path: '/product/:pId/:id', name: 'design-detail-product', component: () => import('@/views/DesignDetail'), }, diff --git a/src/views/DesignDetail/index.vue b/src/views/DesignDetail/index.vue index 918c6e0..66446e6 100644 --- a/src/views/DesignDetail/index.vue +++ b/src/views/DesignDetail/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, + () => route.params, () => { - if ((activeTab.value = route.query?.t)) { - activeTab.value = route.query?.t + if (route.params?.pId) { + activeTab.value = route.params?.pId } }, { immediate: true, deep: true },