Baozhangchao 3 years ago
parent
commit
803cdd09f4

+ 9
- 1
src/components/Modal/index.vue View File

1
 <template>
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
     <slot></slot>
11
     <slot></slot>
4
   </modal>
12
   </modal>
5
 </template>
13
 </template>

+ 0
- 1
src/components/Swiper/index.vue View File

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
 

+ 0
- 21
src/components/SwiperSlide/index.vue View File

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>

+ 11
- 71
src/views/components/IndexImage.vue View File

1
 <template>
1
 <template>
2
   <div class="index-image">
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
         <swiper-slide class="index-inner-slide">
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
         </swiper-slide>
8
         </swiper-slide>
9
+
13
         <swiper-slide class="index-inner-slide">
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
         </swiper-slide>
12
         </swiper-slide>
20
       </swiper>
13
       </swiper>
21
     </div>
14
     </div>
22
-    <div class="index-pos-hander" :style="handerStyle">
23
-      <img :src="require('@/assets/images/toLeft.png')" alt />
24
-    </div>
25
   </div>
15
   </div>
26
 </template>
16
 </template>
27
 
17
 
30
   name: 'IndexImage',
20
   name: 'IndexImage',
31
   data() {
21
   data() {
32
     return {
22
     return {
33
-      showSwiper: false,
34
       swiperOptions: {
23
       swiperOptions: {
35
         autoplay: {
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
 
32
 
69
 <style lang="scss" scoped>
33
 <style lang="scss" scoped>
70
 .index-image {
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
   .index-inner-swiper {
35
   .index-inner-swiper {
86
-    position: absolute;
36
+    background-color: rgb(54, 54, 54);
37
+    width: 200px;
38
+    height: 200px;
87
 
39
 
88
     .index-inner-slide {
40
     .index-inner-slide {
89
       background: transparent;
41
       background: transparent;
42
+      background-color: rgb(54, 54, 54);
90
     }
43
     }
91
 
44
 
92
     img {
45
     img {
94
       height: 100%;
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
 </style>
51
 </style>

+ 18
- 18
src/views/components/PureImage.vue View File

5
 </template>
5
 </template>
6
 
6
 
7
 <script>
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
 </script>
26
 </script>
27
 
27
 
28
 <style lang="scss" scoped>
28
 <style lang="scss" scoped>

+ 0
- 8
src/views/index.vue View File

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