Baozhangchao 3 년 전
부모
커밋
803cdd09f4

+ 9
- 1
src/components/Modal/index.vue 파일 보기

@@ -1,5 +1,13 @@
1 1
 <template>
2
-  <modal :name="name" :clickToClose="false" :width="width" :height="height" :shiftX="0" :shiftY="0" :scrollable="false">
2
+  <modal
3
+    :name="name"
4
+    :clickToClose="false"
5
+    :width="width"
6
+    :height="height"
7
+    :shiftX="0"
8
+    :shiftY="0"
9
+    :scrollable="false"
10
+  >
3 11
     <slot></slot>
4 12
   </modal>
5 13
 </template>

+ 0
- 1
src/components/Swiper/index.vue 파일 보기

@@ -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
 

+ 0
- 21
src/components/SwiperSlide/index.vue 파일 보기

@@ -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>

+ 11
- 71
src/views/components/IndexImage.vue 파일 보기

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

+ 18
- 18
src/views/components/PureImage.vue 파일 보기

@@ -5,24 +5,24 @@
5 5
 </template>
6 6
 
7 7
 <script>
8
-export default {
9
-  name: 'PureImage',
10
-  props: {
11
-    bgColor: {
12
-      type: String,
13
-      default: '#f0f0f0'
14
-    },
15
-    bgImage: String
16
-  },
17
-  computed: {
18
-    custStyle() {
19
-      return {
20
-        backgroundColor: this.bgColor,
21
-        backgroundImage: `url('${this.bgImage}')`
22
-      }
23
-    }
24
-  }
25
-}
8
+// export default {
9
+//   name: 'PureImage',
10
+//   props: {
11
+//     bgColor: {
12
+//       type: String,
13
+//       default: '#f0f0f0'
14
+//     },
15
+//     bgImage: String
16
+//   },
17
+//   computed: {
18
+//     custStyle() {
19
+//       return {
20
+//         backgroundColor: this.bgColor,
21
+//         backgroundImage: `url('${this.bgImage}')`
22
+//       }
23
+//     }
24
+//   }
25
+// }
26 26
 </script>
27 27
 
28 28
 <style lang="scss" scoped>

+ 0
- 8
src/views/index.vue 파일 보기

@@ -3,17 +3,9 @@
3 3
 </template>
4 4
 
5 5
 <script>
6
-
7
-import { share } from '@/utils/wx'
8
-
9
-const shareImg = `${location.origin}${location.pathname}wx_share.jpg`
10
-
11 6
 export default {
12 7
   components: {
13 8
     IndexImage: () => import('./components/IndexImage.vue')
14
-  },
15
-  mounted() {
16
-    share({ title: '华侨城欢乐滨江可售物业', link: window.location.href, imgUrl: shareImg })
17 9
   }
18 10
 }
19 11
 </script>