陈冉 6 years ago
parent
commit
1386c41bb7

+ 32
- 2
package-lock.json View File

4148
         }
4148
         }
4149
       }
4149
       }
4150
     },
4150
     },
4151
+    "dom7": {
4152
+      "version": "2.1.2",
4153
+      "resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.2.tgz",
4154
+      "integrity": "sha512-cGwWtpu7KY3JnbREGqG4EGC/u+1hyLfWVMqrqRjmwiO8d5i4B+0imLZAQ/cJbiXnjbs0pdIUzcUyeI9BbnyKNg==",
4155
+      "requires": {
4156
+        "ssr-window": "^1.0.1"
4157
+      }
4158
+    },
4151
     "domain-browser": {
4159
     "domain-browser": {
4152
       "version": "1.2.0",
4160
       "version": "1.2.0",
4153
       "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
4161
       "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
8241
     "object-assign": {
8249
     "object-assign": {
8242
       "version": "4.1.1",
8250
       "version": "4.1.1",
8243
       "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
8251
       "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
8244
-      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
8245
-      "dev": true
8252
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
8246
     },
8253
     },
8247
     "object-copy": {
8254
     "object-copy": {
8248
       "version": "0.1.0",
8255
       "version": "0.1.0",
11976
         "tweetnacl": "~0.14.0"
11983
         "tweetnacl": "~0.14.0"
11977
       }
11984
       }
11978
     },
11985
     },
11986
+    "ssr-window": {
11987
+      "version": "1.0.1",
11988
+      "resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
11989
+      "integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
11990
+    },
11979
     "ssri": {
11991
     "ssri": {
11980
       "version": "6.0.1",
11992
       "version": "6.0.1",
11981
       "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
11993
       "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
12203
         "util.promisify": "~1.0.0"
12215
         "util.promisify": "~1.0.0"
12204
       }
12216
       }
12205
     },
12217
     },
12218
+    "swiper": {
12219
+      "version": "4.4.2",
12220
+      "resolved": "https://registry.npmjs.org/swiper/-/swiper-4.4.2.tgz",
12221
+      "integrity": "sha512-Vfl4Zw4Z7iZwUu5S11JeC7OSy4nwky29nkUulkmg8lIqcWla6UtOhdap0gkyJRYS+UJXki+GWQsbFM0SZRxZPQ==",
12222
+      "requires": {
12223
+        "dom7": "^2.1.2",
12224
+        "ssr-window": "^1.0.1"
12225
+      }
12226
+    },
12206
     "table": {
12227
     "table": {
12207
       "version": "4.0.2",
12228
       "version": "4.0.2",
12208
       "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz",
12229
       "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz",
12936
         "uppercamelcase": "^1.1.0"
12957
         "uppercamelcase": "^1.1.0"
12937
       }
12958
       }
12938
     },
12959
     },
12960
+    "vue-awesome-swiper": {
12961
+      "version": "3.1.3",
12962
+      "resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz",
12963
+      "integrity": "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==",
12964
+      "requires": {
12965
+        "object-assign": "^4.1.1",
12966
+        "swiper": "^4.0.7"
12967
+      }
12968
+    },
12939
     "vue-eslint-parser": {
12969
     "vue-eslint-parser": {
12940
       "version": "2.0.3",
12970
       "version": "2.0.3",
12941
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",
12971
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",

+ 1
- 0
package.json View File

13
     "vant": "^1.3.10",
13
     "vant": "^1.3.10",
14
     "vue": "^2.5.17",
14
     "vue": "^2.5.17",
15
     "vue-amap": "^0.5.8",
15
     "vue-amap": "^0.5.8",
16
+    "vue-awesome-swiper": "^3.1.3",
16
     "vue-headful": "^2.0.1",
17
     "vue-headful": "^2.0.1",
17
     "vue-router": "^3.0.1",
18
     "vue-router": "^3.0.1",
18
     "vuex": "^3.0.1"
19
     "vuex": "^3.0.1"

+ 9
- 1
src/config/apis.js View File

35
     //   method: 'get',
35
     //   method: 'get',
36
     // },
36
     // },
37
   },
37
   },
38
-  collect:{
38
+  addcollect:{
39
     collectbuilding:{
39
     collectbuilding:{
40
       url: '/api/lp/saveCollect/:buildingid',
40
       url: '/api/lp/saveCollect/:buildingid',
41
       method: 'get',
41
       method: 'get',
45
     //   method: 'get',
45
     //   method: 'get',
46
     // },
46
     // },
47
   },
47
   },
48
+
49
+  vistors:{
50
+    add:{
51
+      url: '/api/lp/updateDynamicBrowsinginfo/:id',
52
+      method: 'get',
53
+    }
54
+  },
55
+
48
   map:{
56
   map:{
49
     getmapinformation:{
57
     getmapinformation:{
50
       url: '/api/lp/getBuildingRoute/:buildingid',
58
       url: '/api/lp/getBuildingRoute/:buildingid',

+ 3
- 0
src/main.js View File

5
 import router from './router'
5
 import router from './router'
6
 import store from './store'
6
 import store from './store'
7
 import AMap from 'vue-amap'
7
 import AMap from 'vue-amap'
8
+import VueAwesomeSwiper from 'vue-awesome-swiper'
9
+import 'swiper/dist/css/swiper.css'
8
 
10
 
9
 // import './theme'
11
 // import './theme'
10
 // import './public/style/common.scss'
12
 // import './public/style/common.scss'
12
 
14
 
13
 Vue.use(Vant)
15
 Vue.use(Vant)
14
 Vue.use(AMap)
16
 Vue.use(AMap)
17
+Vue.use(VueAwesomeSwiper, /* { default global options } */)
15
 
18
 
16
 Vue.config.productionTip = false
19
 Vue.config.productionTip = false
17
 
20
 

+ 21
- 7
src/pages/building/buildingdetail.vue View File

26
         </div>
26
         </div>
27
         <div class="housenamefooter">
27
         <div class="housenamefooter">
28
           <div>
28
           <div>
29
-            <span class="housetype" v-for="(list, index) in detail.projectcharacteristicList" :key="index">{{detail.projectcharacteristicList[index]}}</span>
29
+            <span class="housetype" v-for="(item, index) in detail.projectcharacteristicList" :key="index">{{item}}</span>
30
           </div>
30
           </div>
31
             <span class="housetel"><i class="iconfont  icon-dianhua2 phone"> </i><span ><a :href="'tel:' + detail.salestel">{{detail.salestel}}</a></span></span>
31
             <span class="housetel"><i class="iconfont  icon-dianhua2 phone"> </i><span ><a :href="'tel:' + detail.salestel">{{detail.salestel}}</a></span></span>
32
         </div>
32
         </div>
35
       <div class="buildingdata">
35
       <div class="buildingdata">
36
         <div class="datacontent">
36
         <div class="datacontent">
37
           <van-swipe class="slidewrapper">
37
           <van-swipe class="slidewrapper">
38
-            <van-swipe-item class="slideimg" v-for="(list, index) in detail.buildingDatas" :key="index">
39
-              <span class="slidedesc" >{{detail.buildingDatas[index]}}</span>
38
+            <van-swipe-item class="slideimg" >
39
+              <div v-for="(list, index) in detail.buildingDatas" :key="index">
40
+                <span class="slidedesc" >{{list}}</span>
41
+              </div>
40
             </van-swipe-item>
42
             </van-swipe-item>
41
           </van-swipe>
43
           </van-swipe>
42
         </div>
44
         </div>
81
     <van-collapse v-model="activeName" accordion>
83
     <van-collapse v-model="activeName" accordion>
82
       <van-collapse-item v-for="(list, index) in detail.buildingDynamicLst" :key="index">
84
       <van-collapse-item v-for="(list, index) in detail.buildingDynamicLst" :key="index">
83
         <div slot="title">
85
         <div slot="title">
84
-          <span class="dynamictitle">{{detail.buildingDynamicLst[index].title}}</span>
86
+          <span class="dynamictitle">{{list.title}}</span>
85
           <div class="peopletimer">
87
           <div class="peopletimer">
86
-            <span class="people">{{detail.buildingDynamicLst[index].browsingnum}}人看过</span>
87
-            <span class="timer">{{detail.buildingDynamicLst[index].createtime}}</span>
88
+            <span class="people">{{list.browsingnum}}人看过</span>
89
+            <span class="timer">{{list.createtime}}</span>
88
           </div>
90
           </div>
89
         </div>
91
         </div>
90
-        <span class="dynamiccontent" v-html="detail.buildingDynamicLst[index].dynamicinfo"></span>
92
+        <span class="dynamiccontent" v-html="list.dynamicinfo"></span>
91
       </van-collapse-item>
93
       </van-collapse-item>
92
     </van-collapse>
94
     </van-collapse>
93
   </div>
95
   </div>
115
   computed: {
117
   computed: {
116
     ...mapState({
118
     ...mapState({
117
       detail: s => s.building.detail
119
       detail: s => s.building.detail
120
+      // buildingDatas:s => building.buildingDatas
118
     }),
121
     }),
122
+    // pages () {
123
+    // const pages = []
124
+    // this.list.forEach((item, index) =>{
125
+    //   const page =Math.floor(index / 8)
126
+    //   if(!pages[page]){
127
+    //     pages[page]=[]
128
+    //   }
129
+    //   pages[page].push(item)
130
+    // })
131
+    // return pages
132
+    // }
119
    
133
    
120
   },
134
   },
121
   created() {
135
   created() {

+ 181
- 107
src/pages/building/buildingimage.vue View File

3
        <vue-headful title="楼盘相册"  />
3
        <vue-headful title="楼盘相册"  />
4
        <div class="houseimagecontent">
4
        <div class="houseimagecontent">
5
            <div class="houseimage">
5
            <div class="houseimage">
6
-                <van-swipe class="slidewrapper" :autoplay="3000">
7
-                    <van-swipe-item class="slideimg" v-for="(list, index) in detail" :key="index">
8
-                        <img class="lazyimage" :src="detail[index]" />
9
-                    </van-swipe-item>
10
-                </van-swipe>
11
-           </div>
12
-           <div class="houseindex">
13
-               <span class="imagetype">效果图</span>
14
-               <div class="imageindex">
15
-                   <span class="countimage countindex">2</span>
16
-                   <span class="countimage">/</span>
17
-                   <span class="countimage totalcount">4</span>
18
-               </div>
6
+                <swiper class="slidewrapper">
7
+                    <swiper-slide class="slideimg" v-for="(list1, index1) in detail.imageLst1" :key="index1">
8
+                        <img class="lazyimage" :src="list1.fileurl" />
9
+                        <div class="houseindex">
10
+                            <span class="imagetype">{{list1.name}}</span>
11
+                            <div class="imageindex" >
12
+                                <span class="countimage countindex">{{index1+1}}</span>
13
+                                <span class="countimage">/</span>
14
+                                <span class="countimage totalcount">{{detail.imageLstCount1}}</span>
15
+                            </div>
16
+                        </div>
17
+                    </swiper-slide>
18
+                    <swiper-slide class="slideimg" v-for="(list2, index2) in detail.imageLst2" :key="index2">
19
+                        <img class="lazyimage" :src="list2.fileurl" />
20
+                        <div class="houseindex">
21
+                            <span class="imagetype">{{list2.name}}</span>
22
+                            <div class="imageindex">
23
+                                <span class="countimage countindex">{{index2+1}}</span>
24
+                                <span class="countimage">/</span>
25
+                                <span class="countimage totalcount">{{detail.imageLstCount2}}</span>
26
+                            </div>
27
+                        </div>
28
+                    </swiper-slide>
29
+                    <swiper-slide class="slideimg" v-for="(list3, index3) in detail.imageLst3" :key="index3">
30
+                        <img class="lazyimage" :src="list3.fileurl" />
31
+                        <div class="houseindex">
32
+                            <span class="imagetype">{{list3.name}}</span>
33
+                            <div class="imageindex">
34
+                                <span class="countimage countindex">{{index3+1}}</span>
35
+                                <span class="countimage">/</span>
36
+                                <span class="countimage totalcount">{{detail.imageLstCount3}}</span>
37
+                            </div>
38
+                        </div>
39
+                    </swiper-slide>
40
+                    <swiper-slide class="slideimg" v-for="(list4, index4) in detail.imageLst4" :key="index4">
41
+                        <img class="lazyimage" :src="list4.fileurl" />
42
+                        <div class="houseindex">
43
+                            <span class="imagetype">{{list4.name}}</span>
44
+                            <div class="imageindex">
45
+                                <span class="countimage countindex">{{index4+1}}</span>
46
+                                <span class="countimage">/</span>
47
+                                <span class="countimage totalcount">{{detail.imageLstCount4}}</span>
48
+                            </div>
49
+                        </div>
50
+                    </swiper-slide>
51
+                    <swiper-slide class="slideimg" v-for="(list5, index5) in detail.imageLst5" :key="index5">
52
+                        <img class="lazyimage" :src="list5.fileurl" />
53
+                        <div class="houseindex">
54
+                            <span class="imagetype">{{list5.name}}</span>
55
+                            <div class="imageindex">
56
+                                <span class="countimage countindex">{{index5+1}}</span>
57
+                                <span class="countimage">/</span>
58
+                                <span class="countimage totalcount">{{detail.imageLstCount5}}</span>
59
+                            </div>
60
+                        </div>
61
+                    </swiper-slide>
62
+                </swiper>
19
            </div>
63
            </div>
20
        </div>
64
        </div>
21
-       <div class="imageboxtype">
22
-           <div class="drawingimpress" v-for="list in detail.imageTypeLst" :key="list.id">
23
-               <span class="boxcharacters">{{list.imagetypename}}</span>
65
+       <div class="imageboxtype" >
66
+           <div class="drawingimpress" v-for="(list, index) in lists" :key="index"  @click="toggle(index)" :class='{active:list.active}'>
67
+               <span class="boxcharacters" :class='{active:list.active}'>{{list.imagetypename}}</span>
24
            </div>
68
            </div>
25
        </div>
69
        </div>
26
     </div>
70
     </div>
30
 import { mapState, mapActions } from "vuex";
74
 import { mapState, mapActions } from "vuex";
31
 
75
 
32
 export default {
76
 export default {
33
-     name:'BuildingImage',
34
-    components: {
35
-    'vue-headful': () => import('vue-headful'),
36
-     },
37
-     computed: {
38
-        ...mapState({
39
-        detail: s => s.buildingimage.detail,
40
-        }),
41
-     },
42
-     created() {
43
-        this.getBuildingimage({ buildingid: this.$route.query.id });
44
-        window.console.log(this.$route.query.id)
45
-    },
46
-    methods: {
47
-        ...mapActions(["getBuildingimage"]),
77
+  name: "BuildingImage",
78
+  data() {
79
+    return {
80
+      lists: [],
81
+    };
82
+  },
83
+  components: {
84
+    "vue-headful": () => import("vue-headful")
85
+  },
86
+  computed: {
87
+    ...mapState({
88
+      detail: s => s.buildingimage.detail
89
+    }),
90
+  },
91
+  created() {
92
+    this.getBuildingimage({ buildingid: this.$route.query.id }).then(() => {
93
+      this.lists = this.detail.imageTypeLst;
94
+      this.lists.forEach((curr, index) => {
95
+        curr.active = false;
96
+        if (index === 0) {
97
+          curr.active = true;
98
+        }
99
+      });
100
+    });
101
+  },
102
+  methods: {
103
+    ...mapActions(["getBuildingimage"]),
104
+    toggle(ind) {
105
+        let list = []
106
+        this.lists.forEach((curr, index) => {
107
+        curr.active = false;
108
+        if (index === ind) {
109
+          curr.active = true;
110
+        }
111
+        list.push(curr)
112
+      });
113
+      this.lists = []
114
+      this.lists = list
115
+    }
48
   }
116
   }
49
-  
50
-}
117
+};
51
 </script>
118
 </script>
52
 
119
 
53
 <style lang="postcss" scoped>
120
 <style lang="postcss" scoped>
54
-.imgbackground{
121
+.active {
122
+  background-color: rgba(119, 165, 240, 1) !important;
123
+  color: rgba(255, 255, 255, 1) !important;
124
+}
125
+.imgbackground {
55
   width: 100%;
126
   width: 100%;
56
   height: 667px;
127
   height: 667px;
57
-  background-color: rgba(31,31,31,0.5);
128
+  background-color: rgba(31, 31, 31, 0.5);
58
 
129
 
59
-  .houseimagecontent{
130
+  .houseimagecontent {
60
     width: 100%;
131
     width: 100%;
61
-    height: 251px;
62
-    padding-top:103px;
132
+    height: 255px;
133
+    padding-top: 103px;
63
 
134
 
64
-    .houseimage{
65
-       width:100%;
66
-       height: 211px;
135
+    .houseimage {
136
+      width: 100%;
137
+      height: 255px;
67
 
138
 
68
-       .slidewrapper{
69
-          width: 100%;
70
-          height: 100%;
71
-
72
-          .slideimg {
73
-             width: 100%;
74
-             height: 100%;
139
+      .slidewrapper {
140
+        width: 100%;
141
+        height: 100%;
75
 
142
 
76
-            .lazyimage{
77
-               width: 100%;
78
-               height: 100%;
79
-                }
143
+        .slideimg {
144
+          width: 100%;
145
+          height: 211px;
146
+
147
+          .lazyimage {
148
+            width: 100%;
149
+            height: 100%;
150
+          }
151
+
152
+          .houseindex {
153
+            position: absolute;
154
+            top: 211px;
155
+            left: 0;
156
+            width: 100%;
157
+            height: 40px;
158
+            background-color: rgba(255, 255, 255, 1);
159
+            display: flex;
160
+            flex-direction: row;
161
+            align-items: center;
162
+            justify-content: space-between;
163
+
164
+            .imagetype {
165
+              font-size: 12px;
166
+              font-family: PingFangSC-Regular;
167
+              font-weight: 400;
168
+              color: rgba(59, 153, 252, 1);
169
+              line-height: 17px;
170
+              padding-left: 15px;
80
             }
171
             }
81
-        }
82
-    }
83
 
172
 
84
-    .houseindex{
85
-        width: 100%;
86
-        height: 40px;
87
-        background-color: rgba(255,255,255,1);
88
-        display: flex;
89
-        flex-direction: row;
90
-        align-items: center;
91
-        justify-content: space-between;
92
-
93
-        .imagetype{
94
-           font-size:12px;
95
-           font-family:PingFangSC-Regular;
96
-           font-weight:400;
97
-           color:rgba(59,153,252,1);
98
-           line-height:17px;
99
-           padding-left:15px;
100
-        }
173
+            .imageindex {
174
+              padding-right: 15px;
101
 
175
 
102
-       .imageindex{
103
-           padding-right: 15px;
104
-
105
-        .countimage{
106
-            font-size:12px;
107
-            font-family:PingFangSC-Regular;
108
-            font-weight:400;
109
-            color:rgba(127,127,127,1);
110
-            line-height:17px;
176
+              .countimage {
177
+                font-size: 12px;
178
+                font-family: PingFangSC-Regular;
179
+                font-weight: 400;
180
+                color: rgba(127, 127, 127, 1);
181
+                line-height: 17px;
182
+              }
183
+            }
184
+          }
111
         }
185
         }
186
+      }
112
     }
187
     }
113
-}
114
-}
188
+  }
115
 
189
 
116
-    .imageboxtype{
117
-        padding-top: 15px;
118
-        margin-left: 5%;
119
-        width: 94%;
120
-        display: flex;
121
-        flex-direction: row;
122
-        flex-wrap: wrap;
123
-
124
-    .drawingimpress{
125
-        width:30%;
126
-        height: 58px;
127
-        display:flex;
128
-        justify-content: center;
129
-        align-items: center;
130
-        background-color:rgba(119,165,240,1);
131
-        margin:0 10px 10px 0;
132
-
133
-        .boxcharacters{
134
-            font-size:12px;
135
-            font-family:PingFangSC-Regular;
136
-            font-weight:400;
137
-            color:rgba(255,255,255,1);
138
-            line-height:17px;
139
-        }
190
+  .imageboxtype {
191
+    padding-top: 15px;
192
+    margin-left: 5%;
193
+    width: 94%;
194
+    display: flex;
195
+    flex-direction: row;
196
+    flex-wrap: wrap;
197
+
198
+    .drawingimpress {
199
+      width: 30%;
200
+      height: 58px;
201
+      display: flex;
202
+      justify-content: center;
203
+      align-items: center;
204
+      background-color: rgba(255, 255, 255, 1);
205
+      margin: 0 10px 10px 0;
206
+
207
+      .boxcharacters {
208
+        font-size: 12px;
209
+        font-family: PingFangSC-Regular;
210
+        font-weight: 400;
211
+        color: rgba(97, 97, 97, 1);
212
+        line-height: 17px;
213
+      }
140
     }
214
     }
141
- }
215
+  }
142
 }
216
 }
143
 </style>
217
 </style>
144
 
218
 

+ 34
- 30
src/pages/building/buildingtype.vue View File

2
     <div class="context">
2
     <div class="context">
3
      <vue-headful title="户型图"  />
3
      <vue-headful title="户型图"  />
4
         <div class="typeheader">
4
         <div class="typeheader">
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" >
5
+            <swiper class="slidewrapper" >
6
+                <swiper-slide class="slideimg" v-for="(list, index) in detail.buildingModelLst" :key="index">
7
                     <img class="typeimg" :src="list.modelurl" />
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>
17
-            </div>
8
+                    <div class="typeindex">
9
+                        <span class="typename">{{list.name}}</span>
10
+                        <div class="imageindex" >
11
+                            <span class="countimage countindex">{{index+1}}</span>
12
+                            <span class="countimage">/</span>
13
+                            <span class="countimage totalcount">{{detail.buildingModelLstCount}}</span>
14
+                        </div>
15
+                    </div>
16
+                </swiper-slide>
17
+            </swiper>
18
         </div>
18
         </div>
19
         <div class="typecontent" >
19
         <div class="typecontent" >
20
             <div class="househeader" v-for="list in detail.buildingModelLst" :key="list.id">
20
             <div class="househeader" v-for="list in detail.buildingModelLst" :key="list.id">
24
                 </div>
24
                 </div>
25
                 <div class="headerbottom">
25
                 <div class="headerbottom">
26
                     <div>
26
                     <div>
27
-                    <span class="typefeature" v-for="(item ,index) in list.childrenfeatures" :key="index">{{ list.childrenfeatures[index] }}</span>
27
+                    <span class="typefeature" v-for="(item ,index) in list.childrenfeatures" :key="index">{{ item }}</span>
28
                     </div>
28
                     </div>
29
                     <span class="typearea">建筑面积:{{ list.area }}㎡</span>
29
                     <span class="typearea">建筑面积:{{ list.area }}㎡</span>
30
                 </div>
30
                 </div>
32
                     <span class="bigcharacters">{{ list.situation }}</span>
32
                     <span class="bigcharacters">{{ list.situation }}</span>
33
                     <span class="smallcharacters">
33
                     <span class="smallcharacters">
34
                         <span class="fixedsmallcharacters">户型描述:</span>
34
                         <span class="fixedsmallcharacters">户型描述:</span>
35
-                        <span class="trendssmallcharacters">{{ list.modelParsingLst[0].detailparsing }}</span>
35
+                        <span class="trendssmallcharacters" v-for="(item, index) in list.modelParsingLst" :key="index">{{ item.detailparsing }}</span>
36
                     </span>
36
                     </span>
37
                 </div>
37
                 </div>
38
             </div>
38
             </div>
59
         }),
59
         }),
60
      },
60
      },
61
      created() {
61
      created() {
62
-        this.getBuildingtype({ buildingid: "8a9cd8265afb04b2015bccb967fc15f7" });
62
+        this.getBuildingtype({ buildingid: this.$route.query.id});
63
     },
63
     },
64
     methods: {
64
     methods: {
65
         ...mapActions(["getBuildingtype"]),
65
         ...mapActions(["getBuildingtype"]),
77
     overflow-y: auto;
77
     overflow-y: auto;
78
 
78
 
79
     .typeheader{
79
     .typeheader{
80
- width:100%;
81
- height: 262px;
80
+        width:100%;
81
+        height: 262px;
82
 
82
 
83
     .slidewrapper{
83
     .slidewrapper{
84
         width: 100%;
84
         width: 100%;
85
-        height: 225px;
85
+        height: 100%;
86
 
86
 
87
         .slideimg{
87
         .slideimg{
88
             width: 100%;
88
             width: 100%;
89
-            height: 100%;
89
+            height: 225px;
90
         }
90
         }
91
         .typeimg{
91
         .typeimg{
92
-            max-width: 100%;
92
+            width: 100%;
93
+            height: 100%;
93
         }
94
         }
94
-    }
95
 
95
 
96
-    .typeindex{
97
-        width: 100%;
98
-        height: 37px;
99
-        background-color: rgba(248,248,248,1);
100
-        border-top:0.5px solid #EAEAEA;
101
-        display: flex;
102
-        flex-direction: row;
103
-        align-items: center;
104
-        justify-content: space-between;
96
+        .typeindex{
97
+            position:absolute;
98
+            top:225px;
99
+            left:0;
100
+            width: 100%;
101
+            height: 37px;
102
+            background-color: rgba(248,248,248,1);
103
+            border-top:0.5px solid #EAEAEA;
104
+            display: flex;
105
+            flex-direction: row;
106
+            align-items: center;
107
+            justify-content: space-between;
105
 
108
 
106
         .typename{
109
         .typename{
107
             font-size:12px;
110
             font-size:12px;
132
                 }
135
                 }
133
             }
136
             }
134
     }
137
     }
138
+    }
135
 }
139
 }
136
 
140
 
137
 .typecontent{
141
 .typecontent{

+ 31
- 10
src/pages/reservation/lookhouse.vue View File

6
           <van-cell class="field_name" is-link arrow-direction="down" @click="showName()">楼盘名称:<span class="buildingnamelist">{{detail.buildingName}}</span>
6
           <van-cell class="field_name" is-link arrow-direction="down" @click="showName()">楼盘名称:<span class="buildingnamelist">{{detail.buildingName}}</span>
7
               <van-popup v-model="inside" position="bottom" :overlay="false">
7
               <van-popup v-model="inside" position="bottom" :overlay="false">
8
                 <ul class="housenamelist">
8
                 <ul class="housenamelist">
9
-                  <li class="namelist" @click="clicknamelist()" v-for="list in namelist.buildingList" :key="list.buildingid">{{list.buildingname}}</li>
9
+                  <li class="namelist" 
10
+                    v-for="list in namelist.buildingList"
11
+                    :key="list.buildingid"   
12
+                    :class="{'active':list.buildingname.show===true}" 
13
+                    @click="clicknamelist(list.buildingid)">
14
+                    <span class="namelist">{{list.buildingname}}</span>
15
+                  </li>
10
                 </ul>
16
                 </ul>
11
               </van-popup>
17
               </van-popup>
12
           </van-cell>
18
           </van-cell>
13
-          <van-cell class="field_name">楼盘地址:</van-cell>
14
-          <van-switch-cell size="20px" v-model="checked" title="马上去"  />
15
-          <van-field class="field_name" @click="showDatePicker()" label="预约时间:"  />
19
+          <van-cell class="field_name">楼盘地址:<span class="buildingaddress">{{detail.buildingAddress}}</span></van-cell>
20
+          <van-switch-cell size="20px" v-model="checked" title="马上去"  @change="onChange" />
21
+          <van-field class="field_name" @click="showDatePicker()" label="预约时间:"  v-model="datetime"/>
16
           <van-popup v-model="show" position="bottom" :overlay="true">
22
           <van-popup v-model="show" position="bottom" :overlay="true">
17
             <van-datetime-picker v-model="currentDate" type="datetime" :formatter="formatter" @cancel="cancel" @confirm="confirm"/>
23
             <van-datetime-picker v-model="currentDate" type="datetime" :formatter="formatter" @cancel="cancel" @confirm="confirm"/>
18
           </van-popup>
24
           </van-popup>
52
       show: false,
58
       show: false,
53
       currentDate: new Date(),
59
       currentDate: new Date(),
54
       showPage:false,
60
       showPage:false,
55
-      
61
+      buildingname:'',
62
+      datetime:'',
56
       formdata: {
63
       formdata: {
57
         remark:'',
64
         remark:'',
58
         telnum:'',
65
         telnum:'',
78
     })
85
     })
79
   },
86
   },
80
   created() {
87
   created() {
81
-    this.getLookHouse({  project_id: "1",
88
+    this.getLookHouse({  
89
+    project_id: "1",
90
+    buildingid: this.$route.query.id
82
     }).then(() => {
91
     }).then(() => {
83
       this.showPage = true
92
       this.showPage = true
84
     });
93
     });
94
+    window.console.log(this.$route.query.id)
85
   },
95
   },
86
   methods: {
96
   methods: {
87
     showDatePicker() {
97
     showDatePicker() {
88
       this.show = true;
98
       this.show = true;
89
     },
99
     },
100
+    onChange() {
101
+      this.$dialog.alert({
102
+        message: '使用马上去功能,我们将以短信形式发送楼盘地址给您,您可以选择使用滴滴、美团打车、或乘坐出租车等方式到达售楼中心,联系置业顾问后即可报销车票!   部分售楼处可能通过发放礼品等形式抵扣车费,也可能此售楼处报销车费活动已经结束,具体解释权归售楼处所有,可提前通过上方电话咨询。'
103
+        })
104
+    },
90
 
105
 
91
   cancel () {
106
   cancel () {
92
     this.show=false
107
     this.show=false
106
     },
121
     },
107
 
122
 
108
     showName (){
123
     showName (){
124
+      window.console.log()
109
       this.inside = true;
125
       this.inside = true;
110
-      this.getHouseNameList({ project_id: "1" })
126
+      this.getHouseNameList({ 
127
+        project_id: "1" ,
128
+        // id:this.$route.params.id ,
129
+        })      
111
     },
130
     },
112
-    clicknamelist (){
131
+    clicknamelist (buildingid){
113
       this.getTypeList({ 
132
       this.getTypeList({ 
114
-        project_id: "1",
133
+        // project_id: "1",
134
+       id: this.namelist.buildingid 
115
          })
135
          })
136
+         window.console.log(buildingid)
116
       
137
       
117
     },
138
     },
118
     submit () {
139
     submit () {
156
   .title {
177
   .title {
157
     background-color: #fff;
178
     background-color: #fff;
158
     margin-bottom: 22px;
179
     margin-bottom: 22px;
159
-    height: 510px;
180
+    height: 530px;
160
 
181
 
161
     .information {
182
     .information {
162
       margin-top: 15px;
183
       margin-top: 15px;

src/store/collect.js → src/store/addcollect.js View File

6
       detail: {},
6
       detail: {},
7
     },
7
     },
8
     mutations: {
8
     mutations: {
9
-      updateCollect(state, detail) {
9
+      updateAddCollect(state, detail) {
10
         state.detail = detail
10
         state.detail = detail
11
       }
11
       }
12
     },
12
     },
13
     actions: {
13
     actions: {
14
-      getCollect({ commit }, params) {
14
+      getAddCollect({ commit }, params) {
15
         return new Promise((resolve, reject) => {
15
         return new Promise((resolve, reject) => {
16
-          request({ ...getAPI('collect.collectbuilding', { buildingid: params.buildingid }) }).then((data) => {
17
-            commit('updateCollect', data)
16
+          request({ ...getAPI('addcollect.collectbuilding', { buildingid: params.buildingid }) }).then((data) => {
17
+            commit('updateAddCollect', data)
18
             resolve()            
18
             resolve()            
19
           }).catch(reject)
19
           }).catch(reject)
20
         });
20
         });

+ 2
- 0
src/store/building.js View File

4
 export default {
4
 export default {
5
     state: {
5
     state: {
6
       detail: {},
6
       detail: {},
7
+      // buildingDate:[]
7
     },
8
     },
8
     mutations: {
9
     mutations: {
9
       updateBuilding(state, detail) {
10
       updateBuilding(state, detail) {
10
         state.detail = detail
11
         state.detail = detail
12
+        // state.buildingDate=buildingDate
11
       }
13
       }
12
     },
14
     },
13
     actions: {
15
     actions: {

+ 1
- 1
src/store/index.js View File

10
     building: require('./building.js').default,
10
     building: require('./building.js').default,
11
     buildingimage: require('./buildingimage.js').default,
11
     buildingimage: require('./buildingimage.js').default,
12
     buildingtype: require('./buildingtype.js').default,
12
     buildingtype: require('./buildingtype.js').default,
13
-    collect: require('./collect.js').default,
13
+    addcollect: require('./addcollect.js').default,
14
     map: require('./map.js').default,
14
     map: require('./map.js').default,
15
     lookhouse: require('./lookhouse.js').default,
15
     lookhouse: require('./lookhouse.js').default,
16
     housenamelist: require('./housenamelist.js').default,
16
     housenamelist: require('./housenamelist.js').default,

+ 5
- 3
src/store/order.js View File

4
 export default {
4
 export default {
5
     namespaced: true,
5
     namespaced: true,
6
     state: {
6
     state: {
7
-      saveinformation: {},
7
+      currentDate:new Date(),
8
+      formdata:{}
8
     },
9
     },
9
     mutations: {
10
     mutations: {
10
       updateOrder(state, saveinformation) {
11
       updateOrder(state, saveinformation) {
12
       }
13
       }
13
     },
14
     },
14
     actions: {
15
     actions: {
15
-      postOrder({ commit }, params) {
16
+      postOrder({ commit }, data) {
17
+        window.console.log(555)
16
         return new Promise((resolve, reject) => {
18
         return new Promise((resolve, reject) => {
17
-          request({ ...getAPI('order.save', { data: params }) }).then((data) => {
19
+          request({ ...getAPI('order.save', { data: data }) }).then((data) => {
18
             commit('updateOrder', data)
20
             commit('updateOrder', data)
19
             resolve()            
21
             resolve()            
20
           }).catch(reject)
22
           }).catch(reject)

+ 24
- 0
src/store/visitors.js View File

1
+import request from '../utils/request'
2
+import getAPI from '../config/apis'
3
+
4
+export default {
5
+    namespaced: true,
6
+    state: {
7
+      vistorsnum: '',
8
+    },
9
+    mutations: {
10
+      updateTypeList(state, vistorsnum) {
11
+        state.vistorsnum = vistorsnum
12
+      }
13
+    },
14
+    actions: {
15
+      postvistor({ commit }, params) {
16
+        return new Promise((resolve, reject) => {
17
+          request({ ...getAPI('vistors.gettypelist', { buildingid: params.buildingid }) }).then((data) => {
18
+            commit('updateVistors', data)
19
+            resolve()            
20
+          }).catch(reject)
21
+        });
22
+      },
23
+    }
24
+  }