陈冉 пре 6 година
родитељ
комит
407a10702e

+ 5
- 0
package-lock.json Прегледај датотеку

@@ -14189,6 +14189,11 @@
14189 14189
         "extsprintf": "^1.2.0"
14190 14190
       }
14191 14191
     },
14192
+    "viewer": {
14193
+      "version": "0.10.11",
14194
+      "resolved": "https://registry.npmjs.org/viewer/-/viewer-0.10.11.tgz",
14195
+      "integrity": "sha1-3yR20nxfxZFKGVOQG7P1RdlRyxs="
14196
+    },
14192 14197
     "viewerjs": {
14193 14198
       "version": "1.3.0",
14194 14199
       "resolved": "https://registry.npmjs.org/viewerjs/-/viewerjs-1.3.0.tgz",

+ 1
- 0
package.json Прегледај датотеку

@@ -12,6 +12,7 @@
12 12
     "lodash.get": "^4.4.2",
13 13
     "moment": "^2.22.2",
14 14
     "vant": "^1.3.10",
15
+    "viewer": "^0.10.11",
15 16
     "vue": "^2.5.17",
16 17
     "vue-amap": "^0.5.8",
17 18
     "vue-awesome-swiper": "^3.1.3",

+ 1
- 0
src/App.vue Прегледај датотеку

@@ -57,6 +57,7 @@ export default {
57 57
 </script>
58 58
 
59 59
 <style>
60
+.viewer-backdrop{background-color:rgba(0,0,0,0.8)!important}
60 61
 #app {
61 62
   font-family: "Avenir", Helvetica, Arial, sans-serif;
62 63
   -webkit-font-smoothing: antialiased;

+ 7
- 6
src/components/bigimages.vue Прегледај датотеку

@@ -1,11 +1,11 @@
1 1
 <template>
2
-  <div class="images" @click="close">
3
-    <!-- <img class="modal_content" :src="fileurl" preview /> -->
4
-    <swiper :options="swiperOption" ref="imgOverview" style="height: 100%;" >
5
-      <swiper-slide class="swiper-zoom-container">
6
-        <!-- <div class="swiper-zoom-container"> -->
2
+  <div class="images">
3
+     <!-- <slot :images="images" :options="options">
4
+       <img :src="fileurl" alt="" >
5
+    </slot> -->
6
+    <swiper :options="swiperOption" ref="imgOverview" style="height: 100%;" @click="close">
7
+      <swiper-slide class="swiper-zoom-container"> 
7 8
           <img :src="fileurl" alt="" >
8
-        <!-- </div> -->
9 9
       </swiper-slide>
10 10
     </swiper>
11 11
   </div>
@@ -26,6 +26,7 @@ export default {
26 26
 },
27 27
   methods: {
28 28
     close() {
29
+      // alert(1)
29 30
       this.$emit("close");
30 31
     },
31 32
   }

+ 10
- 0
src/main.js Прегледај датотеку

@@ -11,6 +11,8 @@ import preview from 'vue-photo-preview'
11 11
 import 'vue-photo-preview/dist/skin.css'
12 12
 import AMap from "vue-amap";
13 13
 import myTouch from "./touch/myTouch";
14
+import 'viewerjs/dist/viewer.css'
15
+import Viewer from 'v-viewer'
14 16
 AMap.initAMapApiLoader({
15 17
   key: "73df496773bd9a021d44d32d6e272fb5", //自己申请
16 18
   plugin: [
@@ -29,7 +31,14 @@ AMap.initAMapApiLoader({
29 31
 
30 32
 
31 33
 
34
+Viewer.setDefaults({
35
+  zIndexInline: 2017,
36
+  toolbar:false,
37
+  navbar:false,
38
+  title:false,
39
+  // movable:false,
32 40
 
41
+})
33 42
 
34 43
 
35 44
 Vue.filter('moment', function (value, formatString) {
@@ -43,6 +52,7 @@ Vue.use(Vant)
43 52
 Vue.use(VueAwesomeSwiper)
44 53
 Vue.use(preview)
45 54
 Vue.use(myTouch)
55
+Vue.use(Viewer)
46 56
 
47 57
 Vue.config.productionTip = false
48 58
 

+ 32
- 41
src/pages/building/buildingimage.vue Прегледај датотеку

@@ -6,7 +6,7 @@
6 6
         <swiper :options="swiperOption" ref="mySwiper" class="slidewrapper">
7 7
           <swiper-slide class="slideimg" v-for="(list1, index1) in detail.imageLst1" :key="index1" >
8 8
             <div  class="selsectimg">
9
-              <img class="lazyimage" :src="list1.fileurl" @click="viewpicture1(list1)"/>
9
+              <img class="lazyimage" :src="list1.fileurl" v-viewer/>
10 10
               <div class="houseindex">
11 11
                 <span class="imagetype">{{list1.name}}</span>
12 12
                 <div class="imageindex" >
@@ -32,7 +32,7 @@
32 32
           </swiper-slide>
33 33
           <swiper-slide class="slideimg" v-for="(list2, index2) in detail.imageLst2" :key="index2" >
34 34
             <div class="selsectimg">
35
-              <img class="lazyimage" :src="list2.fileurl"  @click="viewpicture2(list2)"/>
35
+              <img class="lazyimage" :src="list2.fileurl"  v-viewer/>
36 36
               <div class="houseindex">
37 37
                 <span class="imagetype">{{list2.name}}</span>
38 38
                 <div class="imageindex">
@@ -58,7 +58,7 @@
58 58
           </swiper-slide>
59 59
           <swiper-slide class="slideimg" v-for="(list3, index3) in detail.imageLst3" :key="index3" >
60 60
             <div class="selsectimg">
61
-              <img class="lazyimage" :src="list3.fileurl" @click="viewpicture3(list3)"/>
61
+              <img class="lazyimage" :src="list3.fileurl" v-viewer/>
62 62
               <div class="houseindex">
63 63
                 <span class="imagetype">{{list3.name}}</span>
64 64
                 <div class="imageindex">
@@ -84,7 +84,7 @@
84 84
           </swiper-slide>
85 85
           <swiper-slide class="slideimg" v-for="(list4, index4) in detail.imageLst4" :key="index4" >
86 86
             <div class="selsectimg">
87
-              <img class="lazyimage" :src="list4.fileurl" @click="viewpicture4(list4)"/>
87
+              <img class="lazyimage" :src="list4.fileurl" v-viewer/>
88 88
               <div class="houseindex">
89 89
                 <span class="imagetype">{{list4.name}}</span>
90 90
                 <div class="imageindex">
@@ -110,7 +110,7 @@
110 110
           </swiper-slide>
111 111
           <swiper-slide class="slideimg" v-for="(list5, index5) in detail.imageLst5" :key="index5">
112 112
             <div class="selsectimg">
113
-              <img class="lazyimage" :src="list5.fileurl" @click="viewpicture5(list5)"/>
113
+              <img class="lazyimage" :src="list5.fileurl" v-viewer/>
114 114
               <div class="houseindex">
115 115
                 <span class="imagetype">{{list5.name}}</span>
116 116
                 <div class="imageindex">
@@ -142,16 +142,14 @@
142 142
         <span class="boxcharacters" :class='{active:list.active}'>{{list.imagetypename}}</span>
143 143
       </div>
144 144
     </div>
145
-  <!-- <div class="bigimages"> -->
146
-   <big-images v-if="imgLook.state" :fileurl='imgLook.fileurl' @close='imgLook.state=false'></big-images>
147
-  <!-- </div> -->
145
+   <!-- <big-images v-if="imgLook.state" :fileurl='imgLook.fileurl' @close='imgLook.state=false'></big-images> -->
148 146
   </div>
149 147
 </template>
150 148
 
151 149
 <script>
152 150
 import { mapState, mapActions } from "vuex";
153 151
 import bottomDrawing from "../../img/bottomdrawing.jpg";
154
-import BigImages from '../../components/bigimages.vue'
152
+// import BigImages from '../../components/bigimages.vue'
155 153
 
156 154
 export default {
157 155
   name: "BuildingImage",
@@ -169,29 +167,24 @@ export default {
169 167
         preloadImages:false,
170 168
         speed: 500,
171 169
       },
172
-      // selected:true,
173 170
       isactive: false,
174
-      imgLook:{
175
-        state:false,
176
-        fileurl:''
177
-      }
171
+      // imgLook:{
172
+      //   state:false,
173
+      //   fileurl:''
174
+      // }
178 175
     };
179 176
   },
180 177
   components: {
181 178
     "vue-headful": () => import("vue-headful"),
182
-    'BigImages':BigImages,
179
+    // 'BigImages':BigImages,
183 180
   },
184 181
   computed: {
185 182
     ...mapState({
186 183
       detail: s => s.buildingimage.detail
187 184
     })
188
-    // swiper() {
189
-    //     return this.$refs.mySwiper.swiper;
190
-    //   }
191 185
   },
192 186
   created() {
193 187
     this.getBuildingimage({ buildingid: this.$route.query.id }).then(() => {
194
-      // this.$previewRefresh()
195 188
       this.showPage = true;
196 189
       this.lists = this.detail.imageTypeLst;
197 190
       this.lists.forEach((curr, index) => {
@@ -205,8 +198,6 @@ export default {
205 198
       on: {
206 199
         slideChangeTransitionEnd: () => {
207 200
           let swiper = this.$refs.mySwiper.swiper;
208
-          //  let selected=swiper.activeIndex;
209
-          // window.console.log(selected)
210 201
           if (swiper.activeIndex < parseInt(this.detail.imageLstCount1)) {
211 202
             let list = [];
212 203
             this.lists.forEach((curr, index) => {
@@ -291,26 +282,26 @@ export default {
291 282
     this.swiperOption = { ...config };
292 283
   },
293 284
   methods: {
294
-    viewpicture1(list1){
295
-      this.imgLook.state = true
296
-      this.imgLook.fileurl = list1.fileurl
297
-    },
298
-    viewpicture2(list2){
299
-      this.imgLook.state = true
300
-      this.imgLook.fileurl = list2.fileurl
301
-    },
302
-      viewpicture3(list3){
303
-      this.imgLook.state = true
304
-      this.imgLook.fileurl = list3.fileurl
305
-    },
306
-      viewpicture4(list4){
307
-      this.imgLook.state = true
308
-      this.imgLook.fileurl = list4.fileurl
309
-    },
310
-      viewpicture5(list5){
311
-      this.imgLook.state = true
312
-      this.imgLook.fileurl = list5.fileurl
313
-    },
285
+    // viewpicture1(list1){
286
+    //   this.imgLook.state = true
287
+    //   this.imgLook.fileurl = list1.fileurl
288
+    // },
289
+    // viewpicture2(list2){
290
+    //   this.imgLook.state = true
291
+    //   this.imgLook.fileurl = list2.fileurl
292
+    // },
293
+    //   viewpicture3(list3){
294
+    //   this.imgLook.state = true
295
+    //   this.imgLook.fileurl = list3.fileurl
296
+    // },
297
+    //   viewpicture4(list4){
298
+    //   this.imgLook.state = true
299
+    //   this.imgLook.fileurl = list4.fileurl
300
+    // },
301
+    //   viewpicture5(list5){
302
+    //   this.imgLook.state = true
303
+    //   this.imgLook.fileurl = list5.fileurl
304
+    // },
314 305
     ...mapActions(["getBuildingimage"]),
315 306
     toggle(ind, detail) {
316 307
       let list = [];

+ 23
- 21
src/pages/building/buildingtype.vue Прегледај датотеку

@@ -4,8 +4,12 @@
4 4
         <div class="typeheader">
5 5
             <swiper class="slidewrapper" >
6 6
                 <swiper-slide class="slideimg" v-for="(list, index) in detail.buildingModelLst" :key="index">
7
-                    <!-- <img class="typeimg" :src="noHouse" v-if="!detail.buildingModelLst.modelurl"/> -->
8
-                    <img class="typeimg" :src="list.modelurl" @click="viewpicture(list)"/>
7
+                  <!-- <slot :images="images" :options="options">
8
+                   <img class="typeimg" :src="list.modelurl" v-if="detail.buildingModelLst[index].modelurl" @click="viewpicture(list)"/>
9
+                    <img class="typeimg" :src="noHouse" v-else/>
10
+                  </slot> -->
11
+                    <img class="typeimg" :src="list.modelurl" v-if="detail.buildingModelLst[index].modelurl" v-viewer/>
12
+                    <img class="typeimg" :src="noHouse" v-else/>
9 13
                     <div class="typeindex">
10 14
                         <span class="typename">{{list.name}}</span>
11 15
                         <div class="imageindex" >
@@ -46,16 +50,15 @@
46 50
                 </swiper-slide>
47 51
             </swiper>
48 52
         </div>
49
-    <big-images v-if="imgLook.state" :fileurl='imgLook.fileurl' @close='imgLook.state=false'></big-images>
53
+    <!-- <big-images v-if="imgLook.state" :fileurl='imgLook.fileurl' @close='imgLook.state=false'></big-images> -->
50 54
     </div>
51 55
 </template>
52 56
 
53 57
 <script>
54
-// import noHouse from "../../img/nohouse.jpg";
58
+import noHouse from "../../img/nohouse.jpg";
55 59
 import noHouseType from "../../img/nohousetype.png";
56 60
 import { mapState, mapActions } from "vuex";
57
-// import TypeImages from '../../components/typeimage.vue'
58
-import BigImages from '../../components/bigimages.vue'
61
+// import BigImages from '../../components/bigimages.vue'
59 62
 
60 63
 export default {
61 64
   name: "BuildingType",
@@ -63,22 +66,18 @@ export default {
63 66
     return {
64 67
       activeName2: "id",
65 68
       showPage:false,
66
-      // noHouse,
69
+      noHouse,
67 70
       noHouseType,
68
-      // imgTypeLook:{
71
+      //  imgLook:{
69 72
       //   state:false,
70
-      //   modelurl:''
73
+      //   fileurl:''
71 74
       // }
72
-       imgLook:{
73
-        state:false,
74
-        fileurl:''
75
-      }
76 75
     };
77 76
   },
78 77
   components: {
79 78
     "vue-headful": () => import("vue-headful"),
80 79
     // 'TypeImages':TypeImages
81
-    'BigImages':BigImages,
80
+    // 'BigImages':BigImages,
82 81
   },
83 82
   computed: {
84 83
     ...mapState({
@@ -91,10 +90,10 @@ export default {
91 90
     });
92 91
   },
93 92
   methods: {
94
-    viewpicture(list){
95
-      this.imgLook.state = true
96
-      this.imgLook.fileurl = list.modelurl
97
-    },
93
+    // viewpicture(list){
94
+    //   this.imgLook.state = true
95
+    //   this.imgLook.fileurl = list.modelurl
96
+    // },
98 97
     ...mapActions(["getBuildingtype"]),
99 98
     gotobuilding(){
100 99
       this.$router.go(-1)
@@ -128,12 +127,15 @@ export default {
128 127
 
129 128
       .slideimg {
130 129
         width: 100%;
130
+        display: flex;
131
+        flex-direction: column;
132
+        align-items: center;
131 133
         /* height: 225px; */
132 134
 
133 135
         .noslideimg{
134 136
           height:100%;
135 137
           width:100%;
136
-           display: flex;
138
+          display: flex;
137 139
           flex-direction: column;
138 140
           align-items: center;
139 141
 
@@ -157,8 +159,8 @@ export default {
157 159
         }
158 160
         
159 161
         .typeimg {
160
-          width: 100%;
161
-          height: 225px;
162
+          max-width: 100%;
163
+          max-height: 225px;
162 164
         }
163 165
 
164 166
         .typeindex {

+ 5
- 3
src/pages/building/perimetertype.vue Прегледај датотеку

@@ -96,7 +96,8 @@ export default {
96 96
       new AMap.Marker({
97 97
         position: [routerParams.lng, routerParams.lat],
98 98
         title: "routerParams.buildingname",
99
-        map: map
99
+        map: map,
100
+        icon:"https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png",
100 101
       });
101 102
       this.searchAround(routerParams.tag);
102 103
       if (routerParams.tag == "学校") {
@@ -142,7 +143,8 @@ export default {
142 143
       new AMap.Marker({
143 144
         position: [routerParams.lng, routerParams.lat],
144 145
         title: "routerParams.buildingname",
145
-        map: map
146
+        map: map,
147
+        icon:"https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png",
146 148
       });
147 149
       this.searchAround(val);
148 150
       if (val == "学校") {
@@ -175,7 +177,7 @@ export default {
175 177
     border-radius:50%;
176 178
     background: rgba(255,255,255,1);
177 179
     position:absolute;
178
-    top: 63%;
180
+    top: 55%;
179 181
     right: 4%;
180 182
     z-index: 4;
181 183
     border: 1px solid rgba(59,153,252,1);

+ 1
- 1
src/pages/reservation/lookhouse.vue Прегледај датотеку

@@ -309,7 +309,7 @@ export default {
309 309
         width: 90%;
310 310
         height: 125px;
311 311
         position: relative;
312
-        margin: 8px 0 0 15px;
312
+        margin: 10px 0 0 15px;
313 313
 
314 314
         .content_txt {
315 315
           width: 100%;