Showing
4 changed files
with
126 additions
and
49 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-26 13:42:11 | 2 | * @Date: 2024-09-26 13:42:11 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-12 15:16:42 | 4 | + * @LastEditTime: 2024-10-15 11:01:58 |
| 5 | * @FilePath: /hager/src/components/common/hagerHeader.vue | 5 | * @FilePath: /hager/src/components/common/hagerHeader.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <div class="hager-header"> | 9 | <div class="hager-header"> |
| 10 | - <div class="header-top"></div> | 10 | + <div v-if="choose_country" class="location-banner"> |
| 11 | + <div>You are localised in the following country : </div> | ||
| 12 | + <div></div> | ||
| 13 | + </div> | ||
| 14 | + <!-- <div class="header-top hidden-xs-only"></div> --> | ||
| 11 | <el-row class="hidden-xs-only" style="background-color: #fff;"> | 15 | <el-row class="hidden-xs-only" style="background-color: #fff;"> |
| 12 | <el-col :sm="1" :md="1" :lg="3" :xl="4"> </el-col> | 16 | <el-col :sm="1" :md="1" :lg="3" :xl="4"> </el-col> |
| 13 | <el-col :sm="22" :md="22" :lg="18" :xl="16" style="position: relative;height: 5rem;"> | 17 | <el-col :sm="22" :md="22" :lg="18" :xl="16" style="position: relative;height: 5rem;"> |
| ... | @@ -259,20 +263,34 @@ export default { | ... | @@ -259,20 +263,34 @@ export default { |
| 259 | is_active: '', | 263 | is_active: '', |
| 260 | p_index: 0, | 264 | p_index: 0, |
| 261 | show_menu: false, | 265 | show_menu: false, |
| 266 | + margin_top: 0, | ||
| 267 | + choose_country: false, // 主动选择了国家地区 | ||
| 262 | } | 268 | } |
| 263 | }, | 269 | }, |
| 264 | mounted () { | 270 | mounted () { |
| 271 | + // | ||
| 272 | + let margin_top = 5; // 默认高度 | ||
| 273 | + let once_header_height = 5; // 选择国家地区高度 | ||
| 274 | + // let hidden_header_height = 2; // 可隐藏高度s | ||
| 275 | + if (this.choose_country) { // 没有点击国家地区 | ||
| 276 | + margin_top += once_header_height; | ||
| 277 | + } | ||
| 278 | + $('.wrapper').css('marginTop', margin_top + 'rem'); | ||
| 279 | + // 监听屏幕滚动 | ||
| 280 | + // $('.wrapper').css('marginTop', margin_top + hidden_header_height + 'rem'); | ||
| 281 | + // window.addEventListener('scroll', (evt) => { | ||
| 282 | + // if ($(window).scrollTop()) { | ||
| 283 | + // $('.header-top').css('height', 0); | ||
| 284 | + // $('.wrapper').css('marginTop', margin_top - hidden_header_height + 'rem'); | ||
| 285 | + // } else { | ||
| 286 | + // $('.header-top').css('height', '2rem'); | ||
| 287 | + // $('.wrapper').css('marginTop', margin_top + hidden_header_height + 'rem'); | ||
| 288 | + // } | ||
| 289 | + // }); | ||
| 290 | + // | ||
| 265 | this.product_info = this.product_menu[0]['info']; | 291 | this.product_info = this.product_menu[0]['info']; |
| 266 | // 修改数据结构显示 | 292 | // 修改数据结构显示 |
| 267 | this.product_info.product = this.splitProductList(this.product_info.product); | 293 | this.product_info.product = this.splitProductList(this.product_info.product); |
| 268 | - // 监听屏幕滚动 | ||
| 269 | - window.addEventListener('scroll', (evt) => { | ||
| 270 | - if ($(window).scrollTop()) { | ||
| 271 | - $('.header-top').css('height', 0); | ||
| 272 | - } else { | ||
| 273 | - $('.header-top').css('height', '2rem'); | ||
| 274 | - } | ||
| 275 | - }) | ||
| 276 | }, | 294 | }, |
| 277 | watch: { | 295 | watch: { |
| 278 | '$route' (to, from) { | 296 | '$route' (to, from) { |
| ... | @@ -382,6 +400,13 @@ export default { | ... | @@ -382,6 +400,13 @@ export default { |
| 382 | left: 0; | 400 | left: 0; |
| 383 | right: 0; | 401 | right: 0; |
| 384 | z-index: 9; | 402 | z-index: 9; |
| 403 | + .location-banner { | ||
| 404 | + display: flex; | ||
| 405 | + background: linear-gradient(0deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)), #00477e; | ||
| 406 | + width: 100%; | ||
| 407 | + height: 5rem; | ||
| 408 | + color: white; | ||
| 409 | + } | ||
| 385 | .header-top { | 410 | .header-top { |
| 386 | display: flex; | 411 | display: flex; |
| 387 | background-color: #00477e; | 412 | background-color: #00477e; | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-08-27 10:06:30 | 2 | * @Date: 2024-08-27 10:06:30 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-10-11 17:28:51 | 4 | + * @LastEditTime: 2024-10-15 11:49:38 |
| 5 | * @FilePath: /hager/src/views/index.vue | 5 | * @FilePath: /hager/src/views/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -49,13 +49,17 @@ | ... | @@ -49,13 +49,17 @@ |
| 49 | <hager-box class="box-2n" @screen-width="handleScreenWidth"> | 49 | <hager-box class="box-2n" @screen-width="handleScreenWidth"> |
| 50 | <hager-h1 title="解决方案" sub="Solution"></hager-h1> | 50 | <hager-h1 title="解决方案" sub="Solution"></hager-h1> |
| 51 | <div v-if="!is_xs" class="hager-solution"> | 51 | <div v-if="!is_xs" class="hager-solution"> |
| 52 | - <div | 52 | + <el-row :gutter="15"> |
| 53 | - @click="goToSolution(item)" | 53 | + <el-col :span="6" v-for="(item, index) in solution_list" :key="index"> |
| 54 | - class="solution-item" | 54 | + <div |
| 55 | - :style="{ backgroundImage: 'url('+item.src+')' }" | 55 | + @click="goToSolution(item)" |
| 56 | - v-for="(item, index) in solution_list" :key="index"> | 56 | + class="solution-item" |
| 57 | - <p>{{ item.title }}</p> | 57 | + :style="{ backgroundImage: 'url('+item.src+')' }" |
| 58 | - </div> | 58 | + > |
| 59 | + <p>{{ item.title }}</p> | ||
| 60 | + </div> | ||
| 61 | + </el-col> | ||
| 62 | + </el-row> | ||
| 59 | </div> | 63 | </div> |
| 60 | <div v-else> | 64 | <div v-else> |
| 61 | <swiper ref="mySolutionSwiper" class="swiper" :options="swiperOption" @slideChange="onSolutionSlideChange"> | 65 | <swiper ref="mySolutionSwiper" class="swiper" :options="swiperOption" @slideChange="onSolutionSlideChange"> |
| ... | @@ -76,16 +80,20 @@ | ... | @@ -76,16 +80,20 @@ |
| 76 | <hager-box class="box-n"> | 80 | <hager-box class="box-n"> |
| 77 | <hager-h1 title="产品中心" sub="Product Center"></hager-h1> | 81 | <hager-h1 title="产品中心" sub="Product Center"></hager-h1> |
| 78 | <div v-if="!is_xs" class="hager-product-center"> | 82 | <div v-if="!is_xs" class="hager-product-center"> |
| 79 | - <div @click ="goToProduct(item)" v-for="(item, index) in product_list" :key="index" class="product-item"> | 83 | + <el-row :gutter="15"> |
| 80 | - <el-image style="height: 14rem;" :src="item.src" fit="cover"></el-image> | 84 | + <el-col :span="6" v-for="(item, index) in product_list" :key="index"> |
| 81 | - <p style="margin-top: 1rem;">{{ item.title }}</p> | 85 | + <div @click ="goToProduct(item)" class="product-item"> |
| 82 | - </div> | 86 | + <div class="img" :style="{ backgroundImage: 'url('+item.src+')' }"></div> |
| 87 | + <p style="margin-top: 1rem;">{{ item.title }}</p> | ||
| 88 | + </div> | ||
| 89 | + </el-col> | ||
| 90 | + </el-row> | ||
| 83 | </div> | 91 | </div> |
| 84 | <div v-else> | 92 | <div v-else> |
| 85 | <swiper ref="myProductSwiper" class="swiper" :options="swiperOption" @slideChange="onProductSlideChange"> | 93 | <swiper ref="myProductSwiper" class="swiper" :options="swiperOption" @slideChange="onProductSlideChange"> |
| 86 | <swiper-slide v-for="(item, index) in product_list" :key="index"> | 94 | <swiper-slide v-for="(item, index) in product_list" :key="index"> |
| 87 | <div @click="goToProduct(item)" class="product-item xs"> | 95 | <div @click="goToProduct(item)" class="product-item xs"> |
| 88 | - <el-image style="height: 8rem; margin: 1rem; margin-bottom: 0;" :src="item.src" fit="cover"></el-image> | 96 | + <div class="img" :style="{ height: '8rem', margin: '1rem', backgroundImage: 'url('+item.src+')' }"></div> |
| 89 | <p style="margin: 0.5rem;">{{ item.title }}</p> | 97 | <p style="margin: 0.5rem;">{{ item.title }}</p> |
| 90 | </div> | 98 | </div> |
| 91 | </swiper-slide> | 99 | </swiper-slide> |
| ... | @@ -385,15 +393,6 @@ export default { | ... | @@ -385,15 +393,6 @@ export default { |
| 385 | } | 393 | } |
| 386 | .hager-solution { | 394 | .hager-solution { |
| 387 | margin-top: 2rem; | 395 | margin-top: 2rem; |
| 388 | - display: grid; | ||
| 389 | - grid-template-columns: repeat(4, 1fr); /* 一行显示4个 */ | ||
| 390 | - gap: 1.5rem; /* 每个项目之间的间距 */ | ||
| 391 | - &.xs { | ||
| 392 | - display: flex; | ||
| 393 | - overflow: hidden; /* 超出部分隐藏 */ | ||
| 394 | - width: calc(100vw - 1rem); /* 容器宽度适应屏幕 */ | ||
| 395 | - gap: 1rem; | ||
| 396 | - } | ||
| 397 | } | 396 | } |
| 398 | .solution-item { | 397 | .solution-item { |
| 399 | position: relative; | 398 | position: relative; |
| ... | @@ -478,11 +477,9 @@ export default { | ... | @@ -478,11 +477,9 @@ export default { |
| 478 | font-weight: bold; | 477 | font-weight: bold; |
| 479 | font-size: 1.35rem; | 478 | font-size: 1.35rem; |
| 480 | color: @secondary-color; | 479 | color: @secondary-color; |
| 481 | - display: -webkit-box; /* 结合其他属性进行多行文本处理 */ | 480 | + white-space: nowrap; /* 不换行 */ |
| 482 | - -webkit-line-clamp: 1; /* 设置显示的行数 */ | 481 | + overflow: hidden; /* 隐藏超出部分 */ |
| 483 | - -webkit-box-orient: vertical; /* 垂直排列 */ | 482 | + text-overflow: ellipsis; /* 用省略号表示被截断的部分 */ |
| 484 | - overflow: hidden; /* 超出部分隐藏 */ | ||
| 485 | - text-overflow: ellipsis; /* 使用省略号替代超出的文本 */ | ||
| 486 | } | 483 | } |
| 487 | .news-item-sub { | 484 | .news-item-sub { |
| 488 | color: @primary-color; | 485 | color: @primary-color; |
| ... | @@ -500,9 +497,9 @@ export default { | ... | @@ -500,9 +497,9 @@ export default { |
| 500 | 497 | ||
| 501 | .hager-product-center { | 498 | .hager-product-center { |
| 502 | margin-top: 2rem; | 499 | margin-top: 2rem; |
| 503 | - display: grid; | 500 | + // display: grid; |
| 504 | - grid-template-columns: repeat(4, 1fr); /* 一行显示4个 */ | 501 | + // grid-template-columns: repeat(4, 1fr); /* 一行显示4个 */ |
| 505 | - gap: 1.5rem; /* 每个项目之间的间距 */ | 502 | + // gap: 1.5rem; /* 每个项目之间的间距 */ |
| 506 | // &.xs { | 503 | // &.xs { |
| 507 | // display: flex; | 504 | // display: flex; |
| 508 | // overflow: hidden; /* 超出部分隐藏 */ | 505 | // overflow: hidden; /* 超出部分隐藏 */ |
| ... | @@ -527,9 +524,15 @@ export default { | ... | @@ -527,9 +524,15 @@ export default { |
| 527 | // flex: 0 0 50vw; /* 每个子元素宽度为屏幕宽度的一半 (显示2个元素) */ | 524 | // flex: 0 0 50vw; /* 每个子元素宽度为屏幕宽度的一半 (显示2个元素) */ |
| 528 | // padding: 0 20px; | 525 | // padding: 0 20px; |
| 529 | // box-sizing: border-box; | 526 | // box-sizing: border-box; |
| 530 | - padding: 0; | ||
| 531 | margin-top: 1rem; | 527 | margin-top: 1rem; |
| 532 | - padding-bottom: 0.25rem; | 528 | + // padding-bottom: 0.25rem; |
| 529 | + padding: 0.1rem; | ||
| 530 | + } | ||
| 531 | + .img { | ||
| 532 | + height: 14rem; | ||
| 533 | + background-size: cover; /* 相当于 object-fit: cover */ | ||
| 534 | + background-position: center; /* 让图片居中 */ | ||
| 535 | + background-repeat: no-repeat; | ||
| 533 | } | 536 | } |
| 534 | } | 537 | } |
| 535 | 538 | ... | ... |
| ... | @@ -39,6 +39,62 @@ | ... | @@ -39,6 +39,62 @@ |
| 39 | </div> | 39 | </div> |
| 40 | </div> | 40 | </div> |
| 41 | </hager-box> | 41 | </hager-box> |
| 42 | + <hager-box v-if="!is_xs" class="box-2n"> | ||
| 43 | + <hager-h1 title="我们的服务" sub="Service Advantage" style="margin: 2rem 0;"></hager-h1> | ||
| 44 | + <div style="display: grid;grid-template-columns: repeat(3, 1fr);gap: 1.5rem;"> | ||
| 45 | + <div> | ||
| 46 | + <div>快速</div> | ||
| 47 | + <div> | ||
| 48 | + <p>7x24小时全天实时在线</p> | ||
| 49 | + <p>全国32个城市办事处</p> | ||
| 50 | + <p>快速响应机制:承诺2小时内与客户达成沟通,必要时24小时内到场处理</p> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + <div> | ||
| 54 | + <div>专业</div> | ||
| 55 | + <div> | ||
| 56 | + <p>全由海格技术人员组成,提供专业技术服务 | ||
| 57 | + 拥有60余年专业经验,服务于整个项目周期服务多样化,包含且不限于邮件、电话、微信群,现场拜访交流、小型推广会等;</p> | ||
| 58 | + </div> | ||
| 59 | + </div> | ||
| 60 | + <div> | ||
| 61 | + <div>增值</div> | ||
| 62 | + <div> | ||
| 63 | + <p>为客户提供定制化服务,充分满足客户需求 | ||
| 64 | + 针对客户需求提供过保产品保养及维修服务 | ||
| 65 | + 针对现有产品(改造/升级/退市及一定使用 | ||
| 66 | + 年限)提出替换/升级方案并实施完成</p> | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + </div> | ||
| 70 | + </hager-box> | ||
| 71 | + <div v-else style="padding: 1rem;"> | ||
| 72 | + <hager-h1 title="我们的服务" sub="Service Advantage" style="margin: 2rem 0;"></hager-h1> | ||
| 73 | + <div> | ||
| 74 | + <div>快速</div> | ||
| 75 | + <div> | ||
| 76 | + <p>7x24小时全天实时在线</p> | ||
| 77 | + <p>全国32个城市办事处</p> | ||
| 78 | + <p>快速响应机制:承诺2小时内与客户达成沟通,必要时24小时内到场处理</p> | ||
| 79 | + </div> | ||
| 80 | + </div> | ||
| 81 | + <div> | ||
| 82 | + <div>专业</div> | ||
| 83 | + <div> | ||
| 84 | + <p>全由海格技术人员组成,提供专业技术服务 | ||
| 85 | + 拥有60余年专业经验,服务于整个项目周期服务多样化,包含且不限于邮件、电话、微信群,现场拜访交流、小型推广会等;</p> | ||
| 86 | + </div> | ||
| 87 | + </div> | ||
| 88 | + <div> | ||
| 89 | + <div>增值</div> | ||
| 90 | + <div> | ||
| 91 | + <p>为客户提供定制化服务,充分满足客户需求 | ||
| 92 | + 针对客户需求提供过保产品保养及维修服务 | ||
| 93 | + 针对现有产品(改造/升级/退市及一定使用 | ||
| 94 | + 年限)提出替换/升级方案并实施完成</p> | ||
| 95 | + </div> | ||
| 96 | + </div> | ||
| 97 | + </div> | ||
| 42 | </div> | 98 | </div> |
| 43 | </template> | 99 | </template> |
| 44 | 100 | ... | ... |
-
Please register or login to post a comment