Browse Source

路径变化

master
maochaoying 2 years ago
parent
commit
174e3ff868
  1. 2
      src/components/NewBottom.vue
  2. 2
      src/components/NewBottomWhite.vue
  3. 6
      src/components/SoftHardware/Header/index.vue
  4. 4
      src/router/index.js
  5. 26
      src/views/SoftDetail/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">

6
src/components/SoftHardware/Header/index.vue

@ -9,11 +9,11 @@
:src="isChange || active ? Logo2 : Logo1"
class="logo"
alt=""
@click="toPage('/softhard')"
@click="toPage('/')"
/>
<div class="right_oper_wrap">
<div class="btns">
<div class="btn" @click="toPage('/softhard')">
<div class="btn" @click="toPage('/')">
<p class="text">首页</p>
<div
class="line"
@ -103,7 +103,7 @@ const toHomePage = (path, p) => {
}
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 => {

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

26
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
// 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,
() => {
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