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. 8
      src/views/SoftDetail/index.vue

2
src/components/NewBottom.vue

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

2
src/components/NewBottomWhite.vue

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

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

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

4
src/router/index.js

@ -33,12 +33,12 @@ const routes = [
component: () => import('@/views/SoftHardware'), component: () => import('@/views/SoftHardware'),
}, },
{ {
path: '/softdetail',
path: '/catalog/:pId',
name: 'softdetail', name: 'softdetail',
component: () => import('@/views/SoftDetail'), component: () => import('@/views/SoftDetail'),
}, },
{ {
path: '/softdetail/:pId/:id',
path: '/product/:pId/:id',
name: 'softdetail-product', name: 'softdetail-product',
component: () => import('@/views/SoftDetail'), component: () => import('@/views/SoftDetail'),
}, },

8
src/views/SoftDetail/index.vue

@ -165,6 +165,7 @@ onMounted(() => {
return return
} }
const { pId, id } = route.params || {} const { pId, id } = route.params || {}
if (id) {
activeTab.value = pId activeTab.value = pId
// //
// html // html
@ -174,13 +175,16 @@ onMounted(() => {
showModalVisible.value = true showModalVisible.value = true
// activeTabid // activeTabid
productInfo.value = case_detail_list[pId][id] productInfo.value = case_detail_list[pId][id]
} else {
activeTab.value = pId
}
}) })
watch( watch(
() => route.query?.t, () => 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 }, { immediate: true, deep: true },

Loading…
Cancel
Save