Commit 76f08d4ee3a2d81a1de248a8463c8caf7179bf8b
1 parent
77277983
add header
add footer
Showing
6 changed files
with
199 additions
and
9 deletions
src/App.vue
1 | <template> | 1 | <template> |
2 | <div id="app"> | 2 | <div id="app"> |
3 | - <router-view /> | 3 | + <VHeader></VHeader> |
4 | + <router-view class="wrap"/> | ||
5 | + <VFooter></VFooter> | ||
6 | + | ||
4 | </div> | 7 | </div> |
5 | </template> | 8 | </template> |
6 | 9 | ||
7 | <script> | 10 | <script> |
8 | -export default { | ||
9 | - name: 'App' | ||
10 | -} | 11 | + import VHeader from './components/VHeader' |
12 | + import VFooter from './components/VFooter' | ||
13 | + | ||
14 | + export default { | ||
15 | + name: 'App', | ||
16 | + components: { VHeader, VFooter }, | ||
17 | + } | ||
11 | </script> | 18 | </script> |
19 | + | ||
20 | +<style> | ||
21 | + | ||
22 | + #app { | ||
23 | + display: flex; | ||
24 | + flex-flow: column; | ||
25 | + min-height: 100vh; | ||
26 | + position: relative; | ||
27 | + font-family: 'Avenir', Helvetica, Arial, sans-serif; | ||
28 | + -webkit-font-smoothing: antialiased; | ||
29 | + -moz-osx-font-smoothing: grayscale; | ||
30 | + text-align: center; | ||
31 | + font-size: 14px; | ||
32 | + } | ||
33 | + | ||
34 | + .wrap { | ||
35 | + flex: 1; | ||
36 | + } | ||
37 | +</style> |
src/assets/logo.png
0 → 100644
6.47 KB
src/components/VFooter.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="footer"> | ||
3 | + <span>《隐私权政策》 《权益保障承诺书》 鄂ICP备19013449号</span> | ||
4 | + </div> | ||
5 | +</template> | ||
6 | + | ||
7 | +<script> | ||
8 | +export default { | ||
9 | + name: 'VFooter' | ||
10 | +} | ||
11 | +</script> | ||
12 | + | ||
13 | +<style scoped lang="scss"> | ||
14 | +.footer{ | ||
15 | + height:64px; | ||
16 | + line-height: 64px; | ||
17 | + background:rgba(6,8,10,1); | ||
18 | + color:rgba(255,255,255,0.65); | ||
19 | +} | ||
20 | +</style> |
src/components/VHeader.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="header-wrap"> | ||
3 | + <div class="header"> | ||
4 | + <div class="fl logo-bg" @click="$router.push({name:'home'})"></div> | ||
5 | + <ul class="fr nav"> | ||
6 | + <!--<li>首页</li>--> | ||
7 | + <!--<li>停车服务</li>--> | ||
8 | + <!--<li>官网中心</li>--> | ||
9 | + <!--<li>黄石停车</li>--> | ||
10 | + <!--<li>联系我们</li>--> | ||
11 | + <router-link | ||
12 | + tag="li" | ||
13 | + :to="{path:list.routerLink}" | ||
14 | + v-for="(list, index) in navList" | ||
15 | + :key="index" | ||
16 | + exact=""> | ||
17 | + {{list.name}} | ||
18 | + </router-link> | ||
19 | + </ul> | ||
20 | + </div> | ||
21 | + </div> | ||
22 | +</template> | ||
23 | + | ||
24 | +<script> | ||
25 | +export default { | ||
26 | + name: 'VHeader', | ||
27 | + data(){ | ||
28 | + return { | ||
29 | + navList:[ | ||
30 | + {name:'首页',routerLink:'/home'}, | ||
31 | + {name:'停车服务',routerLink:'/service'}, | ||
32 | + {name:'官网中心',routerLink:'/center'}, | ||
33 | + {name:'黄石停车',routerLink:'/park'}, | ||
34 | + {name:'联系我们',routerLink:'/about'}, | ||
35 | + ] | ||
36 | + } | ||
37 | + } | ||
38 | +} | ||
39 | +</script> | ||
40 | + | ||
41 | +<style scoped lang="scss"> | ||
42 | + /* http://meyerweb.com/eric/tools/css/reset/ | ||
43 | + v4.0 | 20180602 | ||
44 | + License: none (public domain) | ||
45 | +*/ | ||
46 | + | ||
47 | + html, body, div, span, applet, object, iframe, | ||
48 | + h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
49 | + a, abbr, acronym, address, big, cite, code, | ||
50 | + del, dfn, em, img, ins, kbd, q, s, samp, | ||
51 | + small, strike, strong, sub, sup, tt, var, | ||
52 | + b, u, i, center, | ||
53 | + dl, dt, dd, ol, ul, li, | ||
54 | + fieldset, form, label, legend, | ||
55 | + table, caption, tbody, tfoot, thead, tr, th, td, | ||
56 | + article, aside, canvas, details, embed, | ||
57 | + figure, figcaption, footer, header, hgroup, | ||
58 | + main, menu, nav, output, ruby, section, summary, | ||
59 | + time, mark, audio, video { | ||
60 | + margin: 0; | ||
61 | + padding: 0; | ||
62 | + border: 0; | ||
63 | + font-size: 100%; | ||
64 | + font: inherit; | ||
65 | + vertical-align: baseline; | ||
66 | + } | ||
67 | + | ||
68 | + /* HTML5 hidden-attribute fix for newer browsers */ | ||
69 | + *[hidden] { | ||
70 | + display: none; | ||
71 | + } | ||
72 | + | ||
73 | + body { | ||
74 | + line-height: 1; | ||
75 | + } | ||
76 | + html, body { | ||
77 | + width: 100%; | ||
78 | + font-family: "Microsoft YaHei"; | ||
79 | + user-select: none; | ||
80 | + -webkit-user-select: none; | ||
81 | + -ms-user-select: none; | ||
82 | + -o-user-select: none; | ||
83 | + -moz-user-select: none; | ||
84 | + } | ||
85 | + | ||
86 | + body { | ||
87 | + font-size: 14px; | ||
88 | + /*默认颜色*/ | ||
89 | + } | ||
90 | + | ||
91 | + html { | ||
92 | + box-sizing: border-box; | ||
93 | + } | ||
94 | + | ||
95 | + *, *:before, *:after { | ||
96 | + box-sizing: inherit; | ||
97 | + } | ||
98 | + ol, ul { | ||
99 | + list-style: none; | ||
100 | + } | ||
101 | + .fl { | ||
102 | + float: left; | ||
103 | + } | ||
104 | + | ||
105 | + .fr { | ||
106 | + float: right; | ||
107 | + } | ||
108 | + | ||
109 | + | ||
110 | + /*自定义导航选中样式*/ | ||
111 | + .navActive { | ||
112 | + border-bottom: 2px solid #fff !important; | ||
113 | + } | ||
114 | + | ||
115 | + .anchorBL{display:none;} /*去掉百度地图logo*/ | ||
116 | + | ||
117 | + .header-wrap{ | ||
118 | + height: 80px; | ||
119 | + line-height: 80px; | ||
120 | + background:rgba(218,36,49,1); | ||
121 | + } | ||
122 | + .header{ | ||
123 | + width: 1200px; | ||
124 | + height: 80px; | ||
125 | + margin: 0 auto; | ||
126 | + } | ||
127 | + .logo-bg{ | ||
128 | + width: 163px; | ||
129 | + height: 80px; | ||
130 | + background: url("../assets/logo.png") no-repeat 0 center; | ||
131 | + cursor: pointer; | ||
132 | + float: left; | ||
133 | + } | ||
134 | + .nav li{ | ||
135 | + color: #fff; | ||
136 | + height: 80px; | ||
137 | + float: left; | ||
138 | + margin-left: 50px; | ||
139 | + font-size: 16px; | ||
140 | + cursor: pointer; | ||
141 | + border-bottom: 2px solid rgba(218,36,49,1); | ||
142 | + } | ||
143 | +</style> |
src/styles/sidebar.scss
@@ -12,11 +12,12 @@ | @@ -12,11 +12,12 @@ | ||
12 | width: $sideBarWidth !important; | 12 | width: $sideBarWidth !important; |
13 | background-color: $menuBg; | 13 | background-color: $menuBg; |
14 | height: 100%; | 14 | height: 100%; |
15 | - position: fixed; | 15 | + position: relative; |
16 | font-size: 0px; | 16 | font-size: 0px; |
17 | - top: 0; | ||
18 | - bottom: 0; | ||
19 | - left: 0; | 17 | + /* top: 80px; */ |
18 | + /* left: 0; */ | ||
19 | + float: left; | ||
20 | + /* bottom: 64px; */ | ||
20 | z-index: 1001; | 21 | z-index: 1001; |
21 | overflow: hidden; | 22 | overflow: hidden; |
22 | 23 |
src/views/login/index.vue
@@ -209,7 +209,7 @@ export default { | @@ -209,7 +209,7 @@ export default { | ||
209 | $light_gray: #eee; | 209 | $light_gray: #eee; |
210 | 210 | ||
211 | .login-container { | 211 | .login-container { |
212 | - min-height: 100%; | 212 | + /*min-height: 100%;*/ |
213 | width: 100%; | 213 | width: 100%; |
214 | background: url("../../assets/login_images/login-bg.jpg") no-repeat; | 214 | background: url("../../assets/login_images/login-bg.jpg") no-repeat; |
215 | background-size: 100% 100%; | 215 | background-size: 100% 100%; |