陈冉 il y a 6 ans
Parent
révision
88a16340bb

+ 12
- 0
src/config/apis.js Voir le fichier

@@ -11,6 +11,18 @@ const apiList = {
11 11
       method: 'get',
12 12
     },
13 13
   },
14
+  buildingimage:{
15
+    get:{
16
+      url: '/api/lp/getBuildingImages/:buildingid',
17
+      method: 'get',
18
+    },
19
+  },
20
+  buildingtype:{
21
+    get:{
22
+      url: '/api/lp/getBuildingModels/:buildingid',
23
+      method: 'get',
24
+    },
25
+  },
14 26
   user: {
15 27
     get: {
16 28
       url: '/api/user',

+ 272
- 40
src/pages/building/buildingdetail.vue Voir le fichier

@@ -3,10 +3,10 @@
3 3
     <vue-headful title="楼盘详情页"  />
4 4
     <div class="cityarea">
5 5
         <span class="iconfont icon-Shape1 iconarea"></span>
6
-        <span class="areaname">浦口区</span>
6
+        <span class="areaname">{{detail.areaname}}</span>
7 7
     </div>
8 8
     <div class="headerbigimg">
9
-      <img class="bigimg" src=""/>
9
+      <img class="bigimg" :src="detail.image"/>
10 10
     </div>
11 11
     <van-cell-group class="clickbutton">
12 12
         <div class="gotopageimg" @click="gotopageimg"><van-cell  class="clickcharacters" title="查看更多图片"/><span class="iconfont icon-youfan right"></span></div>
@@ -16,13 +16,59 @@
16 16
         <div class="gotopagecollect"><span class="iconfont icon-Star collect"></span><van-cell class="clickcharacters"  title="已收藏"/></div>
17 17
     </van-cell-group>
18 18
     <div class="housecenter">
19
-      <house-name></house-name>
19
+       <div class="housename">
20
+        <div class="housenameheader">
21
+            <span class="housenametitle">{{detail.buildingname}}</span>
22
+            <div class="housenameprice">
23
+                <span class="price">{{detail.price}}</span>
24
+                <span class="pricestart">起</span>
25
+            </div>
26
+        </div>
27
+        <div class="housenamefooter">
28
+          <div>
29
+            <span class="housetype" v-for="(list, index) in detail.projectcharacteristicList" :key="index">{{detail.projectcharacteristicList[index]}}</span>
30
+          </div>
31
+            <span class="housetel"><i class="iconfont  icon-dianhua2 phone"> </i><span ><a :href="'tel:' + detail.salestel">{{detail.salestel}}</a></span></span>
32
+        </div>
33
+      </div>
20 34
       <hr class="line" />
21
-      <building-data></building-data>
35
+      <div class="buildingdata">
36
+        <div class="datacontent">
37
+          <van-swipe class="slidewrapper" :autoplay="3000"  >
38
+            <van-swipe-item class="slideimg">
39
+              <span class="slidedesc" v-for="(list, index) in detail.buildingDatas" :key="index">{{detail.buildingDatas[index]}}</span>
40
+            </van-swipe-item>
41
+          </van-swipe>
42
+        </div>
43
+      </div>
44
+    </div>
45
+     <div class="houseconduction">
46
+       <div class="conduction">
47
+         <span class="conductiontitle">楼盘简介</span>
48
+       </div>
49
+       <hr class="line" />
50
+       <div class="conductioncontent">
51
+         <span class="conductioncharacters" v-html="detail.buildingInfo"></span>
52
+       </div>
22 53
     </div>
23
-    <building-conduction></building-conduction>
24 54
     <building-perimeter></building-perimeter>
25
-    <correlation-dynamics></correlation-dynamics>
55
+    <div class="dynamics">
56
+    <div class="dynamicstitle">
57
+      <span class="titlecharacters">相关动态</span>
58
+    </div>
59
+    <van-collapse v-model="activeName" accordion>
60
+      <van-collapse-item v-for="(list, index) in detail.buildingDynamicLst" :key="index">
61
+        <div slot="title">
62
+          <span class="dynamictitle">{{detail.buildingDynamicLst[index].title}}</span>
63
+          <div class="peopletimer">
64
+            <span class="people">{{detail.buildingDynamicLst[index].browsingnum}}人看过</span>
65
+            <span class="timer">{{detail.buildingDynamicLst[index].createtime}}</span>
66
+          </div>
67
+        </div>
68
+        <span class="dynamiccontent" v-html="detail.buildingDynamicLst[index].dynamicinfo"></span>
69
+      </van-collapse-item>
70
+    </van-collapse>
71
+  </div>
26 72
     <div class="btn">
27 73
       <van-button @click="gotoLookHouse" size="large" >预约看房</van-button>
28 74
     </div>
@@ -31,37 +77,25 @@
31 77
 
32 78
 <script>
33 79
 import { mapState, mapActions } from "vuex";
34
-import HouseName from "./components/housename.vue";
35
-import BuildingData from "./components/buildingdata.vue";
36
-import BuildingConduction from "./components/buildingconduction.vue";
37 80
 import BuildingPerimeter from "./components/buildingperimeter.vue";
38
-import CorrelationDynamics from "./components/correlationdynamics.vue";
39 81
 
40 82
 export default {
41 83
   name: "BuildingDetail",
84
+   data() {
85
+        return {
86
+        activeName: '',
87
+        };
88
+  },
42 89
   components: {
43 90
     "vue-headful": () => import("vue-headful"),
44
-    HouseName: HouseName,
45
-    BuildingData: BuildingData,
46
-    BuildingConduction: BuildingConduction,
47 91
     BuildingPerimeter: BuildingPerimeter,
48
-    CorrelationDynamics: CorrelationDynamics,
49
-  },
50
-  data() {
51
-    return {
52
-      
53
-    };
54 92
   },
55 93
   computed: {
56
-    // building() {
57
-    //   return this.$store.state.building;
58
-    // },
59 94
     ...mapState({
60
-      name: item => item.name
61
-    })
95
+      detail: s => s.building.detail,
96
+    }),
62 97
   },
63 98
   created() {
64
-    // this.$store.dispatch('getBuilding')
65 99
     this.getBuilding({ project_id: "1" });
66 100
   },
67 101
   methods: {
@@ -75,13 +109,16 @@ export default {
75 109
     gotopagetype() {
76 110
       this.$router.push({ name: "buildingtype" });
77 111
     }
78
-    // getBuildingInfo(){
79
-    //   axios.get(./)
80
-    // }
81 112
   }
82 113
 };
83 114
 </script>
84 115
 
116
+<style scoped>
117
+.van-cell:not(:last-child)::after{
118
+    right:15px!important;
119
+}
120
+</style>
121
+
85 122
 <!-- Add "scoped" attribute to limit CSS to this component only -->
86 123
 <style lang="postcss" scoped>
87 124
 .context {
@@ -125,7 +162,7 @@ export default {
125 162
     .bigimg{
126 163
       width: 100%;
127 164
       height: 100%;
128
-  }
165
+    }
129 166
   }
130 167
 
131 168
   .clickbutton {
@@ -192,21 +229,216 @@ export default {
192 229
     background-color: rgba(255, 255, 255, 1);
193 230
     margin-bottom: 10px;
194 231
 
195
-    .line {
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{
242
+      display: flex;
243
+      flex-direction:row;
244
+      justify-content: space-between;
196 245
       width: 90%;
197
-      border: 0.5px solid #efefef;
246
+      margin-bottom:5px;
247
+      padding-top:10px;
248
+    }
249
+
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;
256
+        padding-right: 8px;
257
+    }
258
+
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
+    }
266
+
267
+    .housenamefooter{
268
+        display: flex;
269
+        flex-direction:row;
270
+        justify-content: space-between;
271
+        width: 90%;
272
+    }
273
+    .phone{
274
+        font-size: 12px !important;
275
+        color:rgba(119,165,240,1)!important;
276
+        padding-right: 5px;
277
+    }
278
+
279
+    .housetype{
280
+        background:rgba(247,250,255,1);
281
+        border-radius:2px;
282
+        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;
288
+        margin-right: 10px;
289
+    }
290
+
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;
297
+        display: flex;
298
+        flex-direction: row;
198 299
     }
199 300
   }
200 301
 
201
-  .van-button {
202
-    position: fixed;
203
-    top: 617px;
204
-    left: 0;
205
-    background-color: rgba(63, 65, 68, 1);
206
-    font-size: 16px;
207
-    font-family: PingFangSC-Regular;
208
-    font-weight: 400;
209
-    color: rgba(255, 255, 255, 1);
302
+.buildingdata{
303
+    width: 100%;
304
+    height: 256px;
305
+
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{
314
+      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%;
335
+
336
+        }
337
+      }
338
+    }
339
+  }
340
+}
341
+
342
+.line {
343
+  width: 90%;
344
+  border: 0.5px solid #efefef;
345
+  }
346
+}
347
+
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
+}
358
+
359
+.houseconduction{
360
+  width: 100%;
361
+  height: auto;
362
+  background-color: rgba(255,255,255,1);
363
+  margin-bottom: 10px;
364
+
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;
378
+    }
379
+
210 380
   }
381
+
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;
395
+    }
396
+  }
397
+}
398
+
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;
413
+    }
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
+        .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;
429
+
430
+            .people{
431
+                padding-right: 20px
432
+            }
433
+        }
434
+
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
+}
211 443
 }
212 444
 </style>

+ 81
- 75
src/pages/building/buildingimage.vue Voir le fichier

@@ -4,8 +4,8 @@
4 4
        <div class="houseimagecontent">
5 5
            <div class="houseimage">
6 6
                 <van-swipe class="slidewrapper" :autoplay="3000">
7
-                    <van-swipe-item class="slideimg" v-for="(image, index) in images" :key="index">
8
-                        <img class="lazyimage" />
7
+                    <van-swipe-item class="slideimg" v-for="(list, index) in detail" :key="index">
8
+                        <img class="lazyimage" :src="detail[index]" />
9 9
                     </van-swipe-item>
10 10
                 </van-swipe>
11 11
            </div>
@@ -19,100 +19,98 @@
19 19
            </div>
20 20
        </div>
21 21
        <div class="imageboxtype">
22
-           <div class="drawingimpress">
23
-               <span class="boxcharacters">效果图</span>
22
+           <div class="drawingimpress" v-for="list in detail.imageTypeLst" :key="list.id">
23
+               <span class="boxcharacters">{{list.imagetypename}}</span>
24 24
            </div>
25 25
        </div>
26 26
     </div>
27 27
 </template>
28 28
 
29 29
 <script>
30
+import { mapState, mapActions } from "vuex";
31
+
30 32
 export default {
31 33
      name:'BuildingImage',
32 34
     components: {
33 35
     'vue-headful': () => import('vue-headful'),
34 36
      },
35
-     data() {
36
-        return {
37
-        images: [
38
-            'https://img.yzcdn.cn/1.jpg',
39
-            'https://img.yzcdn.cn/2.jpg'
40
-        ]
41
-        }
37
+     computed: {
38
+        ...mapState({
39
+        detail: s => s.buildingimage.detail,
40
+        }),
41
+     },
42
+     created() {
43
+        this.getBuildingimage({ buildingid: "8a9cd8265afb04b2015bccb967fc15f7" });
44
+    },
45
+    methods: {
46
+        ...mapActions(["getBuildingimage"]),
42 47
   }
48
+  
43 49
 }
44 50
 </script>
45 51
 
46 52
 <style lang="postcss" scoped>
47 53
 .imgbackground{
48
-    width: 100%;
49
-    height: 667px;
50
-    background-color: rgba(31,31,31,0.5);
54
+  width: 100%;
55
+  height: 667px;
56
+  background-color: rgba(31,31,31,0.5);
51 57
 
52
-    .houseimagecontent{
53
-        width: 100%;
54
-        height: 251px;
55
-        padding-top:103px;
58
+  .houseimagecontent{
59
+    width: 100%;
60
+    height: 251px;
61
+    padding-top:103px;
56 62
 
57
-        .houseimage{
58
-            width:100%;
59
-            height: 211px;
63
+    .houseimage{
64
+       width:100%;
65
+       height: 211px;
60 66
 
61
-            .slidewrapper{
62
-                width: 100%;
63
-                height: 100%;
67
+       .slidewrapper{
68
+          width: 100%;
69
+          height: 100%;
64 70
 
65
-                .slideimg {
66
-                    width: 100%;
67
-                    height: 100%;
71
+          .slideimg {
72
+             width: 100%;
73
+             height: 100%;
68 74
 
69
-                    .lazyimage{
70
-                        width: 100%;
71
-                        height: 100%;
72
-                    }
75
+            .lazyimage{
76
+               width: 100%;
77
+               height: 100%;
73 78
                 }
74 79
             }
75 80
         }
81
+    }
76 82
 
77
-        .houseindex{
78
-            width: 100%;
79
-            height: 40px;
80
-            background-color: rgba(255,255,255,1);
81
-            display: flex;
82
-            flex-direction: row;
83
-            align-items: center;
84
-            justify-content: space-between;
85
-
86
-            .imagetype{
87
-                font-size:12px;
88
-                font-family:PingFangSC-Regular;
89
-                font-weight:400;
90
-                color:rgba(59,153,252,1);
91
-                line-height:17px;
92
-                padding-left:15px;
93
-            }
83
+    .houseindex{
84
+        width: 100%;
85
+        height: 40px;
86
+        background-color: rgba(255,255,255,1);
87
+        display: flex;
88
+        flex-direction: row;
89
+        align-items: center;
90
+        justify-content: space-between;
91
+
92
+        .imagetype{
93
+           font-size:12px;
94
+           font-family:PingFangSC-Regular;
95
+           font-weight:400;
96
+           color:rgba(59,153,252,1);
97
+           line-height:17px;
98
+           padding-left:15px;
99
+        }
94 100
 
95
-            .imageindex{
96
-                padding-right: 15px;
97
-
98
-                .countimage{
99
-                    font-size:12px;
100
-                    font-family:PingFangSC-Regular;
101
-                    font-weight:400;
102
-                    color:rgba(127,127,127,1);
103
-                    line-height:17px;
104
-
105
-                    .boxcharacters{
106
-                        font-size:12px;
107
-                        font-family:PingFangSC-Regular;
108
-                        font-weight:400;
109
-                        color:rgba(255,255,255,1);
110
-                        line-height:17px;
111
-                    }
112
-                }
113
-            }
101
+       .imageindex{
102
+           padding-right: 15px;
103
+
104
+        .countimage{
105
+            font-size:12px;
106
+            font-family:PingFangSC-Regular;
107
+            font-weight:400;
108
+            color:rgba(127,127,127,1);
109
+            line-height:17px;
114 110
         }
115 111
     }
112
+}
113
+}
116 114
 
117 115
     .imageboxtype{
118 116
         padding-top: 15px;
@@ -122,16 +120,24 @@ export default {
122 120
         flex-direction: row;
123 121
         flex-wrap: wrap;
124 122
 
125
-        .drawingimpress{
126
-            width:30%;
127
-            height: 58px;
128
-            display:flex;
129
-            justify-content: center;
130
-            align-items: center;
131
-            background-color:rgba(255,255,255,1);
132
-            margin:0 10px 10px 0;
123
+    .drawingimpress{
124
+        width:30%;
125
+        height: 58px;
126
+        display:flex;
127
+        justify-content: center;
128
+        align-items: center;
129
+        background-color:rgba(119,165,240,1);
130
+        margin:0 10px 10px 0;
131
+
132
+        .boxcharacters{
133
+            font-size:12px;
134
+            font-family:PingFangSC-Regular;
135
+            font-weight:400;
136
+            color:rgba(255,255,255,1);
137
+            line-height:17px;
133 138
         }
134 139
     }
140
+ }
135 141
 }
136 142
 </style>
137 143
 

+ 220
- 7
src/pages/building/buildingtype.vue Voir le fichier

@@ -1,22 +1,62 @@
1 1
 <template>
2 2
     <div class="context">
3 3
      <vue-headful title="户型图"  />
4
-        <type-header></type-header>
5
-        <type-content></type-content>
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>
24
+            </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>
35
+            </div>
36
+        </div>
37
+    </div>
6 38
     </div>
7 39
 </template>
8 40
 
9
-<script>
10
-import TypeHeader from './components/typeheader.vue'
11
-import TypeContent from './components/typecontent.vue'
41
+<script>  
42
+import { mapState, mapActions } from "vuex";
12 43
 
13 44
 export default {
14 45
     name:'BuildingType',
15 46
     components: {
16 47
         'vue-headful': () => import('vue-headful'),
17
-        'TypeHeader':TypeHeader,
18
-        'TypeContent':TypeContent
19 48
     },
49
+    computed: {
50
+        ...mapState({
51
+        detail: s => s.buildingtype.detail,
52
+        }),
53
+     },
54
+     created() {
55
+        this.getBuildingtype({ buildingid: "8a9cd8265afb04b2015bccb967fc15f7" });
56
+    },
57
+    methods: {
58
+        ...mapActions(["getBuildingtype"]),
59
+  }
20 60
 }
21 61
 </script>
22 62
 
@@ -25,6 +65,179 @@ export default {
25 65
     width: 100%;
26 66
     height: 100%;
27 67
     overflow-y: auto;
68
+
69
+    .typeheader{
70
+ width:100%;
71
+ height: 262px;
72
+
73
+    .slidewrapper{
74
+        width: 100%;
75
+        height: 225px;
76
+
77
+        .slideimg{
78
+            width: 100%;
79
+            height: 100%;
80
+        }
81
+        .typeimg{
82
+            max-width: 100%;
83
+        }
84
+    }
85
+
86
+    .typeindex{
87
+        width: 100%;
88
+        height: 37px;
89
+        background-color: rgba(248,248,248,1);
90
+        border-top:0.5px solid #EAEAEA;
91
+        display: flex;
92
+        flex-direction: row;
93
+        align-items: center;
94
+        justify-content: space-between;
95
+
96
+        .typename{
97
+            font-size:12px;
98
+            font-family:PingFangSC-Regular;
99
+            font-weight:400;
100
+            color:rgba(127,127,127,1);
101
+            line-height:17px;
102
+            padding-left:15px;
103
+        }
104
+
105
+        .imageindex{
106
+                padding-right: 15px;
107
+
108
+                .countimage{
109
+                    font-size:12px;
110
+                    font-family:PingFangSC-Regular;
111
+                    font-weight:400;
112
+                    color:rgba(127,127,127,1);
113
+                    line-height:17px;
114
+
115
+                    .boxcharacters{
116
+                        font-size:12px;
117
+                        font-family:PingFangSC-Regular;
118
+                        font-weight:400;
119
+                        color:rgba(255,255,255,1);
120
+                        line-height:17px;
121
+                    }
122
+                }
123
+            }
124
+    }
125
+}
126
+
127
+.typecontent{
128
+    width: 100%;
129
+    background-color: rgba(248,248,248,1);
130
+     margin-top: 10px;
131
+
132
+    .househeader{
133
+        width:100%;
134
+
135
+        .headertop{
136
+            width: 100%;
137
+            display: flex;
138
+            flex-direction: row;
139
+            justify-content: space-between;
140
+            margin-bottom: 10px;
141
+            padding-top: 10px;
142
+
143
+            .typetitle{
144
+                font-size:18px;
145
+                font-family:PingFangSC-Regular;
146
+                font-weight:400;
147
+                color:rgba(61,61,61,1);
148
+                line-height:25px;
149
+                padding-left:20px;
150
+            }
151
+            
152
+            .typeprice{
153
+                display: flex;
154
+                flex-direction: row;
155
+                font-size:16px;
156
+                font-family:PingFangSC-Medium;
157
+                font-weight:500;
158
+                color:rgba(255,84,84,1);
159
+                line-height:22px;
160
+                padding-right: 20px;
161
+
162
+                .fixedsize{
163
+                    font-size:12px;
164
+                    font-family:PingFangSC-Medium;
165
+                    font-weight:500;
166
+                    color:#999999;
167
+                    line-height:22px;
168
+                }
169
+            }
170
+
171
+        }
172
+
173
+        .headerbottom{
174
+            width: 100%;
175
+            display: flex;
176
+            flex-direction: row;
177
+            justify-content: space-between;
178
+
179
+            .typefeature{
180
+                background:rgba(247,250,255,1);
181
+                border-radius:2px;
182
+                padding: 4px 5px;
183
+                font-size:12px;
184
+                font-family:PingFangSC-Regular;
185
+                font-weight:400;
186
+                color:rgba(119,165,240,1);
187
+                line-height:17px;
188
+                padding-left:20px;
189
+            }
190
+
191
+            .typearea{
192
+                font-size:12px;
193
+                font-family:PingFangSC-Regular;
194
+                font-weight:400;
195
+                color:rgba(97,97,97,1);
196
+                line-height:17px;
197
+                padding-right: 20px;
198
+            }
199
+            
200
+        }
201
+
202
+        .housefeature{
203
+            display: flex;
204
+            flex-direction: column;
205
+        
206
+            .bigcharacters{
207
+                font-size:18px;
208
+                font-family:PingFangSC-Regular;
209
+                font-weight:400;
210
+                color:rgba(61,61,61,1);
211
+                line-height:25px;
212
+                padding:20px 0 0 20px;
213
+            }
214
+
215
+            .smallcharacters{
216
+                padding: 10px  20px  10px 20px;
217
+                display: flex;
218
+                flex-direction: row;
219
+                justify-content: space-between;
220
+
221
+                .fixedsmallcharacters{
222
+                    font-size:14px;
223
+                    font-family:PingFangSC-Regular;
224
+                    font-weight:400;
225
+                    color:rgba(97,97,97,1);
226
+                    line-height:20px;
227
+                    width:46%;
228
+                }
229
+                .trendssmallcharacters{
230
+                    font-size:14px;
231
+                    font-family:PingFangSC-Regular;
232
+                    font-weight:400;
233
+                    color:rgba(97,97,97,1);
234
+                    line-height:20px;
235
+                }
236
+            }
237
+        }
238
+    }
239
+}
240
+
28 241
 }
29 242
 </style>
30 243
 

+ 6
- 2
src/pages/building/components/buildingdata.vue Voir le fichier

@@ -2,8 +2,8 @@
2 2
   <div class="buildingdata">
3 3
     <div class="datacontent">
4 4
       <van-swipe class="slidewrapper" :autoplay="3000">
5
-        <van-swipe-item class="slideimg" v-for="(image, index) in images" :key="index">
6
-          <img />
5
+        <van-swipe-item class="slideimg">
6
+          <span ></span>
7 7
         </van-swipe-item>
8 8
       </van-swipe>
9 9
     </div>
@@ -13,6 +13,10 @@
13 13
 <script>
14 14
 export default {
15 15
   name:'BuildingData',
16
+  props:{
17
+    list:Array
18
+  },
19
+
16 20
   data() {
17 21
     return {
18 22
       images: [

+ 1
- 0
src/pages/building/components/correlationdynamics.vue Voir le fichier

@@ -31,6 +31,7 @@
31 31
 <script>
32 32
 export default {
33 33
     name:'CorrelationDynamics',
34
+    porps:['list'],
34 35
     data() {
35 36
         return {
36 37
         activeName: '1',

+ 17
- 17
src/pages/reservation/lookhouse.vue Voir le fichier

@@ -16,13 +16,13 @@
16 16
           <van-popup v-model="show" position="bottom" :overlay="false">
17 17
             <van-datetime-picker v-model="currentDate" type="datetime" :min-date="minDate" :max-date="maxDate"/>
18 18
           </van-popup>
19
-          <van-field class="field_name"  label="手机号码:" />
20
-          <van-field class="field_name"  label="看房人数:"/> 
19
+          <van-field class="field_name" v-model="tel" label="手机号码:" />
20
+          <van-field class="field_name"  v-model="num" label="看房人数:"/> 
21 21
           <div class="information">
22 22
             <span class="remarks">备注信息:</span>
23 23
             <div class="input_content">
24
-                <textarea  id="textArea" class="content_txt" maxlength="100" @input = "descInput" v-model="desc" placeholder="例如:偏好、预算、要求等" onfocus="this.placeholder=''" onblur="this.placeholder='例如:偏好、预算、要求等'"></textarea>
25
-                <span class="number"><span  id="textNum" style="color:#FB6B2F">{{remnant}}</span><span>/100</span></span>
24
+                <textarea  id="textArea" class="content_txt" maxlength="100" v-model="desc" placeholder="例如:偏好、预算、要求等" onfocus="this.placeholder=''" onblur="this.placeholder='例如:偏好、预算、要求等'"></textarea>
25
+                <span class="number"><span  id="textNum" style="color:#FB6B2F">{{desc.length}}</span><span>/100</span></span>
26 26
             </div>
27 27
           </div> 
28 28
         </van-cell-group>
@@ -48,16 +48,17 @@ export default {
48 48
       minDate: new Date(),
49 49
       maxDate: new Date(2080, 10, 1),
50 50
       currentDate: new Date(),
51
-      remnant:0 ,//输入数
52
-      desc:''
51
+      desc:'',
52
+      tel:'',
53
+      num:''
53 54
 
54 55
     };
55 56
   },
56
-  //  mounted() {
57
-  //   this.$dialog.alert({
58
-  //     message: '弹窗内容'
59
-  //   });
60
-  // },
57
+  computed: {
58
+    desc (){
59
+      return this.desc.length
60
+    }
61
+  },
61 62
   methods: {
62 63
     showDatePicker() {
63 64
       this.show = true;
@@ -66,12 +67,11 @@ export default {
66 67
     showName (){
67 68
       this.inside = true;
68 69
     },
69
-
70
-    //计算输入数
71
-    descInput(){
72
-      const txtVal = this.desc.length;
73
-      this.remnant = txtVal;
74
-    }
70
+    // //计算输入数
71
+    // descInput(){
72
+    //   const txtVal = this.desc.length;
73
+    //   this.remnant = txtVal;
74
+    // }
75 75
   }
76 76
 };
77 77
 </script>

+ 9
- 11
src/store/building.js Voir le fichier

@@ -3,23 +3,21 @@ import getAPI from '../config/apis'
3 3
 
4 4
 export default {
5 5
     state: {
6
-      name: '',
7
-      project_id: '',
8
-      avator: '',
6
+      detail: {},
9 7
     },
10 8
     mutations: {
11
-      updateBuilding(state, newBuilding) {
12
-        const { name, project_id, avator } = newBuilding;
13
-        state.name = name;
14
-        state.id = project_id;
15
-        state.avator = avator;
9
+      updateBuilding(state, detail) {
10
+        state.detail = detail
16 11
       }
17 12
     },
18 13
     actions: {
19 14
       getBuilding({ commit }, params) {
20
-        request({ ...getAPI('building.get', { project_id: params.project_id }) }).then((data) => {
21
-          commit('updateBuilding', data)
22
-        })
15
+        return new Promise((resolve, reject) => {
16
+          request({ ...getAPI('building.get', { project_id: params.project_id }) }).then((data) => {
17
+            commit('updateBuilding', data)
18
+            resolve()            
19
+          }).catch(reject)
20
+        });
23 21
       },
24 22
     }
25 23
   }

+ 23
- 0
src/store/buildingimage.js Voir le fichier

@@ -0,0 +1,23 @@
1
+import request from '../utils/request'
2
+import getAPI from '../config/apis'
3
+
4
+export default {
5
+    state: {
6
+      detail: {},
7
+    },
8
+    mutations: {
9
+        updateBuildingImage(state, detail) {
10
+        state.detail = detail
11
+      }
12
+    },
13
+    actions: {
14
+      getBuildingimage({ commit }, params) {
15
+        return new Promise((resolve, reject) => {
16
+          request({ ...getAPI('buildingimage.get', { buildingid: params.buildingid }) }).then((data) => {
17
+            commit('updateBuildingImage', data)
18
+            resolve()            
19
+          }).catch(reject)
20
+        });
21
+      },
22
+    }
23
+  }

+ 23
- 0
src/store/buildingtype.js Voir le fichier

@@ -0,0 +1,23 @@
1
+import request from '../utils/request'
2
+import getAPI from '../config/apis'
3
+
4
+export default {
5
+    state: {
6
+      detail: {},
7
+    },
8
+    mutations: {
9
+        updateBuildingtype(state, detail) {
10
+        state.detail = detail
11
+      }
12
+    },
13
+    actions: {
14
+      getBuildingtype({ commit }, params) {
15
+        return new Promise((resolve, reject) => {
16
+          request({ ...getAPI('buildingtype.get', { buildingid: params.buildingid }) }).then((data) => {
17
+            commit('updateBuildingtype', data)
18
+            resolve()            
19
+          }).catch(reject)
20
+        });
21
+      },
22
+    }
23
+  }

+ 2
- 0
src/store/index.js Voir le fichier

@@ -8,6 +8,8 @@ const store = new Vuex.Store({
8 8
     app: require('./app.js').default,
9 9
     user: require('./user.js').default,
10 10
     building: require('./building.js').default,
11
+    buildingimage: require('./buildingimage.js').default,
12
+    buildingtype: require('./buildingtype.js').default,
11 13
   }
12 14
 });
13 15
 

+ 5
- 1
src/utils/request.js Voir le fichier

@@ -34,7 +34,11 @@ export default function request(config) {
34 34
       const data = response.data;
35 35
       // loadding.stop(id);
36 36
 
37
-      resolve(data);
37
+      if (data.result) {
38
+        resolve(data);
39
+      } else {
40
+        reject('请求数据失败');
41
+      }
38 42
     }).catch((error) => {
39 43
       // console.error(error);
40 44
       // loadding.stop(id);