|
|
@ -6,10 +6,14 @@ |
|
|
|
v-for="item in trackList" |
|
|
|
:key="item.id" |
|
|
|
> |
|
|
|
<div v-if="item.id != activeTab" class="stand"> |
|
|
|
<div |
|
|
|
v-if="item.id != activeTab" |
|
|
|
class="stand" |
|
|
|
@click="toClassifyPage(item.id)" |
|
|
|
> |
|
|
|
<img class="icon" :src="item.pic" /> |
|
|
|
<p class="title">{{ item.title }}</p> |
|
|
|
<div class="btn" @click="toClassifyPage(item.id)">点击查看更多</div> |
|
|
|
<div class="btn">点击查看更多</div> |
|
|
|
</div> |
|
|
|
<div v-else class="selected"> |
|
|
|
<img :src="getImg(item.id)" alt="" class="img" /> |
|
|
@ -30,28 +34,14 @@ import A6 from '@/static/img/caseshow/specialequip.png' |
|
|
|
import A7 from '@/static/img/caseshow/healthcare.png' |
|
|
|
import A8 from '@/static/img/caseshow/smarthome.png' |
|
|
|
import A9 from '@/static/img/caseshow/electronics.png' |
|
|
|
import { useRoute, useRouter } from 'vue-router' |
|
|
|
const router = useRouter() |
|
|
|
const route = useRoute() |
|
|
|
import { watch } from 'vue' |
|
|
|
const props = defineProps({ |
|
|
|
activeTab: { |
|
|
|
type: Number, |
|
|
|
}, |
|
|
|
}) |
|
|
|
watch( |
|
|
|
() => route.query.t, |
|
|
|
() => { |
|
|
|
router.go(0) |
|
|
|
}, |
|
|
|
) |
|
|
|
const toClassifyPage = id => { |
|
|
|
router.push({ |
|
|
|
path: '/case-show', |
|
|
|
query: { |
|
|
|
t: id, |
|
|
|
}, |
|
|
|
}) |
|
|
|
window.location.href = `/#/case-show?t=${id}` |
|
|
|
window.location.reload() |
|
|
|
} |
|
|
|
const getImg = id => { |
|
|
|
if (id == 1) { |
|
|
|