Baozhangchao 3 anos atrás
pai
commit
2c609bec11

BIN
build/fourBoxes-image/1.jpg Ver arquivo


+ 1
- 0
index.html Ver arquivo

14
     body {
14
     body {
15
       margin: 0;
15
       margin: 0;
16
       padding: 0;
16
       padding: 0;
17
+      background-color: black;
17
     }
18
     }
18
   </style>
19
   </style>
19
   <div id="app"></div>
20
   <div id="app"></div>

BIN
src/assets/buttonImage/1即刻尊享.png Ver arquivo


BIN
src/assets/buttonImage/2左滑.png Ver arquivo


BIN
src/assets/buttonImage/3右滑.png Ver arquivo


BIN
src/assets/buttonImage/4返回.png Ver arquivo


+ 0
- 2
src/components/Swiper/index.vue Ver arquivo

3
     <div class="swiper-wrapper">
3
     <div class="swiper-wrapper">
4
       <slot></slot>
4
       <slot></slot>
5
     </div>
5
     </div>
6
-    <slot name="pagination"></slot>
7
   </div>
6
   </div>
8
 </template>
7
 </template>
9
 
8
 
29
   mounted() {
28
   mounted() {
30
     this.$nextTick(() => {
29
     this.$nextTick(() => {
31
       this.swiper = new Swiper(this.$el, this.options)
30
       this.swiper = new Swiper(this.$el, this.options)
32
-      this.$emit('inited', this.swiper)
33
     })
31
     })
34
   }
32
   }
35
 }
33
 }

+ 0
- 21
src/components/SwiperSlide/index.vue Ver arquivo

5
 </template>
5
 </template>
6
 
6
 
7
 <script>
7
 <script>
8
-export default {
9
-  name: 'SwiperSlide'
10
-}
11
 </script>
8
 </script>
12
 
9
 
13
 <style>
10
 <style>
14
-.swiper-slide {
15
-  text-align: center;
16
-  background: #fff;
17
-
18
-  /* Center slide text vertically */
19
-  display: -webkit-box;
20
-  display: -ms-flexbox;
21
-  display: -webkit-flex;
22
-  display: flex;
23
-  -webkit-box-pack: center;
24
-  -ms-flex-pack: center;
25
-  -webkit-justify-content: center;
26
-  justify-content: center;
27
-  -webkit-box-align: center;
28
-  -ms-flex-align: center;
29
-  -webkit-align-items: center;
30
-  align-items: center;
31
-}
32
 </style>
11
 </style>

+ 3
- 0
src/main.js Ver arquivo

2
 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
2
 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
 import Vue from 'vue'
3
 import Vue from 'vue'
4
 import App from './App'
4
 import App from './App'
5
+import 'regenerator-runtime/runtime'
6
+import 'swiper/swiper-bundle.css'
7
+
5
 import router from './router'
8
 import router from './router'
6
 import Swiper from './components/Swiper'
9
 import Swiper from './components/Swiper'
7
 import SwiperSlide from './components/SwiperSlide'
10
 import SwiperSlide from './components/SwiperSlide'

+ 2
- 3
src/pages/AllPages.vue Ver arquivo

1
 <template>
1
 <template>
2
   <div class="index-box">
2
   <div class="index-box">
3
-    <img src="../../build/fourBoxes-image//1.jpg" class="bg-image" />
3
+    <img src="../../build/fourBoxes-image/1.jpg" class="bg-image" />
4
     <div class="index-FourBoxes">
4
     <div class="index-FourBoxes">
5
       <div class="index-FourBoxes-yushi test" @click="goYuShi">
5
       <div class="index-FourBoxes-yushi test" @click="goYuShi">
6
         <img src="../../build/fourBoxes-image/浴室.png" class="Four-image" />
6
         <img src="../../build/fourBoxes-image/浴室.png" class="Four-image" />
48
   // justify-content: center;
48
   // justify-content: center;
49
   .bg-image {
49
   .bg-image {
50
     width: 100%;
50
     width: 100%;
51
-    height: 100%;
52
     position: absolute;
51
     position: absolute;
53
   }
52
   }
54
   .index-FourBoxes {
53
   .index-FourBoxes {
55
     position: relative;
54
     position: relative;
56
-    top: 15vh;
55
+    top: 16vh;
57
     // border: 1px solid #fff;
56
     // border: 1px solid #fff;
58
     width: 98%;
57
     width: 98%;
59
     height: 84%;
58
     height: 84%;

+ 17
- 66
src/pages/IndexImage.vue Ver arquivo

1
 <template>
1
 <template>
2
   <div class="index-image">
2
   <div class="index-image">
3
-    <img src="../assets/index/1.jpg" class="bg-image" @load="loadBg" />
4
-    <div class="index-inner-swiper" :style="swiperItemStyle">
5
-      <swiper v-if="showSwiper" :options="swiperOptions">
3
+    <!-- <img :src="require('@/assets/images/index.png')" class="bg-image" @load="loadBg" /> -->
4
+    <div class="index-inner-swiper">
5
+      <swiper :options="swiperOptions">
6
         <swiper-slide class="index-inner-slide">
6
         <swiper-slide class="index-inner-slide">
7
-          <img alt />
7
+          <img src="../../build/yushi-image/2.png" />
8
+        </swiper-slide>
9
+
10
+        <swiper-slide class="index-inner-slide">
11
+          <img src="../../build/yushi-image/3.png" />
12
+        </swiper-slide>
13
+
14
+        <swiper-slide class="index-inner-slide">
15
+          <img src="../../build/yushi-image/4.png" />
8
         </swiper-slide>
16
         </swiper-slide>
9
         <swiper-slide class="index-inner-slide">
17
         <swiper-slide class="index-inner-slide">
10
-          <img alt />
18
+          <img src="../../build/yushi-image/4.png" />
11
         </swiper-slide>
19
         </swiper-slide>
12
       </swiper>
20
       </swiper>
13
     </div>
21
     </div>
14
-    <div class="index-pos-hander" :style="handerStyle">
15
-      <img alt />
16
-      <div>111</div>
17
-    </div>
18
   </div>
22
   </div>
19
 </template>
23
 </template>
20
 
24
 
23
   name: 'IndexImage',
27
   name: 'IndexImage',
24
   data() {
28
   data() {
25
     return {
29
     return {
26
-      showSwiper: false,
27
       swiperOptions: {
30
       swiperOptions: {
28
         autoplay: {
31
         autoplay: {
29
-          delay: 2500,
30
-          disableOnInteraction: false
32
+          delay: 100
31
         }
33
         }
32
-      },
33
-      swiperItemStyle: {},
34
-      handerStyle: {}
35
-    }
36
-  },
37
-  methods: {
38
-    loadBg(e) {
39
-      const { offsetTop, width, height, naturalWidth, naturalHeight } = e.target
40
-
41
-      const widthRatio = width / naturalWidth
42
-      const heightRatio = height / naturalHeight
43
-
44
-      this.swiperItemStyle = {
45
-        width: `${636 * widthRatio}px`, // 636 是图片原始宽度
46
-        height: `${637 * heightRatio}px`, // 637 是图片原始高度
47
-        top: `${offsetTop + 1612 * heightRatio}px`,
48
-        left: `${352 * widthRatio}px`
49
-      }
50
-
51
-      this.handerStyle = {
52
-        top: `${offsetTop + 1800 * heightRatio}px`,
53
-        left: `${1020 * widthRatio}px`
54
       }
34
       }
55
-
56
-      this.showSwiper = true
57
     }
35
     }
58
   }
36
   }
59
 }
37
 }
61
 
39
 
62
 <style lang="scss" scoped>
40
 <style lang="scss" scoped>
63
 .index-image {
41
 .index-image {
64
-  position: relative;
65
-  // background-color: #1d429d;
66
-  width: 100%;
67
-  height: 100%;
68
-  display: flex;
69
-  align-items: center;
70
-  overflow: hidden;
71
-
72
-  .bg-image {
73
-    width: 100%;
74
-    pointer-events: none;
75
-    z-index: 100;
76
-  }
77
-
78
   .index-inner-swiper {
42
   .index-inner-swiper {
79
-    position: absolute;
80
-
43
+    width: 100vw;
81
     .index-inner-slide {
44
     .index-inner-slide {
82
-      background: transparent;
83
-    }
84
-
85
-    img {
86
-      width: 100%;
87
-      height: 100%;
45
+      position: relative;
46
+      left: -11vw;
88
     }
47
     }
89
-  }
90
-
91
-  .index-pos-hander {
92
-    position: absolute;
93
-    z-index: 200;
94
-    width: 64px;
95
-    height: 56px;
96
-    animation: slidefade 2s infinite;
97
 
48
 
98
     img {
49
     img {
99
       width: 100%;
50
       width: 100%;

+ 68
- 3
src/pages/Test.vue Ver arquivo

1
 <template>
1
 <template>
2
-  <h1>222222</h1>
2
+  <div class="index-box">
3
+    <img src="../../build/yushi-image/1.jpg" class="bg-image" />
4
+    <!-- 透明返回按钮 -->
5
+    <div style=" position: absolute;width: 55px;height: 52px;" @click="$router.go(-1)"></div>
6
+    <!-- 透明返回按钮 -->
7
+    <div class="body-swiper">
8
+      <!-- 左滑动 -->
9
+      <div class="body-swiper-left">
10
+        <img style="width:70%;position: relative; right: -1vw;" src="../assets/buttonImage/2左滑.png" />
11
+      </div>
12
+
13
+      <!-- swiper -->
14
+      <div class="body-swiper-middle">
15
+        <index-image></index-image>
16
+      </div>
17
+      <!-- swiper -->
18
+
19
+      <!-- 右滑动 -->
20
+      <div class="body-swiper-right">
21
+        <img style="width:70%;position: relative; right: -1vw;" src="../assets/buttonImage/3右滑.png" />
22
+      </div>
23
+      <div class="button-img">
24
+        <img style="width:100%;" src="../assets/buttonImage/1即刻尊享.png" />
25
+      </div>
26
+    </div>
27
+  </div>
3
 </template>
28
 </template>
4
 
29
 
5
 <script>
30
 <script>
6
-export default {}
31
+export default {
32
+  components: {
33
+    IndexImage: () => import('./IndexImage.vue')
34
+  }
35
+}
7
 </script>
36
 </script>
8
 
37
 
9
-<style>
38
+<style lang="scss" scoped>
39
+.index-box {
40
+  width: 100vw;
41
+  height: 100vh;
42
+  display: flex;
43
+  // justify-content: center;
44
+  .bg-image {
45
+    width: 100%;
46
+    position: absolute;
47
+  }
48
+  .body-swiper {
49
+    display: none;
50
+    position: relative;
51
+    width: 100%;
52
+    top: 49vh;
53
+    height: 45vh;
54
+    display: flex;
55
+    &-left,
56
+    &-right {
57
+      display: flex;
58
+      align-items: center;
59
+      margin: 0 auto;
60
+      height: 40vh;
61
+      z-index: 2;
62
+    }
63
+    &-middle {
64
+      width: 84%;
65
+      overflow: hidden;
66
+    }
67
+    .button-img {
68
+      width: 40%;
69
+      position: absolute;
70
+      bottom: -5vh;
71
+      left: 29vw;
72
+    }
73
+  }
74
+}
10
 </style>
75
 </style>

+ 2
- 4
src/pages/index.vue Ver arquivo

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <div class="index-image">
3
     <div class="index-image">
4
-      <!-- <index-image></index-image> -->
5
       <img src="../assets/index/1.jpg" class="bg-image" />
4
       <img src="../assets/index/1.jpg" class="bg-image" />
6
       <div class="bth-div" @click="$router.push({ name: 'AllPages' })">
5
       <div class="bth-div" @click="$router.push({ name: 'AllPages' })">
7
         <img src="../assets/index/点击开启.png" class="bth-image" />
6
         <img src="../assets/index/点击开启.png" class="bth-image" />
12
 
11
 
13
 <script>
12
 <script>
14
 export default {
13
 export default {
15
-  components: {
16
-    IndexImage: () => import('./IndexImage.vue')
17
-  },
18
   methods: {
14
   methods: {
19
     goPages() {}
15
     goPages() {}
20
   }
16
   }
23
 
19
 
24
 <style lang="scss" scoped>
20
 <style lang="scss" scoped>
25
 .index-image {
21
 .index-image {
22
+  background-color: black;
23
+
26
   // background-color: #1d429d;
24
   // background-color: #1d429d;
27
   width: 100vw;
25
   width: 100vw;
28
   height: 100vh;
26
   height: 100vh;