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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
| <template>
| <div class="index">
| <!-- 表头 -->
| <IndexHeader></IndexHeader>
| <!-- 轮播图 -->
| <Banner ref="Banner" :bannerList="bannerList"></Banner>
|
| <div class="bannerLink" @click="jump"></div>
|
| <!-- 轮播图控制器 -->
| <div class="bannerControl">
| <ul>
| <li
| v-for="(item, index) in bannerList"
| :key="index"
| @click="toggleBanner(index)"
| >
| <button
| class="inner"
| :class="{ active: activeBanner == index }"
| ></button>
| </li>
| </ul>
| </div>
|
| <div class="overCard">
| <div class="heart">
| <!-- 推荐卡片 -->
| <commendCard :commendCardData="commendCardData"></commendCard>
| <!-- 用户card -->
| <userCard :userCardArr="userCardArr"></userCard>
| </div>
| </div>
|
| <!-- 推荐tabs -->
| <div class="commendTabs">
| <div class="title">为您推荐</div>
| <div class="tabs">
| <div
| class="tabItem"
| :class="{ active: activeCommend === 3 }"
| @click="selecTab(3)"
| >
| <img src="/images/index/sdk.png" alt="" />
| <div class="label">算法</div>
| </div>
|
| <div
| class="tabItem"
| :class="{ active: activeCommend === 4 }"
| @click="selecTab(4)"
| >
| <img src="/images/index/app.png" alt="" />
| <div class="label">应用</div>
| </div>
| </div>
| </div>
| <!-- tab内容 -->
| <div class="commendTabsContent">
| <commendContent
| :commendData="commendData"
| @refresh="getRecommend"
| ></commendContent>
| </div>
|
| <!-- 热门产品 -->
| <div class="product">
| <div class="title">热门产品</div>
| <div
| class="productItem"
| v-for="(item, index) in productData"
| :key="index"
| :class="{ short: item.typeId == 4 || item.typeId == 1 }"
| >
| <productLeft :data="item"></productLeft>
| <rightRrid v-if="item.typeId == 3" :data="item"></rightRrid>
| <rightColumn v-if="item.typeId == 4" :data="item"></rightColumn>
| <rightForm v-if="item.typeId == 1" :data="item"></rightForm>
| <rightTabs v-if="item.typeId == 2" :data="item"></rightTabs>
| </div>
|
| <div
| class="productItem"
| v-for="(item, index) in productData1"
| :key="index + '1'"
| :class="{ short: item.typeId == 4 || item.typeId == 1 }"
| >
| <productLeft :data="item"></productLeft>
| <rightForm v-if="item.typeId == 1" :data="item"></rightForm>
| <rightTabs v-if="item.typeId == 2" :data="item"></rightTabs>
| </div>
| </div>
|
| <Connect></Connect>
|
| <!-- 页尾 -->
| <Footer></Footer>
| </div>
| </template>
|
| <script>
| import Banner from "@/views/index/components/banner";
| import IndexHeader from "@/components/IndexHeader";
| import commendCard from "@/views/index/components/commendCard";
| import userCard from "@/views/index/components/userCard";
| import commendContent from "@/views/index/components/commendContent";
| import productLeft from "@/views/index/components/productLeft";
| import rightRrid from "@/views/index/components/rightRrid";
| import rightColumn from "@/views/index/components/rightColumn";
| import rightForm from "@/views/index/components/rightForm";
| import rightTabs from "@/views/index/components/rightTabs";
| import Connect from "@/components/Connect";
| import Footer from "@/components/Footer";
|
| import {
| getIndexPics,
| getIndexModelRecommend,
| getModelList,
| } from "@/api/product";
| import { getUserOrderInfo } from "@/api/order";
|
| export default {
| name: "Index",
| components: {
| Banner,
| IndexHeader,
| commendCard,
| userCard,
| commendContent,
| productLeft,
| rightRrid,
| rightColumn,
| rightForm,
| rightTabs,
| Connect,
| Footer,
| },
| created() {
| this.getBanner();
| this.getRecommend();
| this.getModule();
| this.getUserBuyInfo();
| },
| data() {
| return {
| commendCardData: [
| {
| img: "/images/index/compute.png",
| title: "全民云计算",
| des: "云服务特惠,限时3折起",
| router: "/",
| },
| {
| img: "/images/index/beforeSell.png",
| title: "售前咨询",
| des: "致电0315-2233066,领取您的专属权益",
| router: "/",
| },
| {
| img: "/images/index/trialCenter.png",
| title: "试用中心",
| des: "算法免费试用,为您提供 0 门槛实践机会",
| router: "/trialCenter",
| },
| ], //推荐卡片数据
| activeBanner: 0, //选中的banner
| activeCommend: 3, //选中的推荐tabs
| commendData: [], //推荐tab的数据
| productData: [],
| userCardArr: [],
| productData1: [
| {
| router: "/",
| typeId: 1,
| pic: "/images/index/modelbgc2.png",
| name: "云服务",
| desc: "一键购买,开启AI应用之旅",
| product: {
| title: "AI-0",
| menu: [
| "几十种算法免费使用",
| "不限流量",
| "录像云端存储,砸不坏,偷不走",
| "金融级加密技术,保障数据安全",
| "告警数据实时提醒",
| "支持循环存储最近 30 天的活动录像",
| "弹性可伸缩的计算服务",
| ],
| price: [
| {
| year: 1,
| priceNew: "540.00",
| priceOld: "900.00",
| discount: "",
| },
| {
| year: 2,
| priceNew: "1000.00",
| priceOld: "1800.00",
| discount: "8",
| },
| {
| year: 3,
| priceNew: "1400.00",
| priceOld: "2700.00",
| discount: "7",
| },
| ],
| },
| },
|
| {
| router: "/",
| typeId: 2,
| pic: "/images/index/modelbgc.png",
| name: "边缘计算设备",
| desc:
| "一种部署在近场侧的高可用的软硬一体产品,提升应用程序的快速响应能力、节省带宽流量成本",
| product: [
| {
| name: "边缘计算设备1",
| title: "LE-V-S003 高性能边缘计算主机",
| des:
| "专为高性能视频应用打造,强悍的双志强处理器,轻松应对高算力应用场景的需求。",
| content: [
| {
| key: "特点",
| value: [
| "搭载两颗高性能志强处理器,可提供高达64T的凶猛算力",
| "Server系列,具备单台与集群服务",
| "支持算力虚拟化管控,高稳定性单机热备",
| ],
| },
|
| {
| key: "配置",
| value: [
| "英特尔 志强 Silver 4114 10核处理器 x 2",
| "64GB 内存 (16GB x 4) + 480GB SSD 存储 + 8TB HDD 存储 千兆 LAN x 4",
| ],
| },
| ],
| img: "/images/index/equipment.png",
| },
| {
| name: "边缘计算设备2",
| title: "LE-V-S003 高性能边缘计算主机",
| des:
| "专为高性能视频应用打造,强悍的双志强处理器,轻松应对高算力应用场景的需求。",
| content: [
| {
| key: "特点",
| value: [
| "搭载两颗高性能志强处理器,可提供高达64T的凶猛算力",
| "Server系列,具备单台与集群服务",
| "支持算力虚拟化管控,高稳定性单机热备",
| ],
| },
|
| {
| key: "配置",
| value: [
| "英特尔 志强 Silver 4114 10核处理器 x 2",
| "64GB 内存 (16GB x 4) + 480GB SSD 存储 + 8TB HDD 存储 千兆 LAN x 4",
| ],
| },
| ],
| img: "/images/index/equipment.png",
| },
| {
| name: "边缘计算设备3",
| title: "LE-V-S003 高性能边缘计算主机",
| des:
| "专为高性能视频应用打造,强悍的双志强处理器,轻松应对高算力应用场景的需求。",
| content: [
| {
| key: "特点",
| value: [
| "搭载两颗高性能志强处理器,可提供高达64T的凶猛算力",
| "Server系列,具备单台与集群服务",
| "支持算力虚拟化管控,高稳定性单机热备",
| ],
| },
|
| {
| key: "配置",
| value: [
| "英特尔 志强 Silver 4114 10核处理器 x 2",
| "64GB 内存 (16GB x 4) + 480GB SSD 存储 + 8TB HDD 存储 千兆 LAN x 4",
| ],
| },
| ],
| img: "/images/index/equipment.png",
| },
| {
| name: "边缘计算设备4",
| title: "LE-V-S003 高性能边缘计算主机",
| des:
| "专为高性能视频应用打造,强悍的双志强处理器,轻松应对高算力应用场景的需求。",
| content: [
| {
| key: "特点",
| value: [
| "搭载两颗高性能志强处理器,可提供高达64T的凶猛算力",
| "Server系列,具备单台与集群服务",
| "支持算力虚拟化管控,高稳定性单机热备",
| ],
| },
|
| {
| key: "配置",
| value: [
| "英特尔 志强 Silver 4114 10核处理器 x 2",
| "64GB 内存 (16GB x 4) + 480GB SSD 存储 + 8TB HDD 存储 千兆 LAN x 4",
| ],
| },
| ],
| img: "/images/index/equipment.png",
| },
| {
| name: "边缘计算设备5",
| title: "LE-V-S003 高性能边缘计算主机",
| des:
| "专为高性能视频应用打造,强悍的双志强处理器,轻松应对高算力应用场景的需求。",
| content: [
| {
| key: "特点",
| value: [
| "搭载两颗高性能志强处理器,可提供高达64T的凶猛算力",
| "Server系列,具备单台与集群服务",
| "支持算力虚拟化管控,高稳定性单机热备",
| ],
| },
|
| {
| key: "配置",
| value: [
| "英特尔 志强 Silver 4114 10核处理器 x 2",
| "64GB 内存 (16GB x 4) + 480GB SSD 存储 + 8TB HDD 存储 千兆 LAN x 4",
| ],
| },
| ],
| img: "/images/index/equipment.png",
| },
| {
| name: "边缘计算设备6",
| title: "LE-V-S003 高性能边缘计算主机",
| des:
| "专为高性能视频应用打造,强悍的双志强处理器,轻松应对高算力应用场景的需求。",
| content: [
| {
| key: "特点",
| value: [
| "搭载两颗高性能志强处理器,可提供高达64T的凶猛算力",
| "Server系列,具备单台与集群服务",
| "支持算力虚拟化管控,高稳定性单机热备",
| ],
| },
|
| {
| key: "配置",
| value: [
| "英特尔 志强 Silver 4114 10核处理器 x 2",
| "64GB 内存 (16GB x 4) + 480GB SSD 存储 + 8TB HDD 存储 千兆 LAN x 4",
| ],
| },
| ],
| img: "/images/index/equipment.png",
| },
| ],
| },
| ], // 热门产品数据
| timer: null, //向上回滚动画
| ConnectTimer: null, // 控制弹层的定时器
| bannerList: [],
| };
| },
| methods: {
| getUserBuyInfo() {
| getUserOrderInfo({}).then((res) => {
| this.userCardArr = [
| {
| num: res.data.needPay,
| label: "待付款",
| },
| {
| num: res.data.needRenewal,
| label: "待续费",
| },
| {
| num: "_",
| label: "消息中心",
| },
| ];
| });
| },
| // 切换banner
| toggleBanner(i) {
| this.activeBanner = i;
| this.$refs["Banner"].toggleBanner(i);
| },
| //获取轮播图
| async getBanner() {
| const res = await getIndexPics();
| if (res.success) {
| this.bannerList = res.data.lists;
| }
| },
| //轮播图跳转连接
| jump() {
| if (this.bannerList[this.activeBanner].url) {
| window.open(this.bannerList[this.activeBanner].url);
| }
| },
| //获取推荐列表
| async getRecommend() {
| const res = await getIndexModelRecommend({ typeId: this.activeCommend });
| this.commendData = res.data.productList;
| },
| // 获取产品列表
| async getModule() {
| const res = await getModelList();
| if (res && res.success) {
| this.productData = res.data.modelList;
| }
| },
| //选择推荐tab
| selecTab(id) {
| this.activeCommend = id;
| this.getRecommend();
| },
| },
| beforeRouteLeave(to, from, next) {
| let userInfo = sessionStorage.getItem("userInfo");
| if (
| !userInfo &&
| to.path !== "/login" &&
| to.path !== "/register" &&
| to.path !== "/connectUs"
| ) {
| next({ path: "/login" });
| } else {
| next();
| }
| },
| };
| </script>
|
| <style scoped lang="scss">
| .index {
| position: relative;
|
| .bannerControl {
| position: absolute;
| width: 1280px;
| height: calc(28.18vw - 92px);
| min-height: 278px;
| bottom: 80px;
| top: 62px;
| left: 0;
| right: 0;
| transform: none;
| margin: 0 auto;
| z-index: 2;
|
| ul {
| position: absolute;
| bottom: 0;
| right: 0;
| left: 0;
| }
|
| li {
| display: inline-block;
| padding: 12px 4px;
| background-color: transparent;
| cursor: pointer;
|
| .inner {
| display: block;
| opacity: 0.48;
| width: 30px;
| height: 2px;
| background-color: #fff;
| border: none;
| outline: none;
| padding: 0;
| margin: 0;
| cursor: pointer;
| transition: 0.3s;
|
| &.active {
| background-color: #0065ff;
| opacity: 1;
| }
| }
| }
| }
|
| .bannerLink {
| top: 60px;
| position: absolute;
| width: 100%;
| height: calc(28.18vw - 132px);
| min-height: 236px;
| cursor: pointer;
| z-index: 3;
| }
|
| .overCard {
| position: absolute;
| height: calc(28.18vw + 38px);
| min-height: 408px;
| width: 100%;
| top: 62px;
|
| .heart {
| position: absolute;
| bottom: 0;
| left: 0;
| right: 0;
| display: flex;
| width: 1280px;
| margin: 0 auto;
| justify-content: space-between;
| }
| }
|
| .commendTabs {
| overflow: hidden;
| height: 258px;
| min-width: 1280px;
| background: #ffffff;
| box-shadow: 0px 4px 4px rgba(0, 43, 106, 0.12);
|
| .title {
| margin-top: 82px;
| font-size: 28px;
| text-align: center;
| }
|
| .tabs {
| width: 320px;
| margin: 0 auto;
| margin-top: 20px;
| display: flex;
| justify-content: space-between;
|
| .tabItem {
| text-align: center;
| cursor: pointer;
|
| img {
| width: 60px;
| margin-bottom: 6px;
| }
|
| .label {
| margin-bottom: 27px;
| font-size: 16px;
| }
|
| &.active {
| border-bottom: 2px solid #0065ff;
| .label {
| color: #0065ff;
| font-weight: 700;
| }
| }
| }
| }
| }
|
| .commendTabsContent {
| padding: 80px 0;
| background-color: rgb(243, 245, 248);
| min-width: 1280px;
| }
|
| .product {
| background: url("/images/index/background.png");
| overflow: hidden;
| min-width: 1280px;
|
| .title {
| margin: 80px 0 60px 0;
| padding-top: 20px;
| min-width: 1280px;
| text-align: center;
| font-size: 28px;
| }
|
| .productItem {
| margin: 0 auto;
| margin-bottom: 60px;
| height: 462px;
| width: 1280px;
| display: flex;
|
| &.short {
| height: 400px;
| }
| }
| }
| }
| </style>
|
|