Browse Source

解决一些样式问题

master
maochaoying 2 years ago
parent
commit
b09bad206f
  1. 4
      src/components/Bottom.vue
  2. 26
      src/components/CaseCard.vue
  3. 4
      src/components/HeadLine.vue
  4. 1
      src/components/Top.vue
  5. 4
      src/components/detail/Img.vue
  6. 36
      src/pages/Detail.vue
  7. 2
      src/pages/index.vue
  8. BIN
      src/static/img/recruit/Thumbs.db
  9. 6
      src/style.scss

4
src/components/Bottom.vue

@ -14,8 +14,8 @@
<img class="img1" :src="A1" alt="" />
<span class="text1">在线咨询</span>
</div>
<div class="phone" @click="toPhone">
<div :class="isHard ? 'box hard' : 'box'">
<div class="phone">
<div :class="isHard ? 'box hard' : 'box'" @click="toPhone">
<img class="img3" :src="A2" alt="" />
<span class="text2">拨打电话</span>
</div>

26
src/components/CaseCard.vue

@ -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) {

4
src/components/HeadLine.vue

@ -70,8 +70,8 @@ const props = defineProps({
}
.scale {
font-size: 14px;
transform: scale(0.5);
width: 200%;
transform: scale(0.6);
width: 170%;
.line1 {
font-family: Source Han Sans CN;
font-weight: 300;

1
src/components/Top.vue

@ -177,6 +177,7 @@ const scrollToTop = () => {
}
.container_bg {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(30px);
transition-property: all;
transition-duration: 0.7s;
animation-fill-mode: forwards;

4
src/components/detail/Img.vue

@ -18,14 +18,16 @@ const props = defineProps({
<style lang="scss" scoped>
.card_detail_img {
padding: 0 17px;
background: #f8f8f8;
.double_wrap {
display: grid;
background: #f8f8f8;
grid-template-rows: repeat(1, 1fr);
grid-template-columns: repeat((2, 1fr));
align-items: center;
justify-content: space-between;
column-gap: 13px;
margin-bottom: 5px;
margin-bottom: 10px;
img {
width: 100%;
height: auto;

36
src/pages/Detail.vue

@ -2,23 +2,25 @@
<div class="detail_container">
<SubNavigation :title="`${getTitle()} - 详情页`" />
<Paragraph :text="getList()?.topText" :isHtml="getList()?.isHtml" />
<div v-for="(item, index) in getList()?.card" :key="index">
<CardTitle
:title="item?.cardTitle"
:blue_title="item?.cardBlueTitle"
:en="item?.en"
/>
<Img :double="item?.isDouble" :pic1="item?.pic1" :pic2="item?.pic2" />
<Intro v-if="item?.cardIntro" :cardIntro="item?.cardIntro" />
<Paragraph v-if="item?.cardText" :text="item?.cardText" />
<video
v-if="item?.video"
controls
style="width: 100%; height: auto; object-fit: fill"
controlslist="nodownload"
>
<source :src="item?.video" />
</video>
<div style="background: #f8f8f8">
<div v-for="(item, index) in getList()?.card" :key="index">
<CardTitle
:title="item?.cardTitle"
:blue_title="item?.cardBlueTitle"
:en="item?.en"
/>
<Img :double="item?.isDouble" :pic1="item?.pic1" :pic2="item?.pic2" />
<Intro v-if="item?.cardIntro" :cardIntro="item?.cardIntro" />
<Paragraph v-if="item?.cardText" :text="item?.cardText" />
<video
v-if="item?.video"
controls
style="width: 100%; height: auto; object-fit: fill"
controlslist="nodownload"
>
<source :src="item?.video" />
</video>
</div>
</div>
</div>
</template>

2
src/pages/index.vue

@ -48,5 +48,7 @@ const handleRelease = e => {
.home_container {
margin-bottom: $bottom-height;
background: #f5f5f5;
max-width: 100vw;
overflow: hidden;
}
</style>

BIN
src/static/img/recruit/Thumbs.db

6
src/style.scss

@ -59,3 +59,9 @@
* {
-webkit-text-size-adjust: none;
}
html {
touch-action: none;
touch-action: pan-y;
}
Loading…
Cancel
Save