陈冉 6 years ago
parent
commit
8f8f6a2152

+ 202
- 201
src/pages/building/buildingdetail.vue View File

@@ -81,19 +81,19 @@ import BuildingPerimeter from "./components/buildingperimeter.vue";
81 81
 
82 82
 export default {
83 83
   name: "BuildingDetail",
84
-   data() {
85
-        return {
86
-        activeName: '',
87
-        };
84
+  data() {
85
+    return {
86
+      activeName: ""
87
+    };
88 88
   },
89 89
   components: {
90 90
     "vue-headful": () => import("vue-headful"),
91
-    BuildingPerimeter: BuildingPerimeter,
91
+    BuildingPerimeter: BuildingPerimeter
92 92
   },
93 93
   computed: {
94 94
     ...mapState({
95
-      detail: s => s.building.detail,
96
-    }),
95
+      detail: s => s.building.detail
96
+    })
97 97
   },
98 98
   created() {
99 99
     this.getBuilding({ project_id: "1" });
@@ -104,7 +104,10 @@ export default {
104 104
       this.$router.push({ name: "lookhouse" });
105 105
     },
106 106
     gotopageimg() {
107
-      this.$router.push({ name: "buildingimage" });
107
+      this.$router.push({
108
+        name: "buildingimage",
109
+        query: { id: this.detail.buildingid }
110
+      });
108 111
     },
109 112
     gotopagetype() {
110 113
       this.$router.push({ name: "buildingtype" });
@@ -114,8 +117,8 @@ export default {
114 117
 </script>
115 118
 
116 119
 <style scoped>
117
-.van-cell:not(:last-child)::after{
118
-    right:15px!important;
120
+.van-cell:not(:last-child)::after {
121
+  right: 15px !important;
119 122
 }
120 123
 </style>
121 124
 
@@ -127,12 +130,12 @@ export default {
127 130
   overflow-y: auto;
128 131
   position: relative;
129 132
 
130
-  .cityarea{
131
-    width:72px;
132
-    height:27px;
133
-    background:rgba(0,0,0,0.39);
133
+  .cityarea {
134
+    width: 72px;
135
+    height: 27px;
136
+    background: rgba(0, 0, 0, 0.39);
134 137
     padding: 0 0 0 5px;
135
-    border-radius:0px 0px 25px 0px;
138
+    border-radius: 0px 0px 25px 0px;
136 139
     position: absolute;
137 140
     top: 0;
138 141
     left: 0;
@@ -140,26 +143,26 @@ export default {
140 143
     flex-direction: row;
141 144
     align-items: center;
142 145
 
143
-    .iconarea{
144
-        font-size: 10px !important;
145
-        color:rgba(255,255,255,1) !important;
146
-        padding-right:5px;
146
+    .iconarea {
147
+      font-size: 10px !important;
148
+      color: rgba(255, 255, 255, 1) !important;
149
+      padding-right: 5px;
147 150
     }
148 151
 
149
-    .areaname{
150
-        font-size:12px;
151
-        font-family:PingFangSC-Regular;
152
-        font-weight:400;
153
-        color:rgba(255,255,255,1);
154
-        line-height:17px;
152
+    .areaname {
153
+      font-size: 12px;
154
+      font-family: PingFangSC-Regular;
155
+      font-weight: 400;
156
+      color: rgba(255, 255, 255, 1);
157
+      line-height: 17px;
155 158
     }
156
-}
159
+  }
157 160
 
158
-  .headerbigimg{
161
+  .headerbigimg {
159 162
     width: 100%;
160 163
     height: 211px;
161 164
 
162
-    .bigimg{
165
+    .bigimg {
163 166
       width: 100%;
164 167
       height: 100%;
165 168
     }
@@ -229,216 +232,214 @@ export default {
229 232
     background-color: rgba(255, 255, 255, 1);
230 233
     margin-bottom: 10px;
231 234
 
232
-    .housename{
233
-    margin-top: 10px;
234
-    width: 100%;
235
-    height: 60px;
236
-    display: flex;
237
-    flex-direction: column;
238
-    justify-content: center;
239
-    align-items: center;
240
-
241
-    .housenameheader{
235
+    .housename {
236
+      margin-top: 10px;
237
+      width: 100%;
238
+      height: 60px;
242 239
       display: flex;
243
-      flex-direction:row;
244
-      justify-content: space-between;
245
-      width: 90%;
246
-      margin-bottom:5px;
247
-      padding-top:10px;
248
-    }
240
+      flex-direction: column;
241
+      justify-content: center;
242
+      align-items: center;
249 243
 
250
-    .price{
251
-        font-size:18px;
252
-        font-family:PingFangSC-Medium;
253
-        font-weight:500;
254
-        color:rgba(255,84,84,1);
255
-        line-height:22px;
244
+      .housenameheader {
245
+        display: flex;
246
+        flex-direction: row;
247
+        justify-content: space-between;
248
+        width: 90%;
249
+        margin-bottom: 5px;
250
+        padding-top: 10px;
251
+      }
252
+
253
+      .price {
254
+        font-size: 18px;
255
+        font-family: PingFangSC-Medium;
256
+        font-weight: 500;
257
+        color: rgba(255, 84, 84, 1);
258
+        line-height: 22px;
256 259
         padding-right: 8px;
257
-    }
260
+      }
258 261
 
259
-    .pricestart{
260
-        font-size:16px;
261
-        font-family:PingFangSC-Medium;
262
-        font-weight:500;
263
-        color:rgba(0,0,0,1);
264
-        line-height:22px;
265
-    }
262
+      .pricestart {
263
+        font-size: 16px;
264
+        font-family: PingFangSC-Medium;
265
+        font-weight: 500;
266
+        color: rgba(0, 0, 0, 1);
267
+        line-height: 22px;
268
+      }
266 269
 
267
-    .housenamefooter{
270
+      .housenamefooter {
268 271
         display: flex;
269
-        flex-direction:row;
272
+        flex-direction: row;
270 273
         justify-content: space-between;
271 274
         width: 90%;
272
-    }
273
-    .phone{
275
+      }
276
+      .phone {
274 277
         font-size: 12px !important;
275
-        color:rgba(119,165,240,1)!important;
278
+        color: rgba(119, 165, 240, 1) !important;
276 279
         padding-right: 5px;
277
-    }
280
+      }
278 281
 
279
-    .housetype{
280
-        background:rgba(247,250,255,1);
281
-        border-radius:2px;
282
+      .housetype {
283
+        background: rgba(247, 250, 255, 1);
284
+        border-radius: 2px;
282 285
         padding: 4px 5px;
283
-        font-size:12px;
284
-        font-family:PingFangSC-Regular;
285
-        font-weight:400;
286
-        color:rgba(119,165,240,1);
287
-        line-height:17px;
286
+        font-size: 12px;
287
+        font-family: PingFangSC-Regular;
288
+        font-weight: 400;
289
+        color: rgba(119, 165, 240, 1);
290
+        line-height: 17px;
288 291
         margin-right: 10px;
289
-    }
292
+      }
290 293
 
291
-    .housetel{
292
-        font-size:14px;
293
-        font-family:PingFangSC-Regular;
294
-        font-weight:400;
295
-        color:rgba(119,165,240,1);
296
-        line-height:20px;
294
+      .housetel {
295
+        font-size: 14px;
296
+        font-family: PingFangSC-Regular;
297
+        font-weight: 400;
298
+        color: rgba(119, 165, 240, 1);
299
+        line-height: 20px;
297 300
         display: flex;
298 301
         flex-direction: row;
302
+      }
299 303
     }
300
-  }
301
-
302
-.buildingdata{
303
-    width: 100%;
304
-    height: 256px;
305 304
 
306
-  .datacontent{
307
-    width: 90%;
308
-    height: 206px;
309
-    background-color:rgba(245,247,249,1);
310
-    border-radius:2px;
311
-    margin: 20px 0 0 20px;
312
-
313
-    .slidewrapper{
305
+    .buildingdata {
314 306
       width: 100%;
315
-      height: 100%;
316
-
317
-      .slideimg{
318
-        width: 100%;
319
-        height: 100%;
320
-        display: flex;
321
-        flex-direction: column;
322
-        align-items: center;
323
-
324
-        .slidedesc{
325
-          padding: 10px 0;
326
-          font-size:12px;
327
-          font-family:PingFangSC-Regular;
328
-          font-weight:400;
329
-          color:rgba(128,128,128,1);
330
-          line-height:17px;
331
-          overflow: hidden;
332
-          text-overflow: ellipsis;
333
-          white-space: nowrap;
334
-          width: 96%;
307
+      height: 256px;
335 308
 
309
+      .datacontent {
310
+        width: 90%;
311
+        height: 206px;
312
+        background-color: rgba(245, 247, 249, 1);
313
+        border-radius: 2px;
314
+        margin: 20px 0 0 20px;
315
+
316
+        .slidewrapper {
317
+          width: 100%;
318
+          height: 100%;
319
+
320
+          .slideimg {
321
+            width: 100%;
322
+            height: 100%;
323
+            display: flex;
324
+            flex-direction: column;
325
+            align-items: center;
326
+
327
+            .slidedesc {
328
+              padding: 10px 0;
329
+              font-size: 12px;
330
+              font-family: PingFangSC-Regular;
331
+              font-weight: 400;
332
+              color: rgba(128, 128, 128, 1);
333
+              line-height: 17px;
334
+              overflow: hidden;
335
+              text-overflow: ellipsis;
336
+              white-space: nowrap;
337
+              width: 96%;
338
+            }
339
+          }
336 340
         }
337 341
       }
338 342
     }
339
-  }
340
-}
341 343
 
342
-.line {
343
-  width: 90%;
344
-  border: 0.5px solid #efefef;
344
+    .line {
345
+      width: 90%;
346
+      border: 0.5px solid #efefef;
347
+    }
345 348
   }
346
-}
347 349
 
348
-.van-button {
349
-  position: fixed;
350
-  top: 617px;
351
-  left: 0;
352
-  background-color: rgba(63, 65, 68, 1);
353
-  font-size: 16px;
354
-  font-family: PingFangSC-Regular;
355
-  font-weight: 400;
356
-  color: rgba(255, 255, 255, 1);
357
-}
350
+  .van-button {
351
+    position: fixed;
352
+    top: 617px;
353
+    left: 0;
354
+    background-color: rgba(63, 65, 68, 1);
355
+    font-size: 16px;
356
+    font-family: PingFangSC-Regular;
357
+    font-weight: 400;
358
+    color: rgba(255, 255, 255, 1);
359
+  }
358 360
 
359
-.houseconduction{
360
-  width: 100%;
361
-  height: auto;
362
-  background-color: rgba(255,255,255,1);
363
-  margin-bottom: 10px;
361
+  .houseconduction {
362
+    width: 100%;
363
+    height: auto;
364
+    background-color: rgba(255, 255, 255, 1);
365
+    margin-bottom: 10px;
364 366
 
365
-  .line{
366
-    width:90%;
367
-    border: 0.5px solid #EFEFEF;
368
-  }
369
-  .conduction{
370
-    padding: 20px 0 18px 20px;
371
-
372
-    .conductiontitle{
373
-      font-size:18px;
374
-      font-family:PingFangSC-Regular;
375
-      font-weight:400;
376
-      color:rgba(37,38,42,1);
377
-      line-height:25px;
367
+    .line {
368
+      width: 90%;
369
+      border: 0.5px solid #efefef;
370
+    }
371
+    .conduction {
372
+      padding: 20px 0 18px 20px;
373
+
374
+      .conductiontitle {
375
+        font-size: 18px;
376
+        font-family: PingFangSC-Regular;
377
+        font-weight: 400;
378
+        color: rgba(37, 38, 42, 1);
379
+        line-height: 25px;
380
+      }
378 381
     }
379 382
 
380
-  }
383
+    .conductioncontent {
384
+      width: 90%;
385
+      height: auto;
386
+      margin-left: 5%;
387
+      text-align: justify;
381 388
 
382
-  .conductioncontent{
383
-    width: 90%;
384
-    height: auto;
385
-    margin-left:5%;
386
-    text-align: justify;
387
-    
388
-    .conductioncharacters{
389
-      width: 100%;
390
-      font-size:14px;
391
-      font-family:PingFangSC-Regular;
392
-      font-weight:400;
393
-      color:rgba(113,108,108,1);
394
-      line-height:23px;
389
+      .conductioncharacters {
390
+        width: 100%;
391
+        font-size: 14px;
392
+        font-family: PingFangSC-Regular;
393
+        font-weight: 400;
394
+        color: rgba(113, 108, 108, 1);
395
+        line-height: 23px;
396
+      }
395 397
     }
396 398
   }
397
-}
398 399
 
399
-.dynamics{
400
-  width: 100%;
401
-  height: auto;
402
-  background-color: rgba(255,255,255,1);
403
-
404
-  .dynamicstitle{
405
-    padding: 15px 0 10px 20px;
406
-
407
-    .titlecharacters{
408
-        font-size:18px;
409
-        font-family:PingFangSC-Regular;
410
-        font-weight:400;
411
-        color:rgba(37,38,42,1);
412
-        line-height:25px;
400
+  .dynamics {
401
+    width: 100%;
402
+    height: auto;
403
+    background-color: rgba(255, 255, 255, 1);
404
+
405
+    .dynamicstitle {
406
+      padding: 15px 0 10px 20px;
407
+
408
+      .titlecharacters {
409
+        font-size: 18px;
410
+        font-family: PingFangSC-Regular;
411
+        font-weight: 400;
412
+        color: rgba(37, 38, 42, 1);
413
+        line-height: 25px;
414
+      }
415
+    }
416
+    .dynamictitle {
417
+      font-size: 16px;
418
+      font-family: PingFangSC-Regular;
419
+      font-weight: 400;
420
+      color: rgba(37, 38, 42, 1);
421
+      line-height: 22px;
413 422
     }
414
-  }
415
-        .dynamictitle{
416
-            font-size:16px;
417
-            font-family:PingFangSC-Regular;
418
-            font-weight:400;
419
-            color:rgba(37,38,42,1);
420
-            line-height:22px;
421
-        }
422 423
 
423
-        .peopletimer{
424
-            font-size:12px;
425
-            font-family:PingFangSC-Regular;
426
-            font-weight:400;
427
-            color:rgba(128,128,128,1);
428
-            line-height:17px;
424
+    .peopletimer {
425
+      font-size: 12px;
426
+      font-family: PingFangSC-Regular;
427
+      font-weight: 400;
428
+      color: rgba(128, 128, 128, 1);
429
+      line-height: 17px;
429 430
 
430
-            .people{
431
-                padding-right: 20px
432
-            }
433
-        }
431
+      .people {
432
+        padding-right: 20px;
433
+      }
434
+    }
434 435
 
435
-        .dynamiccontent{
436
-            font-size:14px;
437
-            font-family:PingFangSC-Regular;
438
-            font-weight:400;
439
-            color:rgba(113,108,108,1);
440
-            line-height:23px;
441
-        }
442
-}
436
+    .dynamiccontent {
437
+      font-size: 14px;
438
+      font-family: PingFangSC-Regular;
439
+      font-weight: 400;
440
+      color: rgba(113, 108, 108, 1);
441
+      line-height: 23px;
442
+    }
443
+  }
443 444
 }
444 445
 </style>

+ 2
- 1
src/pages/building/buildingimage.vue View File

@@ -40,7 +40,8 @@ export default {
40 40
         }),
41 41
      },
42 42
      created() {
43
-        this.getBuildingimage({ buildingid: "8a9cd8265afb04b2015bccb967fc15f7" });
43
+        this.getBuildingimage({ buildingid: this.$route.query.id });
44
+        window.console.log(this.$route.query.id)
44 45
     },
45 46
     methods: {
46 47
         ...mapActions(["getBuildingimage"]),

+ 46
- 31
src/pages/building/buildingtype.vue View File

@@ -2,40 +2,42 @@
2 2
     <div class="context">
3 3
      <vue-headful title="户型图"  />
4 4
         <div class="typeheader">
5
-        <van-swipe class="slidewrapper" :autoplay="3000">
6
-            <van-swipe-item class="slideimg">
7
-                <img class="typeimg" />
8
-            </van-swipe-item>
9
-        </van-swipe>
10
-        <div class="typeindex">
11
-             <span class="typename">帝景天寓楼栋图</span>
12
-               <div class="imageindex">
13
-                   <span class="countimage countindex">2</span>
14
-                   <span class="countimage">/</span>
15
-                   <span class="countimage totalcount">4</span>
16
-               </div>
17
-        </div>
18
-    </div>
19
-        <div class="typecontent">
20
-        <div class="househeader">
21
-            <div class="headertop">
22
-                <span class="typetitle">B户型</span>
23
-                <span class="typeprice">24000元/㎡<span class="fixedsize">起</span></span>
5
+            <van-swipe class="slidewrapper" v-model="activeName2" @click="handleClick">
6
+                <van-swipe-item class="slideimg" v-for="list in detail.buildingModelLst" :key="list.id" >
7
+                    <img class="typeimg" :src="list.modelurl" />
8
+                </van-swipe-item>
9
+            </van-swipe>
10
+            <div class="typeindex">
11
+                <span class="typename"></span>
12
+                <div class="imageindex">
13
+                    <span class="countimage countindex">2</span>
14
+                    <span class="countimage">/</span>
15
+                    <span class="countimage totalcount">4</span>
16
+                </div>
24 17
             </div>
25
-            <div class="headerbottom">
26
-                <span class="typefeature">挑高双层</span>
27
-                <span class="typearea">建筑面积:182.5㎡</span>
28
-            </div>
29
-            <div class="housefeature">
30
-                <span class="bigcharacters">三室两厅两卫</span>
31
-                <span class="smallcharacters">
32
-                    <span class="fixedsmallcharacters">户型描述:</span>
33
-                    <span class="trendssmallcharacters">客厅空间较大,有足够的活动空间,有私家花园,提高生活品质。主卧朝南,且与阳台相连。</span>
34
-                </span>
18
+        </div>
19
+        <div class="typecontent" >
20
+            <div class="househeader" v-for="list in detail.buildingModelLst" :key="list.id">
21
+                <div class="headertop">
22
+                    <span class="typetitle">{{ list.name }}</span>
23
+                    <span class="typeprice">{{ list.referenceprice }}<span class="fixedsize">起</span></span>
24
+                </div>
25
+                <div class="headerbottom">
26
+                    <div>
27
+                    <span class="typefeature" v-for="(item ,index) in list.childrenfeatures" :key="index">{{ list.childrenfeatures[index] }}</span>
28
+                    </div>
29
+                    <span class="typearea">建筑面积:{{ list.area }}㎡</span>
30
+                </div>
31
+                <div class="housefeature">
32
+                    <span class="bigcharacters">{{ list.situation }}</span>
33
+                    <span class="smallcharacters">
34
+                        <span class="fixedsmallcharacters">户型描述:</span>
35
+                        <span class="trendssmallcharacters">{{ list.modelParsingLst[0].detailparsing }}</span>
36
+                    </span>
37
+                </div>
35 38
             </div>
36 39
         </div>
37 40
     </div>
38
-    </div>
39 41
 </template>
40 42
 
41 43
 <script>  
@@ -43,6 +45,11 @@ import { mapState, mapActions } from "vuex";
43 45
 
44 46
 export default {
45 47
     name:'BuildingType',
48
+    data () {
49
+        return{
50
+            activeName2: 'id'
51
+        }
52
+    },
46 53
     components: {
47 54
         'vue-headful': () => import('vue-headful'),
48 55
     },
@@ -56,6 +63,9 @@ export default {
56 63
     },
57 64
     methods: {
58 65
         ...mapActions(["getBuildingtype"]),
66
+        handleClick(id){
67
+                window.console.log(id)
68
+        }
59 69
   }
60 70
 }
61 71
 </script>
@@ -127,7 +137,11 @@ export default {
127 137
 .typecontent{
128 138
     width: 100%;
129 139
     background-color: rgba(248,248,248,1);
130
-     margin-top: 10px;
140
+    margin-top: 10px;
141
+    /* display: flex;
142
+    flex-direction: row;
143
+    justify-content: space-between;
144
+    overflow: hidden; */
131 145
 
132 146
     .househeader{
133 147
         width:100%;
@@ -186,6 +200,7 @@ export default {
186 200
                 color:rgba(119,165,240,1);
187 201
                 line-height:17px;
188 202
                 padding-left:20px;
203
+                margin-right:10px;
189 204
             }
190 205
 
191 206
             .typearea{