Browse Source

product detail

master
maochaoying 2 years ago
parent
commit
fe3942627e
  1. 2
      index.html
  2. 5
      src/router/index.js
  3. 15
      src/views/SoftDetail/index.vue

2
index.html

@ -26,7 +26,7 @@
var _hmt = _hmt || []
;(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?0469a47665275a68d547a94b6b4a9d20'
hm.src = 'https://hm.baidu.com/hm.js?aead83b1b0f20ee468cdb1a81eb2e9c8'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()

5
src/router/index.js

@ -38,6 +38,11 @@ const routes = [
component: () => import('@/views/SoftDetail'),
},
{
path: '/softdetail/:pId/:id',
name: 'softdetail-product',
component: () => import('@/views/SoftDetail'),
},
{
path: '/softabout',
name: 'softabout',
component: () => import('@/views/About/SoftAbout'),

15
src/views/SoftDetail/index.vue

@ -162,13 +162,26 @@ onMounted(() => {
document.body.scrollTop = document.documentElement.scrollTop = 0
if (route.query?.t) {
activeTab.value = route.query?.t
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]
})
watch(
() => route.query?.t,
() => {
activeTab.value = route.query?.t
if ((activeTab.value = route.query?.t)) {
activeTab.value = route.query?.t
}
},
{ immediate: true, deep: true },
)

Loading…
Cancel
Save