landjj321
2021-03-24 7a40618acb00bf5864ae0314e13aeb84e07e80ec
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
<template>
 
  <div class="header" :style="{height: screenHeight}">
    <!-- 导航栏 -->
    <div class="navbar">
      <div class="item-list">
        <router-link class="navbar__item" to="/building">强军思想</router-link>
        <router-link class="navbar__item" to="/building">军委机关</router-link>
        <router-link class="navbar__item" to="/building">中心概览</router-link>
        <router-link class="navbar__item" to="/film_cn">影视部</router-link>
        <router-link class="navbar__item" to="/building">文艺部</router-link>
        <router-link class="navbar__item" to="/building">军乐团</router-link>
        <router-link class="navbar__item" to="/building">文艺咨询</router-link>
        <router-link class="navbar__item" to="/building">官兵信箱</router-link>
      </div>
    </div>
    <!-- logo -->
    <div class="logo" />
  </div>
</template>
 
<script>
 
export default {
  name: 'HomeHeader',
  data() {
    return  {
      screenHeight: document.documentElement.clientHeight - 8 + 'px'
    }
  },
  created() {
    window.onresize = () => {
      this.getScreenHeight()
    };
  },
  methods: {
    getScreenHeight() {
      this.screenHeight = document.documentElement.clientHeight - 8 + 'px'
    }
  },
  destoryed() {
    window.onresize = null
  }
}
</script>
 
<style lang="scss" scoped>
  @import "~@/styles/variables.scss";
 
  .header {
    width: 100%;
    min-height: 600px;
    background-color: #921515;
    background-image: url('../../../assets/home/home-top-bg-3x.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    display: flex;
    flex-direction: column-reverse;
    .logo {
      margin: 0 auto;
      width: 890px;
      height: 160px;
      background-image: url('../../../assets/home/home_header/logo.png');
      background-size: 100% 100%;
      background-repeat: no-repeat;
      margin-bottom: 20px; 
    }
    .navbar {
      width: 100%;
      height: 58px;
      line-height: 58px;
      background: rgb(120, 35, 37);
      text-align: center;
      .item-list {
        width: $appWidth;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        color: rgb(210, 213, 216);
        font-size: 19.5px;
      }
    }
  }
</style>