king
2019-08-11 4e1cca0e3da79819fa3768402ce6a174aea5131f
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
<template>
    <div class="header" :class="!isShow ? '' : 'h_height'">
        <div class="wrapper">
            <a class="logo"><img src="../img/index_logo.png" alt=""></a>
            <div class="nav" @mouseleave="leave()">
                <router-link tag="span" class="homeico m_hide" to="/"><img src="../img/homeico.png" alt=""></router-link>
                <span class="homeico p_hide" @click="jump('/')"><img src="../img/homeico.png" alt=""></span>
                <span class="navico" v-if="!isShow" @click="showNav"><img src="../img/navico.png" alt=""></span>
                <span class="navico" v-else @click="showNav"><img src="../img/close.png" alt=""></span>
                <ul class="nav_ul" ref="nav_ul">
                    <router-link tag="li" v-for="(menu, index) in menus" :key="index" :to="menu.url" :class="{active1: cur === index}">
                        <span @mouseover="add(index)">{{ menu.text }}</span>
                    </router-link>
                    <!-- <div class="list1 list3" :class="{active:this.menus[1].flag === true}" @click="menus[1].flag = false" v-if="menus[1].flag"></div> -->
                    <div :class="{active:this.menus[1].flag==true}" class="list1" @click="adda(1)" v-if="menus[1].flag">
                        <ul class="abloutMingKe_ul">
                            <router-link @click="add1($event,index)" tag="li" v-for="(secondMenus,index) in secondMenus" :key="index" :to="secondMenus.url">{{secondMenus.text}}</router-link>
                        </ul>
                        <ul class="abloutMingKe_ul1">
                            <router-link tag="li" v-for="(secondMenus,index) in secondMenus1" :key="index" :to="secondMenus.url">{{secondMenus.text}}</router-link>
                        </ul>
                    </div>
                    <!-- <div class="list1 list33" :class="{active:this.menus[1].flag==true}" @click="menus[1].flag = false" v-if="menus[1].flag"></div> -->
                    <!-- <div :class="{active:this.menus[5].flag==true}" class="list1 list33" @click="menus[5].flag = false" v-if="menus[5].flag"></div> -->
                    <div :class="{active:this.menus[5].flag==true}" class="list2" @click="adda(5)" v-if="menus[5].flag">
                        <ul class="abloutMingKe_ul2">
                            <li v-for="(secondMenus,index) in secondMenus2" @click="add5(secondMenus.url,index+1)" :key="index">{{secondMenus.text}}</li>
                        </ul>
                    </div>
                    <!-- <div :class="{active:this.menus[5].flag==true}" class="list2 list5" @click="menus[5].flag = false" v-if="menus[5].flag"></div> -->
                </ul>
            </div>
        </div>
 
        <div :class="!isShow ? 'nav_ul' : 'plane'" style="height: 100%;background-color: #282830;display: none;margin-top:0.3rem">
            <el-collapse accordion>
                <el-collapse-item>
                    <template slot="title">
                        <span class="title_s">产品中心</span>
                    </template>
                    <div class="menu3" @click="jump('center')" style="color: #fff;">产品中心</div>
                    <div class="menu3" @click="jump('productCenter')">MingKeOS</div>
                    <div class="menu3" @click="jump('productCenter')">智慧仓储</div>
                    <div class="menu3 more" @click="jump('center')">更多 <img src="../img/more.png" alt=""></div>
                    <div style="clear: both;"></div>
                    <div class="menu3" @click="jump('caseSolution')" style="color: #fff;">解决方案</div>
                    <div class="menu3" @click="jump('caseDetail')">电动工具行业解决方案</div>
                    <div class="menu3" @click="jump('caseDetail')">系统集成行业解决方案</div>
                    <div class="menu3" @click="jump('caseDetail')">电子商务行业解决方案</div>
                    <div class="menu3" @click="jump('caseDetail')">制药行业解决方案</div>
                    <div class="menu3 more" @click="jump('caseSolution')">更多 <img src="../img/more.png" alt=""></div>
                    <div style="clear: both;"></div>
                </el-collapse-item>
                <el-collapse-item class="el_coll">
                    <template slot="title">
                        <span @click="jump('successCase')" class="title_s">成功案例</span>
                    </template>
                </el-collapse-item>
                <el-collapse-item class="el_coll">
                    <template slot="title">
                        <span @click="jump('partner')" class="title_s">渠道合作</span>
                    </template>
                </el-collapse-item>
                <el-collapse-item class="el_coll">
                    <template slot="title">
                        <span @click="jump('news')" class="title_s">新闻资讯</span>
                    </template>
                </el-collapse-item>
                <el-collapse-item>
                    <template slot="title">
                        <span @click="jump('companyProfile')" class="title_s">关于明科</span>
                    </template>
                    <div class="menu2" @click="jump('companyProfile#anchor-1')">企业文化</div>
                    <div class="menu2" @click="jump('companyProfile#anchor-2')">荣誉资质</div>
                    <div class="menu2" @click="jump('companyProfile#anchor-3')">联系明科</div>
                    <div class="menu2" @click="jump('joinMingKe')">加入明科</div>
                </el-collapse-item>
            </el-collapse>
        </div>
    </div>
</template>
 
<script>
    export default {
        name: 'Header',
        data() {
            return {
                activeNames: ['1'],
                cur: 0,
                isShow: false,
                isShowChild: false,
                menus: [{
                        text: '首页',
                        url: '/',
                    },
                    {
                        text: '产品中心',
                        url: '',
                        flag: false,
                    },
                    {
                        text: '成功案例',
                        url: '/successCase',
                    },
                    {
                        text: '渠道合作',
                        url: '/partner'
                    },
                    {
                        text: '新闻资讯',
                        url: '/news'
                    },
                    {
                        text: '关于明科',
                        url: '/companyProfile',
                        flag: false,
                    }
                ],
                secondMenus: [{
                        text: '产品中心',
                        url: 'center'
                    },
                    {
                        text: 'MingKeOS',
                        url: 'productCenter'
                    },
                    {
                        text: '智慧仓储',
                        url: 'productCenter'
                    },
                    {
                        text: '质量追溯',
                        url: 'productCenter'
                    },
                    {
                        text: '更多 》',
                        url: '/center'
                    },
                ],
                secondMenus1: [{
                        text: '解决方案',
                        url: '/caseSolution'
                    },
                    {
                        text: '电动工具行业解决方案',
                        url: '/caseDetail'
                    },
                    {
                        text: '系统集成行业解决方案',
                        url: '/caseDetail'
                    },
                    {
                        text: '电子商务行业解决方案',
                        url: '/caseDetail'
                    },
                    {
                        text: '制药行业解决方案',
                        url: '/caseDetail'
                    },
                    {
                        text: '更多 》',
                        url: '/caseSolution'
                    }
                ],
                secondMenus2: [{
                        text: '企业文化',
                        url: '/companyProfile'
                    },
                    {
                        text: '荣誉资质',
                        url: '/companyProfile'
                    },
                    {
                        text: '联系明科',
                        url: '/companyProfile'
                    },
                    {
                        text: '加入明科',
                        url: '/joinMingKe'
                    },
                ]
            }
        },
        methods: {
            goHere (path) {
                this.$router.push({
                    path: path
                });
            },
            showNav () {
                this.isShow = !this.isShow;
                this.$refs.nav_ul.style.left = this.isShow ? (0 + 'px') : (-1000 + 'px')
            },
            add (index) {
                this.cur = index
                if (index == 1) {
                    this.menus[index].flag = !this.menus[index].flag;
                    this.menus[5].flag = false;
                } else if (index == 5) {
                    this.menus[index].flag = !this.menus[index].flag;
                    this.menus[1].flag = false;
                } else {
                    this.menus[1].flag = false;
                    this.menus[5].flag = false;
                }
            },
            leave () {
                this.menus[1].flag = false;
                this.menus[5].flag = false;
            },
            add5 (u,i) {
                if(i != 4){
                    this.$router.push(`${u}#anchor-${i}`)
                }else{
                    this.$router.push(u)
                }
            },
            adda (index) {
                if (index == 1 || index == 5) {
                    this.menus[index].flag = false;
                }
            },
            add1 (e, index) {
                console.log(index)
            },
            //移动端跳转
            jump (u) {
                this.isShow = false
                this.$router.push(u)
            },
            load () {
                this.$axios({
                    data: {
                        func: 'Web_Index_GetData'
                    }
                })
            }
        },
        mounted () {
            this.load()
        }
    }
</script>
 
<style lang="less" scoped>
    .header {
        background: #282830;
        position: fixed;
        width: 100%;
        /*padding: 0.08rem 0;*/
        -webkit-transition: 0.3s;
        -moz-transition: 0.3s;
        transition: 0.3s;
        -webkit-animation: gupIn 1s 0.1s both;
        -moz-animation: gupIn 1s 0.1s both;
        animation: gupIn 1s 0.1s both;
        z-index: 8888;
        top: 0;
 
        .wrapper {
            display: flex;
            justify-content: space-between;
            position: relative;
            align-items: center;
        }
 
        .logo {
            float: left;
 
            img {
                height: 0.4rem;
            }
        }
 
        .nav {
            float: right;
 
            .navico {
                width: 0.45rem;
 
                img {
                    height: 0.39rem;
                }
            }
 
            .homeico {
                img {
                    height: 0.5rem;
                    margin-right: 0.46rem;
                }
            }
        }
 
        @media (min-width: 751px) {
            .list3{
                right: 5.8rem;
                width: 7rem;
                height: 90vh;
            }
            .list33{
                right: -1.5rem;
                width: 115%;
                height: 90vh;
            }
            .list4{
                right: -1.95rem;
                height: 90vh;
            }
            .list5{
                right: 1.17rem;
                width: 4rem;
                height: 90vh;
            }
            .plane {
                display: none;
            }
 
            li {
                float: left;
                line-height: 0.68rem;
                height: 0.68rem;
            }
 
            span {
                font-size: 0.18rem;
                color: #fff;
                cursor: pointer;
                padding: 0 0.22rem;
            }
        }
        
        .abloutMingKe_ul,
        .abloutMingKe_ul1 {
            width: 1.8rem;
            position: absolute;
            left: -0.8rem;
            transition: all .3s ease 0s;
            height: 2rem;
            background-color: #212020;
            z-index: 999;
 
            li {
                width: 100%;
                float: none;
                color: #fff;
                font-size: 0.14rem;
                padding: 0 0.22rem;
                line-height: 0.29rem;
                height: 0.29rem;
            }
 
            li:last-child {
                text-align: right;
            }
 
            li:hover {
                opacity: 0.8;
                cursor: pointer;
            }
        }
 
        .abloutMingKe_ul1 {
            width: 1.9rem;
            margin-left: 1.8rem;
        }
 
        .abloutMingKe_ul {
            border-right: 1px solid #999999;
 
            li:last-child {
                margin-top: .3rem;
                text-align: right;
            }
        }
 
        .abloutMingKe_ul2 {
            width: 1.16rem;
            height: 1.3rem;
            position: absolute;
            top:-0.08rem;
            transition: all .3s ease 0s;
            background-color: #212020;
 
            li {
                width: 100%;
                float: none;
                color: #fff;
                font-size: 0.14rem;
                padding: 0 0.22rem;
                line-height: 0.29rem;
                height: 0.29rem;
                text-align: center;
            }
 
            li:hover {
                cursor: pointer;
                opacity: 0.8;
            }
        }
    }
 
    @media (max-width: 750px) and (min-width: 0) {
        .title_s {
            font-size: 0.35rem;
            width: 100%;
            padding-left: 42%;
        }
        .header .logo img {
            height: 0.55rem;
        }
 
        .plane {
            display: block !important;
        }
 
        .nav_ul {
            display: none;
        }
 
        .header {
            // height: 100%;
            // background-color: #303030;
            padding-bottom: 0.2rem;
        }
 
        .h_height {
            height: 100%;
        }
 
        .h_none {
            display: none;
        }
 
        .header .wrapper {
            padding-top: 0.3rem;
        }
 
        .header .abloutMingKe_ul2 {
            width: auto;
            height: auto;
        }
 
        .header .abloutMingKe_ul2 li {
            background-color: black;
            height: 0.5rem;
            line-height: 0.5rem;
        }
 
        .header .nav .nav_ul {
            position: fixed;
            width: 100%;
            left: -10rem;
            top: 1.29rem;
            bottom: 0;
            background: #212020;
            z-index: 8888;
            height: auto;
 
            >li {
                text-align: center;
                float: none;
                text-align: center;
                line-height: inherit;
                height: auto;
 
                span {
                    display: block;
                    font-size: 0.42rem;
                    border-bottom: 1px solid #fff;
                    color: #fff;
                    padding: 0.44rem 0;
                }
            }
 
            >li:first-child {
                display: none;
            }
        }
        .header .nav .navico,
        .header .nav .homeico {
            display: inline-block;
            padding: 0;
        }
        .abloutMingKe_ul,
        .abloutMingKe_ul1 {
            background: #303030;
 
            li {
                border: none;
                padding: .2rem .6rem .2rem 1rem;
                text-align: left;
                color: #7C7C7C;
            }
 
            li:first-child {
                color: #fff;
            }
 
            li:last-child {
                text-align: right;
            }
        }
 
        .abloutMingKe_ul {
            border-bottom: #fff 1px solid;
        }
 
        .menu2 {
            text-align: center;
            line-height: 0.75rem;
            font-size: 0.32rem;
        }
 
        .menu3 {
            line-height: 0.75rem;
            padding-left: 30%;
            color: #7C7C7C;
            font-size: 0.32rem;
 
            img {
                width: 0.2rem;
                margin-top: -0.06rem;
                margin-left: 0.2rem;
            }
        }
 
        .more {
            float: right;
            padding-right: 0.5rem;
            margin-bottom: 0.1rem;
        }
    }
    .list1 {
        display: flex;
        opacity: 0;
        height: auto;
        width: 5rem;
        position: absolute;
        top: 0.65rem;
        right: 0;
    }
    .list2 {
        opacity: 0;
        width: 2rem;
        height: auto;
        position: absolute;
        top: 0.76rem;
        right: -0.84rem;
    }
    .active {
        opacity: 1;
    }
    .active1 {
        background: #212020;
    }
</style>
<style>
    .el-collapse {
        border-top: 0;
    }
 
    .el-collapse-item__header {
        height: 1.1rem;
        line-height: 1.1rem;
        background-color: #303030;
        border-color: darkgray;
        color: #fff;
    }
 
    .el-collapse-item__content {
        background-color: #303030;
        color: #fff;
    }
 
    .el-collapse-item__wrap {
        border-color: darkgray;
    }
 
    .el-collapse-item__arrow {
        margin-right: 2rem;
    }
 
    .el-collapse-item__header.is-active {
        background-color: #49A2DD;
    }
 
    .el-collapse-item__content {
        padding-bottom: 0;
    }
 
    @media (max-width: 750px) and (min-width: 0) {
        .el_coll .el-collapse-item__arrow {
            display: none;
        }
    }
</style>