hookehuyr

✨ feat: 新增关于海格首页

1 /* 1 /*
2 * @Date: 2024-08-26 10:42:15 2 * @Date: 2024-08-26 10:42:15
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-09-30 09:47:44 4 + * @LastEditTime: 2024-10-17 09:22:48
5 * @FilePath: /hager/src/route.js 5 * @FilePath: /hager/src/route.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -50,4 +50,13 @@ export default [{ ...@@ -50,4 +50,13 @@ export default [{
50 tag: 'solution' 50 tag: 'solution'
51 }, 51 },
52 children: [] 52 children: []
53 +}, {
54 + path: '/about',
55 + name: '关于海格',
56 + component: () => import('@/views/about'),
57 + meta: {
58 + title: '海格电器',
59 + tag: 'about'
60 + },
61 + children: []
53 }] 62 }]
......
1 +<!--
2 + * @Date: 2024-10-17 09:22:56
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2024-10-17 10:46:59
5 + * @FilePath: /hager/src/views/about/index.vue
6 + * @Description: 文件描述
7 +-->
8 +<template>
9 + <div class="hager-about-page">
10 + <hager-box class="top-img" :style="{ height: top_img_height, backgroundImage: 'url(https://cdn.ipadbiz.cn/hager/banner/banner04@2x.png)' }">
11 + <div v-if="!is_xs" class="banner-text-wrapper top-center">
12 + <div class="text">
13 + <p class="title">海格E3可持续发展理念</p>
14 + <p class="sub">Ethics 道德</p>
15 + <p class="sub">Environment 环境</p>
16 + <p class="sub">Energy 能源</p>
17 + </div>
18 + </div>
19 + </hager-box>
20 + <hager-box class="box-n" style="margin-top: 2rem;">
21 + <el-row v-for="(item, index) in intro_list" :key="index" style="margin-bottom: 3rem;">
22 + <el-col :span="12">
23 + <div v-if="index % 2 === 0" class="about-img" :style="{ 'background-image': 'url('+ item.img +')' }"></div>
24 + <div v-else class="about-box">
25 + <div class="title">
26 + <p class="c">{{ item.c_title }}</p>
27 + <p class="e">{{ item.e_title }}</p>
28 + </div>
29 + <div class="introduce" v-clamp="3">{{ item.content }}</div>
30 + <div class="more">
31 + <div class="btn" @click="goTo(item.link)">MORE</div>
32 + </div>
33 + </div>
34 + </el-col>
35 + <el-col :span="12">
36 + <div v-if="index % 2 === 0" class="about-box">
37 + <div class="title">
38 + <p class="c">{{ item.c_title }}</p>
39 + <p class="e">{{ item.e_title }}</p>
40 + </div>
41 + <div class="introduce" v-clamp="3">{{ item.content }}</div>
42 + <div class="more">
43 + <div class="btn" @click="goTo(item.link)">MORE</div>
44 + </div>
45 + </div>
46 + <div v-else class="about-img" :style="{ 'background-image': 'url('+ item.img +')' }"></div>
47 + </el-col>
48 + </el-row>
49 + </hager-box>
50 + </div>
51 +</template>
52 +
53 +<script>
54 +import mixin from 'common/mixin';
55 +import hagerBox from '@/components/common/hagerBox';
56 +
57 +export default {
58 + components: { hagerBox },
59 + mixins: [mixin.init],
60 + data () {
61 + return {
62 + intro_list: [{
63 + img: 'https://cdn.ipadbiz.cn/hager/img/about/g01@2x.png',
64 + c_title: '海格全球',
65 + e_title: 'Hager Group',
66 + content: '海格集团是全球领先的电气及智能化解决方案和服务提供商,应用领域涵盖住宅、商业建筑、公共建筑和工业。',
67 + link: '/about/global',
68 + },{
69 + img: 'https://cdn.ipadbiz.cn/hager/img/about/g02@2x.png',
70 + c_title: '海格电气在中国',
71 + e_title: 'Hager in China',
72 + content: '海格电气于1997 年进入中国市场,至今已在中国设立了3家工厂和32个销售办事处,通过覆盖全国的营销网络及高资质合作伙伴,为中国客户提供全球领先的解决方案和高效服务。',
73 + link: '/about/china',
74 + },{
75 + img: 'https://cdn.ipadbiz.cn/hager/img/about/g03@2x.png',
76 + c_title: '创新设计',
77 + e_title: 'Innovative Design',
78 + content: '海格电气一直致力于创新,我们与客户共同着手面向未来的主题。海格电气仔细倾听客户的声音,以使我们的设计语言能够被普遍理解。',
79 + link: '/about/design',
80 + },{
81 + img: 'https://cdn.ipadbiz.cn/hager/img/about/g04@2x.png',
82 + c_title: '生产研发',
83 + e_title: 'Production and R&D',
84 + content: '为配合海格集团在全球的业务扩展计划,目前中国有2个生产基地,分别位于惠州和东莞,主要为亚太乃至全球市场提供优质的配电及相关产品。海格集团在全球拥有22家生产基地,主要分布于欧洲。',
85 + link: '/about/product',
86 + },{
87 + img: 'https://cdn.ipadbiz.cn/hager/img/about/g05@2x.png',
88 + c_title: '可持续发展',
89 + e_title: 'Sustainable Development',
90 + content: '海格集团是全球领先的电气及智能化解决方案和服务提供商,应用领域涵盖住宅、商业建筑、公共建筑和工业。',
91 + link: '/about/development',
92 + },{
93 + img: 'https://cdn.ipadbiz.cn/hager/img/about/g06@2x.png',
94 + c_title: '荣誉展示',
95 + e_title: 'Honors',
96 + content: '海格集团是行业创新领导者之一,我们与来自工业和电气领域的客户一起致力于引领面向未来的主题,如家庭互联、智能建筑技术、能源效率、生活辅助系统、电动交通、可再生能源。',
97 + link: '/about/honors',
98 + }]
99 + }
100 + },
101 + mounted () {
102 +
103 + },
104 + methods: {
105 +
106 + }
107 +}
108 +</script>
109 +
110 +<style lang="less" scoped>
111 + .hager-about-page {
112 + .top-img {
113 + width: 100%;
114 + background-repeat: no-repeat;
115 + background-size: cover;
116 + background-position: center;
117 + position: relative;
118 + .top-center {
119 + position: absolute;
120 + transform: translateY(100%); /* 垂直与水平居中 */
121 + }
122 + }
123 +
124 + .about-img {
125 + width: 100%;
126 + height: 20rem;
127 + background-repeat: no-repeat;
128 + background-size: cover;
129 + }
130 + .about-box {
131 + background-color: #F7F7F7;
132 + position: relative; /* 父容器设置为相对定位 */
133 + padding: 2rem;
134 + height: 20rem; /* 让 .about-box 撑满父容器 */
135 + box-sizing: border-box;
136 + .title {
137 + font-weight: bold;
138 + .c {
139 + font-size: 2rem;
140 + color: @secondary-color;
141 + }
142 + .e {
143 + font-size: 1.5rem;
144 + color: @primary-color;
145 + }
146 + }
147 + .introduce {
148 + position: absolute; /* 绝对定位 */
149 + overflow: auto; /* 防止内容过多时溢出 */
150 + margin-top: 1rem;
151 + padding-right: 1rem;
152 + line-height: 1.75;
153 + }
154 + .more {
155 + position: absolute; /* 固定在容器底部 */
156 + bottom: 1rem;
157 + .btn {
158 + background-color: #F56400;
159 + width: 8rem;
160 + height: 1rem;
161 + padding: 1rem;
162 + color: #FFF;
163 + text-align: center;
164 + line-height: 1rem;
165 + &:hover {
166 + background-color: #FFF;
167 + color: #F56400;
168 + cursor: pointer;
169 + border: 1px solid #F56400;
170 + }
171 + }
172 + }
173 + }
174 + }
175 +</style>