refactor(components): 优化子服务组件和联系页面
- 修改子服务组件的数据显示逻辑 - 更新联系页面的样式和交互 - 优化成长守护页面的布局和图片加载 - 调整生活页面的图片加载方式 - 在主文件中添加 Lazyload插件的加载指示
This commit is contained in:
@@ -35,16 +35,16 @@ export default {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="sub-service-container">
|
<div class="sub-service-container">
|
||||||
<van-tabs v-model="active" scrollspy background="transparent" :line-height="0" :ellipsis="false">
|
<van-tabs v-model="active" background="transparent" :line-height="0" :ellipsis="false">
|
||||||
<van-tab v-for="(item, index) in subServices" :key="index">
|
<van-tab v-for="(item, index) in list" :key="index">
|
||||||
<template #title>
|
<template #title>
|
||||||
<!-- <van-icon name="more-o" />-->
|
<!-- <van-icon name="more-o" />-->
|
||||||
<div class="tab-title" :class="{ 'tab-active': active === index }">
|
<div class="tab-title" :class="{ 'tab-active': active === index }">
|
||||||
{{ item }}
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="content" v-if="active === index">
|
<div class="content">
|
||||||
<slot :active="activeItem">
|
<slot :active="item">
|
||||||
{{ activeItem }}
|
{{ activeItem }}
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Vue.use(Lazyload)
|
|||||||
Vue.use(Notify)
|
Vue.use(Notify)
|
||||||
Vue.use(Lazyload, {
|
Vue.use(Lazyload, {
|
||||||
lazyComponent: true,
|
lazyComponent: true,
|
||||||
|
loading: '加载中...',
|
||||||
})
|
})
|
||||||
// 全局 防重复点击
|
// 全局 防重复点击
|
||||||
Vue.directive('no-more-click', NoMoreClick)
|
Vue.directive('no-more-click', NoMoreClick)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export default {
|
|||||||
{
|
{
|
||||||
title: '幸福热线',
|
title: '幸福热线',
|
||||||
contact: '95560',
|
contact: '95560',
|
||||||
|
isPhone: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '幸福网址',
|
title: '幸福网址',
|
||||||
@@ -47,9 +48,11 @@ export default {
|
|||||||
<div v-for="(item, index) in info" :key="item.title">
|
<div v-for="(item, index) in info" :key="item.title">
|
||||||
<div class="text-right mr10">{{ item.title }} :</div>
|
<div class="text-right mr10">{{ item.title }} :</div>
|
||||||
<div v-if="index !== 1" class="text-wrap" :style="{ color: index != 0 ? '#000' : '#ED1C24' }">
|
<div v-if="index !== 1" class="text-wrap" :style="{ color: index != 0 ? '#000' : '#ED1C24' }">
|
||||||
{{ item.contact }}
|
<!-- {{ item.contact }}-->
|
||||||
|
<a :href="`${'tel:' + item.contact}`" v-if="index === 0">{{ item.contact }}</a>
|
||||||
|
<p v-else>{{ item.contact }}</p>
|
||||||
</div>
|
</div>
|
||||||
<a v-else :href="`https://${item.contact}`" target="_blank" class="text-wrap">
|
<a v-else :href="`https://${item.contact}`" target="_blank" class="text-wrap link">
|
||||||
{{ item.contact }}
|
{{ item.contact }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,6 +72,10 @@ export default {
|
|||||||
.text-wrap {
|
.text-wrap {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
.link {
|
||||||
|
// 有下划线
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.contact-container {
|
.contact-container {
|
||||||
background-image: url('../../../assets/images/home/homeBack.png');
|
background-image: url('../../../assets/images/home/homeBack.png');
|
||||||
@@ -86,10 +93,10 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.contact-info {
|
.contact-info {
|
||||||
padding-top: 30%;
|
//width: 80%;
|
||||||
|
padding: 30% 10px 0 10px;
|
||||||
width: 80%;
|
line-height: 1.5;
|
||||||
margin: 0 auto;
|
//margin: 0 auto;
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
PageHeader,
|
PageHeader,
|
||||||
SubService,
|
SubService,
|
||||||
},
|
},
|
||||||
mounted() { },
|
mounted() {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
headerImg: require('@/assets/images/growthGuard/headerImg.webp'),
|
headerImg: require('@/assets/images/growthGuard/headerImg.webp'),
|
||||||
@@ -57,8 +57,7 @@ export default {
|
|||||||
<template>
|
<template>
|
||||||
<div class="bg-white">
|
<div class="bg-white">
|
||||||
<page-header :title="title" :subTitle="subTitle" :headerImg="headerImg"></page-header>
|
<page-header :title="title" :subTitle="subTitle" :headerImg="headerImg"></page-header>
|
||||||
<service :title="service.title" :subTitle="service.subTitle" :tail="service.tail" :img="service.img"
|
<service :title="service.title" :subTitle="service.subTitle" :tail="service.tail" :img="service.img" :content="service.content">
|
||||||
:content="service.content">
|
|
||||||
<template>
|
<template>
|
||||||
<grid-icon :list="service.content.items" :col="3"></grid-icon>
|
<grid-icon :list="service.content.items" :col="3"></grid-icon>
|
||||||
</template>
|
</template>
|
||||||
@@ -69,7 +68,7 @@ export default {
|
|||||||
<template #default="{ active }">
|
<template #default="{ active }">
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
<div v-for="(item, index) in active.items" :key="index">
|
<div v-for="(item, index) in active.items" :key="index">
|
||||||
<img class="content-img" :src="item.img" alt="" />
|
<img class="content-img" :src="item.img" alt="" v-lazy="item.img" />
|
||||||
<div class="content-title text-left mt10" v-if="item.title">{{ item.title }}</div>
|
<div class="content-title text-left mt10" v-if="item.title">{{ item.title }}</div>
|
||||||
<div class="content-desc mt10 mb10" v-html="item.desc"></div>
|
<div class="content-desc mt10 mb10" v-html="item.desc"></div>
|
||||||
<ul class="ads mt10">
|
<ul class="ads mt10">
|
||||||
@@ -153,7 +152,7 @@ export default {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
&>div {
|
& > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const list = [
|
|||||||
{
|
{
|
||||||
title: '拓宽视野',
|
title: '拓宽视野',
|
||||||
// desc: '量身定制升学路径,选校/专业/时间线一站式规划,助力名校申请。',
|
// desc: '量身定制升学路径,选校/专业/时间线一站式规划,助力名校申请。',
|
||||||
img: require('@/assets/images/growthGuard/hat.webp'),
|
img: require('@/assets/images/growthGuard/book.webp'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '启迪智慧',
|
title: '启迪智慧',
|
||||||
@@ -52,7 +52,7 @@ export const list = [
|
|||||||
{
|
{
|
||||||
title: '培养跨文化交流能力',
|
title: '培养跨文化交流能力',
|
||||||
// desc: '海内外求职策略+实习推荐,简历优化/面试辅导,提升职场竞争力。',
|
// desc: '海内外求职策略+实习推荐,简历优化/面试辅导,提升职场竞争力。',
|
||||||
img: require('@/assets/images/growthGuard/lxs.webp'),
|
img: require('@/assets/images/growthGuard/book.webp'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -71,7 +71,7 @@ export const list = [
|
|||||||
{
|
{
|
||||||
title: '绘画',
|
title: '绘画',
|
||||||
// desc: '量身定制升学路径,选校/专业/时间线一站式规划,助力名校申请。',
|
// desc: '量身定制升学路径,选校/专业/时间线一站式规划,助力名校申请。',
|
||||||
img: require('@/assets/images/growthGuard/hat.webp'),
|
img: require('@/assets/images/growthGuard/book.webp'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '音乐',
|
title: '音乐',
|
||||||
@@ -81,12 +81,12 @@ export const list = [
|
|||||||
{
|
{
|
||||||
title: '运动',
|
title: '运动',
|
||||||
// desc: '海内外求职策略+实习推荐,简历优化/面试辅导,提升职场竞争力。',
|
// desc: '海内外求职策略+实习推荐,简历优化/面试辅导,提升职场竞争力。',
|
||||||
img: require('@/assets/images/growthGuard/lxs.webp'),
|
img: require('@/assets/images/growthGuard/book.webp'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '科技',
|
title: '科技',
|
||||||
// desc: '各国签证/居留政策解析,学业与身份规划结合,稳妥衔接移民路径。',
|
// desc: '各国签证/居留政策解析,学业与身份规划结合,稳妥衔接移民路径。',
|
||||||
img: require('@/assets/images/growthGuard/write.webp'),
|
img: require('@/assets/images/growthGuard/book.webp'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ export default {
|
|||||||
<template #default="{ active }">
|
<template #default="{ active }">
|
||||||
<div class="active-container">
|
<div class="active-container">
|
||||||
<div class="active-item" v-for="item in active.items">
|
<div class="active-item" v-for="item in active.items">
|
||||||
<img :src="item.img" alt="" />
|
<img :src="item.img" alt="" v-lazy="item.img" />
|
||||||
<div class="act-it-body">
|
<div class="act-it-body">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<img :src="item.icon" alt="" />
|
<img :src="item.icon" alt="" v-lazy="item.icon" />
|
||||||
<h3>{{ item.title }}</h3>
|
<h3>{{ item.title }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<p>{{ item.desc }}</p>
|
<p>{{ item.desc }}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user