Commit b0b6d6fe5537973bd7281d9c60f12ce534b19450
1 parent
7360a455
build
Showing
1 changed file
with
70 additions
and
5 deletions
src/views/home.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | 3 | <div class="banner"></div> |
| 4 | - <div class="berth"></div> | |
| 4 | + <div class="berth"> | |
| 5 | + <h1 class="title">新闻中心</h1> | |
| 6 | + <div class="map" id="map"></div> | |
| 7 | + <div class="berth-num"> | |
| 8 | + <p>区域泊位规划</p> | |
| 9 | + <ul class="berth-list"> | |
| 10 | + <li> | |
| 11 | + <span class="fl">黄石铁山区</span> | |
| 12 | + <span class="fr">123</span> | |
| 13 | + </li> | |
| 14 | + <li> | |
| 15 | + <span class="fl">黄石下陆区</span> | |
| 16 | + <span class="fr">5007</span> | |
| 17 | + </li> | |
| 18 | + <li> | |
| 19 | + <span class="fl">黄石黄石港区</span> | |
| 20 | + <span class="fr">2395</span> | |
| 21 | + </li> | |
| 22 | + <li> | |
| 23 | + <span class="fl">黄石西塞山区</span> | |
| 24 | + <span class="fr">1188</span> | |
| 25 | + </li> | |
| 26 | + <li> | |
| 27 | + <span class="fl">黄石经济开发区</span> | |
| 28 | + <span class="fr">413</span> | |
| 29 | + </li> | |
| 30 | + </ul> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 5 | 33 | <div class="news-wrap"> |
| 6 | 34 | <h1 class="title">新闻中心</h1> |
| 7 | 35 | <div class="fl news-bg"></div> |
| ... | ... | @@ -49,9 +77,16 @@ |
| 49 | 77 | |
| 50 | 78 | <script> |
| 51 | 79 | export default { |
| 52 | - name: 'home' | |
| 80 | + name: 'home', | |
| 81 | + mounted() { | |
| 82 | + // 百度地图API功能 | |
| 83 | + var map = new BMap.Map("map"); | |
| 84 | + var point = new BMap.Point(115.078186, 30.232887); | |
| 85 | + map.centerAndZoom(point, 15); | |
| 86 | + } | |
| 53 | 87 | } |
| 54 | 88 | </script> |
| 89 | + | |
| 55 | 90 | <style scoped lang="scss"> |
| 56 | 91 | .banner { |
| 57 | 92 | background: url("../assets/home/banner.png") no-repeat center center; |
| ... | ... | @@ -59,10 +94,40 @@ export default { |
| 59 | 94 | } |
| 60 | 95 | |
| 61 | 96 | .berth { |
| 62 | - width: 100%; | |
| 97 | + width: 1200px; | |
| 63 | 98 | height: 823px; |
| 64 | - background: url("../assets/home/berth.png") no-repeat center center; | |
| 65 | - background-size: 100% 100%; | |
| 99 | + padding: 50px 0; | |
| 100 | + position: relative; | |
| 101 | + margin: 0 auto; | |
| 102 | + } | |
| 103 | + .map{ | |
| 104 | + width: 1200px; | |
| 105 | + height: 600px; | |
| 106 | + } | |
| 107 | + | |
| 108 | + .berth-num{ | |
| 109 | + width: 323px; | |
| 110 | + height: 368px; | |
| 111 | + position: absolute; | |
| 112 | + top:200px; | |
| 113 | + right: 20px; | |
| 114 | + background: url("../assets/home/berth.png") no-repeat; | |
| 115 | + p{ | |
| 116 | + padding-top: 20px; | |
| 117 | + font-size: 20px; | |
| 118 | + } | |
| 119 | + } | |
| 120 | + .berth-list{ | |
| 121 | + margin-top: 50px; | |
| 122 | + li{ | |
| 123 | + height: 21px; | |
| 124 | + line-height: 21px; | |
| 125 | + font-size: 16px; | |
| 126 | + color: #314659; | |
| 127 | + padding: 0 40px 30px 60px; | |
| 128 | + background: url("../assets/home/berth-list.png") no-repeat 30px 0; | |
| 129 | + margin-bottom: 15px; | |
| 130 | + } | |
| 66 | 131 | } |
| 67 | 132 | .news-wrap{ |
| 68 | 133 | width: 1200px; | ... | ... |