detail.vue
11.5 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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<!--
* @Date: 2024-09-29 15:49:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-16 17:42:18
* @FilePath: /hager/src/views/solution/detail.vue
* @Description: 文件描述
-->
<template>
<div class="hager-solution-detail">
<hager-box class="top-img" :style="{ height: top_img_height, backgroundImage: 'url(https://cdn.ipadbiz.cn/hager/banner/banner03@2x.png)' }">
<div v-if="!is_xs" class="banner-text-wrapper top-center">
<div class="text">
<p class="title">学校解决方案</p>
<p class="sub">Campus Solution</p>
</div>
<div class="text-sub">
海格用丰富的行业知识和应用经验,为多个行业提供先进的数字化解决方案。
</div>
</div>
</hager-box>
<hager-box class="box-n">
<el-row :gutter="0">
<el-col :span="12" style="height: 25rem;">
<el-carousel height="25rem" :interval="8000" style="border-radius: 5px;">
<el-carousel-item v-for="(item, index) in banner_list" :key="index" class="carousel-img">
<el-image @click="onClickImg(item.src)" style="width: 100%; height: 100%;" fit="fill" :src="item.src"></el-image>
</el-carousel-item>
</el-carousel>
</el-col>
<el-col class="brief-introduction" :span="12">
<div class="intro-box">
<hager-h1 title="学校解决方案" sub="Electronic solutions"></hager-h1>
<p style="margin: 2rem 0;">淨於电气开乐驾能民电峰决方案,提供安全。可靠。摄作友好。易于堆护的电力划! 1h14. n53 X0(009121 3098. 228 41324849 56MeD 换至备用电源,保障救学和生活的连续性。</p>
<i class="el-icon-right"></i>
</div>
</el-col>
</el-row>
</hager-box>
<hager-box class="box-2n">
<hager-h1 title="成功案例" sub="Success Cases" style="margin: 2rem 0;"></hager-h1>
<div class="hager-success-cases">
<div class="card" v-for="(item, index) in success_data_list" :key="index">
<img :src="item.img" alt="学校图片" class="card-image">
<div class="card-content">
<h3>{{ item.title }}</h3>
<p>{{ item.sub }}</p>
<i class="el-icon-right"></i>
</div>
</div>
</div>
<div style="display: flex; justify-content: center; margin-top: 2rem;">
<hager-more></hager-more>
</div>
</hager-box>
<hager-box class="box-n">
<hager-h1 title="使用产品" sub="Our advantages" style="margin: 2rem 0;"></hager-h1>
<swiper ref="myProductSwiper" class="swiper" :options="swiperOption" @slideChange="onProductSlideChange">
<swiper-slide v-for="(item, index) in product_list" :key="index">
<div class="card-box" @click="goToProduct(item)">
<div class="card-image-wrapper">
<el-image :src="item.src" fit="fit"></el-image>
</div>
<p class="card-title">{{ item.title }}</p>
</div>
</swiper-slide>
</swiper>
<div class="hager-product-center-more">
<hager-more></hager-more>
<div class="xs-control">
<div>
<i :class="['el-icon-arrow-left', activeProductIndex === 0 ? 'disabled' : '']" @click="prevProductBtn()"></i>
<i :class="['el-icon-arrow-right', reach_product_end ? 'disabled' : '']" @click="nextProductBtn()"></i>
</div>
</div>
</div>
</hager-box>
<hager-service style="background-color: #f1f1f1;"></hager-service>
</div>
</template>
<script>
import mixin from 'common/mixin';
import hagerBox from '@/components/common/hagerBox';
import hagerH1 from '@/components/common/hagerH1.vue';
import hagerMore from '@/components/hagerMore.vue';
import hagerHCarousel from '@/components/hagerHCarousel.vue';
import hagerService from '@/components/common/hagerService.vue';
export default {
components: { hagerBox, hagerH1, hagerMore, hagerHCarousel, hagerService },
mixins: [mixin.init],
data () {
return {
banner_list: [
{
src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
url: ''
},
{
src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
url: ''
}
],
success_data_list: [{
title: '厦门翔城中小学',
sub: '占地面积约43811.99平方米,总建筑面积约32188.83平方米,规模48个教学班,可提供2400个优质初中学位。翔城中学是翔安第一所拥有游泳馆的中学。',
img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}, {
title: '厦门翔城中小学',
sub: '占地面积约43811.99平方米,总建筑面积约32188.83平方米,规模48个教学班,可提供2400个优质初中学位。翔城中学是翔安第一所拥有游泳馆的中学。',
img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}, {
title: '厦门翔城中小学',
sub: '占地面积约43811.99平方米,总建筑面积约32188.83平方米,规模48个教学班,可提供2400个优质初中学位。翔城中学是翔安第一所拥有游泳馆的中学。',
img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}, {
title: '厦门翔城中小学',
sub: '占地面积约43811.99平方米,总建筑面积约32188.83平方米,规模48个教学班,可提供2400个优质初中学位。翔城中学是翔安第一所拥有游泳馆的中学。',
img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}, {
title: '厦门翔城中小学',
sub: '占地面积约43811.99平方米,总建筑面积约32188.83平方米,规模48个教学班,可提供2400个优质初中学位。翔城中学是翔安第一所拥有游泳馆的中学。',
img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}, {
title: '厦门翔城中小学',
sub: '占地面积约43811.99平方米,总建筑面积约32188.83平方米,规模48个教学班,可提供2400个优质初中学位。翔城中学是翔安第一所拥有游泳馆的中学。',
img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
}],
product_list: [{
src: 'https://cdn.ipadbiz.cn/hager/img/KNX%E6%99%BA%E8%83%BD%E6%8E%A7%E5%88%B6%E6%A8%A1%E5%9D%97@2x.png',
title: 'hw01 空气断路器'
}, {
src: 'https://cdn.ipadbiz.cn/hager/img/ats%E8%87%AA%E5%8A%A8%E8%BD%AC%E6%8D%A2%E5%BC%80%E5%85%B3@2x.png',
title: 'h3+ 智能塑壳断路器'
}, {
src: 'https://cdn.ipadbiz.cn/hager/img/h3+%20%E6%99%BA%E8%83%BD%E5%A1%91%E5%A3%B3%E6%96%AD%E8%B7%AF%E5%99%A8@2x.png',
title: 'ats自动转换开关'
}, {
src: 'https://cdn.ipadbiz.cn/hager/img/hw+%20%E7%A9%BA%E6%B0%94%E6%96%AD%E8%B7%AF%E5%99%A8@2x.png',
title: 'KNX智能控制模块'
}, {
src: 'https://cdn.ipadbiz.cn/hager/img/hw+%20%E7%A9%BA%E6%B0%94%E6%96%AD%E8%B7%AF%E5%99%A8@2x.png',
title: 'KNX智能控制模块'
}],
swiperOption: {
slidesPerView: 2,
spaceBetween: 50,
preventClicks : true,
slideToClickedSlide: false,
touchRatio: 0,
breakpoints: {
1024: {
slidesPerView: 4,
spaceBetween: 40
},
768: {
slidesPerView: 3,
spaceBetween: 30
},
640: {
slidesPerView: 2,
spaceBetween: 20
},
320: {
slidesPerView: 2,
spaceBetween: 10
},
160: {
slidesPerView: 1,
spaceBetween: 0
}
}
},
activeSolutionIndex: 0,
activeProductIndex: 0,
reach_product_end: false,
}
},
mounted () {
},
methods: {
onClickImg (item) {
window.open(item, '_blank');
},
goToProduct (v) {
this.$router.push({
path: '/product/detail'
});
},
prevProductBtn () {
this.$refs.myProductSwiper.$swiper.slidePrev();
},
nextProductBtn () {
this.$refs.myProductSwiper.$swiper.slideNext();
},
onProductSlideChange () {
this.activeProductIndex = this.$refs.myProductSwiper.$swiper.activeIndex;
const isEnd = this.$refs.myProductSwiper.$swiper.isEnd;
if (isEnd) {
this.reach_product_end = true;
} else {
this.reach_product_end = false;
}
},
}
}
</script>
<style lang="less" scoped>
.hager-solution-detail {
.top-img {
width: 100%;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
position: relative;
.top-center {
position: absolute;
transform: translateY(100%); /* 垂直与水平居中 */
}
}
.carousel-img {
&:hover {
cursor: zoom-in;
}
}
.brief-introduction {
background-color: #FFF;
height: 25rem;
.intro-box {
padding: 3rem;
i {
color: @primary-color;
font-size: 1.5rem;
}
}
}
.hager-success-cases {
margin-top: 2rem;
display: grid;
grid-template-columns: repeat(3, 1fr); /* 一行显示4个 */
gap: 1.5rem; /* 每个项目之间的间距 */
.case-item {
position: relative;
height: 12rem;
padding: 1.5rem;
text-align: center;
color: #FFF;
border-radius: 8px;
background-image: url('https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg');
background-size: cover;
background-position: top center;
transition: transform 0.3s ease-in-out;
&:hover {
transform: scale(1.05);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
cursor: pointer;
}
}
.card {
// width: 300px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
background-color: #fff;
margin: 0;
transition: transform 0.3s ease-in-out;
&:hover {
transform: scale(1.05);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
cursor: pointer;
}
.card-image {
width: 100%;
height: auto;
object-fit: cover;
}
.card-content {
padding: 1rem 1.5rem;
h3 {
color: @secondary-color;
font-size: 1.25rem;
margin: 0;
margin-bottom: 0.5rem;
}
p {
font-size: 0.95rem;
line-height: 1.8;
}
i {
margin-top: 1rem;
color: @primary-color;
font-size: 1.5rem;
}
}
.card p {
font-size: 14px;
color: #333;
line-height: 1.6;
margin-bottom: 15px;
}
}
}
.xs-control {
display: flex;
justify-content: flex-end;
margin-top: 1rem;
i {
font-size: 1.35rem;
color: #EE6D10;
&:hover {
cursor: pointer;
}
&.disabled {
color: #ccc;
}
}
}
.card-box {
.card-image-wrapper {
background-color: #F3F3F3;
border-radius: 5px;
transition: transform 0.3s ease-in-out;
&:hover {
transform: scale(1.05);
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
cursor: pointer;
}
}
.card-title {
color: @secondary-color;
font-weight: bold;
margin: 1rem 0;
&:hover {
cursor: pointer;
text-decoration: underline;
}
}
}
}
</style>