Browse Source

路径变化

master
maochaoying 2 years ago
parent
commit
2385d95d38
  1. 2
      src/components/NewBottom.vue
  2. 2
      src/components/NewBottomWhite.vue
  3. 5
      src/components/design/CaseCard/index.vue
  4. 5
      src/components/design/Header/index.vue
  5. 4
      src/router/index.js
  6. 28
      src/views/DesignDetail/index.vue

2
src/components/NewBottom.vue

@ -58,7 +58,7 @@
<div class="title">电子邮箱 E-mail</div>
<div class="info_text mb">
<p>商务邮箱info@iflytop.com</p>
<p>招聘邮箱info@iflytop.com</p>
<p>招聘邮箱hr@iflytop.com</p>
</div>
<div class="title">我们的位置 Position</div>
<div class="info_text">

2
src/components/NewBottomWhite.vue

@ -58,7 +58,7 @@
<div class="title">电子邮箱 E-mail</div>
<div class="info_text mb">
<p>商务邮箱info@iflytop.com</p>
<p>招聘邮箱info@iflytop.com</p>
<p>招聘邮箱hr@iflytop.com</p>
</div>
<div class="title">我们的位置 Position</div>
<div class="info_text">

5
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}`,
})
}

5
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}`,
})
}

4
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'),
},

28
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
// activeTabid
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
// activeTabid
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 },

Loading…
Cancel
Save