Commit 6762dbd15625584756d31f7baa7c739ca6f91830
1 parent
6382662c
home
Showing
9 changed files
with
207 additions
and
6 deletions
webintroduce/package.json
@@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
12 | "dependencies": { | 12 | "dependencies": { |
13 | "js-cookie": "^2.2.0", | 13 | "js-cookie": "^2.2.0", |
14 | "vue": "^2.5.2", | 14 | "vue": "^2.5.2", |
15 | + "vue-awesome-swiper": "^2.5.4", | ||
15 | "vue-router": "^3.0.1" | 16 | "vue-router": "^3.0.1" |
16 | }, | 17 | }, |
17 | "devDependencies": { | 18 | "devDependencies": { |
webintroduce/src/assets/images/home/banner1-icon.png
0 → 100644
98.7 KB
webintroduce/src/assets/images/home/banner2-icon.png
0 → 100644
147 KB
webintroduce/src/assets/images/home/bannerBg1.png
0 → 100644
151 KB
webintroduce/src/assets/images/home/bannerBg2.png
0 → 100644
66.6 KB
webintroduce/src/assets/images/home/bannerBg3.png
0 → 100644
376 KB
webintroduce/src/assets/images/home/blue.png
0 → 100644
1.12 KB
webintroduce/src/assets/images/home/green.png
0 → 100644
1.14 KB
webintroduce/src/views/home.vue
1 | <template> | 1 | <template> |
2 | - <div> 首页</div> | 2 | + <div> |
3 | + <swiper :options="swiperOption" ref="mySwiper" class="swiper-banner"> | ||
4 | + <!-- slides --> | ||
5 | + <swiper-slide class="bannerBG1"> | ||
6 | + <div class="contentWidth pos-rel"> | ||
7 | + <p>全方位解决方案 全时空可视化</p> | ||
8 | + <p>最懂你、任你停</p> | ||
9 | + <img src="../assets/images/home/banner1-icon.png"> | ||
10 | + </div> | ||
11 | + | ||
12 | + </swiper-slide> | ||
13 | + <swiper-slide class="bannerBG2"> | ||
14 | + <div class="contentWidth pos-rel"> | ||
15 | + <p>云端saas服务,大并发高可用架构</p> | ||
16 | + <p>为您的数字资产保驾护航 数据全方位呵护</p> | ||
17 | + <img src="../assets/images/home/banner2-icon.png"> | ||
18 | + </div> | ||
19 | + </swiper-slide> | ||
20 | + <swiper-slide class="bannerBG3"> | ||
21 | + <div class="contentWidth pos-rel"> | ||
22 | + <p>物联改变时代 智慧停车 从现在开始</p> | ||
23 | + <p>快速、高效、不停车、不拥堵</p> | ||
24 | + <div class="parkpoint parkpoint1 pos-abs"></div> | ||
25 | + <div class="parkpoint parkpoint2 pos-abs"></div> | ||
26 | + <div class="parkpoint parkpoint3 pos-abs"></div> | ||
27 | + <div class="parkpoint parkpoint4 pos-abs"></div> | ||
28 | + <div class="parkpoint parkpoint5 pos-abs"></div> | ||
29 | + <div class="parkpoint parkpoint6 pos-abs"></div> | ||
30 | + <div class="parkpoint parkpoint7 pos-abs"></div> | ||
31 | + </div> | ||
32 | + </swiper-slide> | ||
33 | + | ||
34 | + <!-- Optional controls --> | ||
35 | + <div class="swiper-pagination" slot="pagination"></div> | ||
36 | + <!--<div class="swiper-button-prev" slot="button-prev"></div>--> | ||
37 | + <!--<div class="swiper-button-next" slot="button-next"></div>--> | ||
38 | + <!--<div class="swiper-scrollbar" slot="scrollbar"></div>--> | ||
39 | + </swiper> | ||
40 | + </div> | ||
3 | </template> | 41 | </template> |
4 | 42 | ||
5 | <script> | 43 | <script> |
44 | +import 'swiper/dist/css/swiper.css' | ||
45 | + | ||
46 | +import {swiper, swiperSlide} from 'vue-awesome-swiper' | ||
47 | + | ||
6 | export default { | 48 | export default { |
7 | name: 'VHome', | 49 | name: 'VHome', |
8 | - data(){ | 50 | + components: { |
51 | + swiper, | ||
52 | + swiperSlide | ||
53 | + }, | ||
54 | + data() { | ||
9 | return { | 55 | return { |
56 | + swiperOption: { | ||
57 | + pagination: { | ||
58 | + el: ".swiper-pagination", | ||
59 | + clickable:true | ||
60 | + }, | ||
61 | + autoplay:{ | ||
62 | + enabled: true, | ||
63 | + disableOnInteraction: false, | ||
64 | + delay: 3000 | ||
65 | + }, | ||
66 | + } | ||
10 | } | 67 | } |
68 | + }, | ||
69 | + computed: { | ||
70 | + swiper() { | ||
71 | + return this.$refs.mySwiper.swiper | ||
72 | + } | ||
73 | + }, | ||
74 | + mounted() { | ||
75 | + // current swiper instance | ||
76 | + // 然后你就可以使用当前上下文内的swiper对象去做你想做的事了 | ||
77 | + console.log('this is current swiper instance object', this.swiper) | ||
78 | + //this.swiper(7, 1000, false) | ||
11 | } | 79 | } |
12 | } | 80 | } |
13 | </script> | 81 | </script> |
14 | 82 | ||
15 | <style scoped lang="scss"> | 83 | <style scoped lang="scss"> |
84 | + .swiper-banner { | ||
85 | + height: 540px; | ||
86 | + } | ||
87 | + /*.swiper-pagination {*/ | ||
88 | + /*height: .23rem;*/ | ||
89 | + /*font-family: PingFangSC-Regular;*/ | ||
90 | + /*font-size: .156rem;*/ | ||
91 | + /*color: #fff;*/ | ||
92 | + /*letter-spacing: 0;*/ | ||
93 | + /*line-height: .12rem;*/ | ||
94 | + /*bottom: 0;*/ | ||
95 | + /*}*/ | ||
96 | + /*.swiper-pagination-bullet {*/ | ||
97 | + /*background: #fff;*/ | ||
98 | + /*opacity: 0.8;*/ | ||
99 | + /*height: 0.08rem;*/ | ||
100 | + /*border-radius: 0.06rem;*/ | ||
101 | + /*width: 0.08rem;*/ | ||
102 | + /*transition: all 0.2s; //可设置缓慢变化*/ | ||
103 | + /*}*/ | ||
104 | + /*.swiper-pagination-bullet-active {*/ | ||
105 | + /*width: 30px;*/ | ||
106 | + /*}*/ | ||
107 | + .bannerBG1{ | ||
108 | + background: url("../assets/images/home/bannerBg1.png") no-repeat; | ||
109 | + background-size: 100% 100%; | ||
110 | + text-align: left; | ||
111 | + color: #fff; | ||
112 | + p:nth-of-type(1){ | ||
113 | + padding-top: 168px; | ||
114 | + margin: 0 0 25px 0; | ||
115 | + font-size: 44px; | ||
116 | + } | ||
117 | + p:nth-of-type(2){ | ||
118 | + font-size: 24px; | ||
119 | + } | ||
120 | + img{ | ||
121 | + position: absolute; | ||
122 | + right: 0; | ||
123 | + top:20px; | ||
124 | + } | ||
125 | + } | ||
126 | + .bannerBG2{ | ||
127 | + background: url("../assets/images/home/bannerBg2.png") no-repeat; | ||
128 | + background-size: 100% 100%; | ||
129 | + text-align: left; | ||
130 | + color: #fff; | ||
131 | + p:nth-of-type(1){ | ||
132 | + padding-top: 168px; | ||
133 | + margin: 0 0 25px 0; | ||
134 | + font-size: 44px; | ||
135 | + } | ||
136 | + p:nth-of-type(2){ | ||
137 | + font-size: 24px; | ||
138 | + } | ||
139 | + img{ | ||
140 | + position: absolute; | ||
141 | + right: 0; | ||
142 | + top:20px; | ||
143 | + } | ||
144 | + } | ||
145 | + .bannerBG3{ | ||
146 | + background: url("../assets/images/home/bannerBg3.png") no-repeat; | ||
147 | + background-size: 100% 100%; | ||
148 | + text-align: left; | ||
149 | + color: #fff; | ||
150 | + p:nth-of-type(1){ | ||
151 | + padding-top: 168px; | ||
152 | + margin: 0 0 25px 0; | ||
153 | + font-size: 44px; | ||
154 | + } | ||
155 | + p:nth-of-type(2){ | ||
156 | + font-size: 24px; | ||
157 | + } | ||
158 | + .parkpoint{ | ||
159 | + width: 25px; | ||
160 | + height: 39px; | ||
161 | + } | ||
162 | + .parkpoint1{ | ||
163 | + background: url("../assets/images/home/green.png") no-repeat; | ||
164 | + left: 100px; | ||
165 | + top:50px; | ||
166 | + animation: pointMove 3S infinite; | ||
167 | + } | ||
168 | + .parkpoint2{ | ||
169 | + background: url("../assets/images/home/green.png") no-repeat; | ||
170 | + left: 200px; | ||
171 | + top:150px; | ||
172 | + animation: pointMove 3S infinite; | ||
173 | + } | ||
174 | + .parkpoint3{ | ||
175 | + background: url("../assets/images/home/green.png") no-repeat; | ||
176 | + left: 300px; | ||
177 | + top:250px; | ||
178 | + animation: pointMove 3S infinite; | ||
179 | + } | ||
180 | + .parkpoint4{ | ||
181 | + background: url("../assets/images/home/green.png") no-repeat; | ||
182 | + left: 70px; | ||
183 | + top:350px; | ||
184 | + animation: pointMove 3S infinite; | ||
185 | + } | ||
186 | + .parkpoint5{ | ||
187 | + background: url("../assets/images/home/green.png") no-repeat; | ||
188 | + right: 70px; | ||
189 | + top:400px; | ||
190 | + animation: pointMove 3S infinite; | ||
191 | + } | ||
192 | + .parkpoint6{ | ||
193 | + background: url("../assets/images/home/green.png") no-repeat; | ||
194 | + right: 70px; | ||
195 | + bottom:50px; | ||
196 | + animation: pointMove 3S infinite; | ||
197 | + } | ||
198 | + | ||
199 | + .parkpoint4{ | ||
200 | + background: url("../assets/images/home/green.png") no-repeat; | ||
201 | + left: 70px; | ||
202 | + bottom:350px; | ||
203 | + animation: pointMove 3S infinite; | ||
204 | + } | ||
16 | 205 | ||
17 | - ul li{ | ||
18 | - @include border-radius(100%); | ||
19 | - background-color: #00ffff; | ||
20 | - color: $baseColor; | ||
21 | } | 206 | } |
207 | + @keyframes pointMove { | ||
208 | + 0% { | ||
209 | + opacity: 0; | ||
210 | + transform: scale(0); | ||
211 | + } | ||
212 | + 50% { | ||
213 | + opacity: 1; | ||
214 | + transform: scale(1); | ||
215 | + } | ||
216 | + 100%{ | ||
217 | + opacity: 0; | ||
218 | + transform: scale(0); | ||
219 | + } | ||
220 | + } | ||
221 | + | ||
22 | </style> | 222 | </style> |