Browse Source

详情头

master
maochaoying 2 years ago
parent
commit
a1666f2658
  1. 5
      src/components/Card.vue
  2. 7
      src/pages/Detail.vue

5
src/components/Card.vue

@ -60,7 +60,12 @@ const toDetail = productId => {
flex-direction: column;
padding: 11px 7px 7px 7px;
.title {
width: 150px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 8px;
height: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #2f2f2f;

7
src/pages/Detail.vue

@ -1,6 +1,6 @@
<template>
<div class="detail_container">
<SubNavigation title="国网照明巡检摄像头 - 详情页" />
<SubNavigation :title="`${getTitle()} - 详情页`" />
<Paragraph :text="getList()?.topText" />
<div v-for="(item, index) in getList()?.card" :key="index">
<CardTitle
@ -29,7 +29,7 @@ import Paragraph from 'cpns/detail/Paragraph'
import CardTitle from 'cpns/detail/CardTitle'
import Img from 'cpns/detail/Img'
import Intro from 'cpns/detail/Intro'
import { detailList } from '@/mock/case_detail'
import { detailList, caseList } from '@/mock/case_detail'
import { useRoute } from 'vue-router'
import { ref, onMounted } from 'vue'
const route = useRoute()
@ -37,6 +37,9 @@ const route = useRoute()
const getList = () => {
return detailList[classify.value][pId.value]
}
const getTitle = () => {
return caseList[classify.value][parseInt(pId.value) - 1]?.title
}
const classify = ref('1')
const pId = ref('1')

Loading…
Cancel
Save