Baozhangchao vor 3 Jahren
Ursprung
Commit
2c609bec11

BIN
build/fourBoxes-image/1.jpg Datei anzeigen


+ 1
- 0
index.html Datei anzeigen

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

BIN
src/assets/buttonImage/1即刻尊享.png Datei anzeigen


BIN
src/assets/buttonImage/2左滑.png Datei anzeigen


BIN
src/assets/buttonImage/3右滑.png Datei anzeigen


BIN
src/assets/buttonImage/4返回.png Datei anzeigen


+ 0
- 2
src/components/Swiper/index.vue Datei anzeigen

@@ -3,7 +3,6 @@
3 3
     <div class="swiper-wrapper">
4 4
       <slot></slot>
5 5
     </div>
6
-    <slot name="pagination"></slot>
7 6
   </div>
8 7
 </template>
9 8
 
@@ -29,7 +28,6 @@ export default {
29 28
   mounted() {
30 29
     this.$nextTick(() => {
31 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 Datei anzeigen

@@ -5,28 +5,7 @@
5 5
 </template>
6 6
 
7 7
 <script>
8
-export default {
9
-  name: 'SwiperSlide'
10
-}
11 8
 </script>
12 9
 
13 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 11
 </style>

+ 3
- 0
src/main.js Datei anzeigen

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

+ 2
- 3
src/pages/AllPages.vue Datei anzeigen

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

+ 17
- 66
src/pages/IndexImage.vue Datei anzeigen

@@ -1,20 +1,24 @@
1 1
 <template>
2 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 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 16
         </swiper-slide>
9 17
         <swiper-slide class="index-inner-slide">
10
-          <img alt />
18
+          <img src="../../build/yushi-image/4.png" />
11 19
         </swiper-slide>
12 20
       </swiper>
13 21
     </div>
14
-    <div class="index-pos-hander" :style="handerStyle">
15
-      <img alt />
16
-      <div>111</div>
17
-    </div>
18 22
   </div>
19 23
 </template>
20 24
 
@@ -23,37 +27,11 @@ export default {
23 27
   name: 'IndexImage',
24 28
   data() {
25 29
     return {
26
-      showSwiper: false,
27 30
       swiperOptions: {
28 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 +39,12 @@ export default {
61 39
 
62 40
 <style lang="scss" scoped>
63 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 42
   .index-inner-swiper {
79
-    position: absolute;
80
-
43
+    width: 100vw;
81 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 49
     img {
99 50
       width: 100%;

+ 68
- 3
src/pages/Test.vue Datei anzeigen

@@ -1,10 +1,75 @@
1 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 28
 </template>
4 29
 
5 30
 <script>
6
-export default {}
31
+export default {
32
+  components: {
33
+    IndexImage: () => import('./IndexImage.vue')
34
+  }
35
+}
7 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 75
 </style>

+ 2
- 4
src/pages/index.vue Datei anzeigen

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