hagerFooter.vue
9.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<!--
* @Date: 2024-09-26 13:42:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-12 14:13:11
* @FilePath: /hager/src/components/common/hagerFooter.vue
* @Description: 文件描述
-->
<template>
<div class="hager-footer">
<hager-box v-if="!is_xs">
<el-row :gutter="0" style="color: #FFF; margin: 2rem 0;">
<el-col :span="14">
<el-row :gutter="0">
<el-col :span="8">
<div class="link-box">
<div class="link-title">产品目录</div>
<div class="link-info">
<p v-for="(item, index) in footer_data.product" :key="index" @click="goToProduct(item)">{{ item.category_name }}</p>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="link-box">
<div class="link-title">解决方案</div>
<div class="link-info">
<p v-for="(item, index) in footer_data.solution" :key="index" @click="goToSolution(item)">{{ item.category_name }}</p>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="link-box">
<div class="link-title">企业</div>
<div class="link-info">
<p v-for="(item, index) in intro_list" :key="index" @click="goToCorp(item)">{{ item.c_title }}</p>
</div>
</div>
</el-col>
</el-row>
</el-col>
<el-col :span="10">
<div>
<div class="link-box" style="margin-bottom: 2rem;">
<div class="link-title">海格电气在中国</div>
<div class="link-info">
<div>来自德国的海格电气,延承德系基因的匠心与专业,为全球住宅、酒店、医院、公共建筑、商业建筑、工业及能源领域,提供安全、稳定的电气设施与服务。坚持可持续发展,专注为你,构建更安全、更清洁、更愉悦的未来电气世界。</div>
</div>
</div>
<div class="link-box">
<div class="link-title">联系我们</div>
<div class="link-info link-contact">
<p>海格电气中国总部</p>
<p>上海市静安区山西北路99号苏河湾中心21层01、02单元</p>
<p>粤ICP备2021117768号-3</p>
<p>粤公网安备44133002100282号</p>
</div>
</div>
<div style="margin-top: 2rem;">
<el-image style="width: 3rem; height: 3rem;" src="https://cdn.ipadbiz.cn/hager/img/a971ae72e8d79472164b19a1be1ccda.jpg" fit="fit"></el-image>
</div>
</div>
</el-col>
</el-row>
</hager-box>
<div v-else>
<div class="link-box xs">
<div class="link-title xs" @click="toggleCollapse('p')">
<div>产品目录</div>
<div><i class="el-icon-arrow-down"></i></div>
</div>
<el-collapse-transition>
<div v-show="show_p" class="link-info">
<p v-for="(item, index) in footer_data.product" :key="index" @click="goToProduct(item)">{{ item.category_name }}</p>
</div>
</el-collapse-transition>
</div>
<div class="link-box xs">
<div class="link-title xs" @click="toggleCollapse('s')">
<div>解决方案</div>
<div><i class="el-icon-arrow-down"></i></div>
</div>
<el-collapse-transition>
<div v-show="show_s" class="link-info">
<p v-for="(item, index) in footer_data.solution" :key="index" @click="goToSolution(item)">{{ item.category_name }}</p>
</div>
</el-collapse-transition>
</div>
<div class="link-box xs">
<div class="link-title xs" @click="toggleCollapse('c')">
<div>企业</div>
<div><i class="el-icon-arrow-down"></i></div>
</div>
<el-collapse-transition>
<div v-show="show_c" class="link-info">
<p v-for="(item, index) in intro_list" :key="index" @click="goToCorp(item)">{{ item.c_title }}</p>
</div>
</el-collapse-transition>
</div>
<div>
<div class="link-box xs" style="margin-bottom: 2rem;">
<div class="link-title">海格电气在中国</div>
<div class="link-info">
<div>来自德国的海格电气,延承德系基因的匠心与专业,为全球住宅、酒店、医院、公共建筑、商业建筑、工业及能源领域,提供安全、稳定的电气设施与服务。坚持可持续发展,专注为你,构建更安全、更清洁、更愉悦的未来电气世界。</div>
</div>
</div>
<div class="link-box xs">
<div class="link-title">联系我们</div>
<div class="link-info link-contact">
<p>海格电气中国总部</p>
<p>上海市静安区山西北路99号苏河湾中心21层01、02单元</p>
<p>粤ICP备2021117768号-3</p>
<p>粤公网安备44133002100282号</p>
</div>
</div>
<div class="link-box xs">
<el-image style="width: 3rem; height: 3rem;" src="https://cdn.ipadbiz.cn/hager/img/a971ae72e8d79472164b19a1be1ccda.jpg" fit="fit"></el-image>
</div>
</div>
</div>
</div>
</template>
<script>
import mixin from 'common/mixin';
import hagerBox from '@/components/common/hagerBox';
import { getFooterAPI } from '@/api/hager';
export default {
components: { hagerBox },
mixins: [mixin.init],
data () {
return {
footer_data: '',
show_p: false,
show_s: false,
show_c: false,
intro_list: [{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g01@2x.png',
c_title: '海格全球',
e_title: 'Hager Group',
content: '海格集团是全球领先的电气及智能化解决方案和服务提供商,应用领域涵盖住宅、商业建筑、公共建筑和工业。',
link: '/about/global',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g02@2x.png',
c_title: '海格电气在中国',
e_title: 'Hager in China',
content: '海格电气于1997 年进入中国市场,至今已在中国设立了3家工厂和32个销售办事处,通过覆盖全国的营销网络及高资质合作伙伴,为中国客户提供全球领先的解决方案和高效服务。',
link: '/about/china',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g03@2x.png',
c_title: '创新设计',
e_title: 'Innovative Design',
content: '海格电气一直致力于创新,我们与客户共同着手面向未来的主题。海格电气仔细倾听客户的声音,以使我们的设计语言能够被普遍理解。',
link: '/about/design',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/tiny/g04@2x.png',
c_title: '生产研发',
e_title: 'Production and R&D',
content: '为配合海格集团在全球的业务扩展计划,目前中国有2个生产基地,分别位于惠州和东莞,主要为亚太乃至全球市场提供优质的配电及相关产品。海格集团在全球拥有22家生产基地,主要分布于欧洲。',
link: '/about/product',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g05@2x.png',
c_title: '可持续发展',
e_title: 'Sustainable Development',
content: '海格集团是全球领先的电气及智能化解决方案和服务提供商,应用领域涵盖住宅、商业建筑、公共建筑和工业。',
link: '/about/development',
},{
img: 'https://cdn.ipadbiz.cn/hager/img/about/g06@2x.png',
c_title: '荣誉展示',
e_title: 'Honors',
content: '海格集团是行业创新领导者之一,我们与来自工业和电气领域的客户一起致力于引领面向未来的主题,如家庭互联、智能建筑技术、能源效率、生活辅助系统、电动交通、可再生能源。',
link: '/about/honors',
}],
}
},
async mounted () {
const { code, data } = await getFooterAPI();
if (code) {
this.footer_data = data;
this.$emit('send-openid', data.openid)
}
},
methods: {
toggleCollapse (type) {
if (type === 'p') { // 产品目录
this.show_p = !this.show_p;
}
if (type === 's') { // 解决方案
this.show_s = !this.show_s;
}
if (type === 'c') { // 企业
this.show_c = !this.show_c;
}
},
goToProduct (item) {
this.$router.push({
path: `/product/index/${item.id}/${Date.now()}`,
});
},
goToSolution (item) {
this.$router.push({
path: `/solution/detail/${item.id}/${Date.now()}`,
});
},
goToCorp (item) {
this.$router.push({
path: item.link,
timestamp: Date.now()
})
}
}
}
</script>
<style lang="less" scoped>
.hager-footer {
background-color: #414141;
margin-top: auto;
.link-box {
&.xs {
padding: 1rem 2rem;
}
.link-title {
font-size: 1.15rem;
font-weight: 600;
color: #FFF;
margin-bottom: 0.5rem;
&.xs {
display: flex;
justify-content: space-between;
align-items: center;
}
}
.link-info {
font-size: 0.85rem;
color: #FFF;
line-height: 2;
display: flex;
flex-direction: column;
p {
display: inline-block;
&:hover {
text-decoration: underline;
cursor: pointer;
}
}
&.link-contact {
p {
// color: #7a98c7;
&:hover {
text-decoration: underline;
cursor: pointer;
}
}
}
}
}
}
</style>