陈冉 6 лет назад
Родитель
Сommit
2977255b5a

+ 18
- 0
package-lock.json Просмотреть файл

@@ -7991,6 +7991,11 @@
7991 7991
         "minimist": "0.0.8"
7992 7992
       }
7993 7993
     },
7994
+    "moment": {
7995
+      "version": "2.22.2",
7996
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
7997
+      "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
7998
+    },
7994 7999
     "move-concurrently": {
7995 8000
       "version": "1.0.1",
7996 8001
       "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
@@ -12980,6 +12985,14 @@
12980 12985
         "lodash": "^4.17.4"
12981 12986
       }
12982 12987
     },
12988
+    "vue-event-calendar": {
12989
+      "version": "1.5.2",
12990
+      "resolved": "https://registry.npmjs.org/vue-event-calendar/-/vue-event-calendar-1.5.2.tgz",
12991
+      "integrity": "sha512-ZUwTRl46GPOzYNGbtVdEicsw14JPC3YoaUbRf6eryAbomXwMcO0eCInGHDC+yZUWPGzj+trRObhVfTt4ytGFuA==",
12992
+      "requires": {
12993
+        "vue": "^2.1.8"
12994
+      }
12995
+    },
12983 12996
     "vue-headful": {
12984 12997
       "version": "2.0.1",
12985 12998
       "resolved": "https://registry.npmjs.org/vue-headful/-/vue-headful-2.0.1.tgz",
@@ -13012,6 +13025,11 @@
13012 13025
         "vue-style-loader": "^4.1.0"
13013 13026
       }
13014 13027
     },
13028
+    "vue-mobile-calendar": {
13029
+      "version": "2.2.0",
13030
+      "resolved": "https://registry.npmjs.org/vue-mobile-calendar/-/vue-mobile-calendar-2.2.0.tgz",
13031
+      "integrity": "sha512-sQ8jgUgOOcCf+NcVjKOKDaHo4uqCWcOvhJnu5oKNL3thKLW29dEOqXubbUvY6qjeT55v7Y6FgmmrhJialOBDpA=="
13032
+    },
13015 13033
     "vue-router": {
13016 13034
       "version": "3.0.1",
13017 13035
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.1.tgz",

+ 3
- 0
package.json Просмотреть файл

@@ -10,11 +10,14 @@
10 10
   },
11 11
   "dependencies": {
12 12
     "lodash.get": "^4.4.2",
13
+    "moment": "^2.22.2",
13 14
     "vant": "^1.3.10",
14 15
     "vue": "^2.5.17",
15 16
     "vue-amap": "^0.5.8",
16 17
     "vue-awesome-swiper": "^3.1.3",
18
+    "vue-event-calendar": "^1.5.2",
17 19
     "vue-headful": "^2.0.1",
20
+    "vue-mobile-calendar": "^2.2.0",
18 21
     "vue-router": "^3.0.1",
19 22
     "vuex": "^3.0.1"
20 23
   },

+ 20
- 5
src/config/apis.js Просмотреть файл

@@ -5,6 +5,7 @@ const apiList = {
5 5
     url: '',
6 6
     method: 'get',
7 7
   },
8
+  //获取楼盘信息
8 9
   building:{
9 10
     getbuilding:{
10 11
       url: '/api/lp/buildingBaseInfo/:project_id',
@@ -15,6 +16,7 @@ const apiList = {
15 16
     //   method: 'get',
16 17
     // },
17 18
   },
19
+  //获取楼盘相册
18 20
   buildingimage:{
19 21
     getbuildingimage:{
20 22
       url: '/api/lp/getBuildingImages/:buildingid',
@@ -25,6 +27,7 @@ const apiList = {
25 27
     //   method: 'get',
26 28
     // },
27 29
   },
30
+  //获取户型图片及信息
28 31
   buildingtype:{
29 32
     gethousetype:{
30 33
       url: '/api/lp/getBuildingModels/:buildingid',
@@ -35,8 +38,9 @@ const apiList = {
35 38
     //   method: 'get',
36 39
     // },
37 40
   },
38
-  addcollect:{
39
-    collectbuilding:{
41
+  //添加收藏
42
+  collect:{
43
+    addcollect:{
40 44
       url: '/api/lp/saveCollect/:buildingid',
41 45
       method: 'get',
42 46
     },
@@ -45,14 +49,21 @@ const apiList = {
45 49
     //   method: 'get',
46 50
     // },
47 51
   },
48
-
49
-  vistors:{
52
+  //取消收藏
53
+  delectcollect:{
54
+    delect:{
55
+      url: '/api/lp/deleteCollect/:buildingid',
56
+      method: 'get',
57
+    },
58
+  },
59
+//浏览人数
60
+  visitors:{
50 61
     add:{
51 62
       url: '/api/lp/updateDynamicBrowsinginfo/:id',
52 63
       method: 'get',
53 64
     }
54 65
   },
55
-
66
+// 周边地图信息
56 67
   map:{
57 68
     getmapinformation:{
58 69
       url: '/api/lp/getBuildingRoute/:buildingid',
@@ -63,6 +74,7 @@ const apiList = {
63 74
     //   method: 'get',
64 75
     // },
65 76
   },
77
+  //预约看房信息
66 78
   lookhouse:{
67 79
     subscribeinformation:{
68 80
       url: '/api/order/getBuildingInfo/:project_id',
@@ -73,6 +85,7 @@ const apiList = {
73 85
     //   method: 'get',
74 86
     // },
75 87
   },
88
+  //预约看房楼盘名称
76 89
   housenamelist:{
77 90
     getnamelist:{
78 91
       url: '/api/order/buildingList/:project_id',
@@ -83,6 +96,7 @@ const apiList = {
83 96
     //   method: 'get',
84 97
     // },
85 98
   },
99
+  //预约看房获取楼盘id
86 100
   typelist:{
87 101
     gettypelist:{
88 102
       url: '/api/order/buildingInfo/:buildingid',
@@ -93,6 +107,7 @@ const apiList = {
93 107
     //   method: 'get',
94 108
     // },
95 109
   },
110
+  //提交预约看房信息
96 111
   order: {
97 112
     save: {
98 113
       url: '/api/order/saveOrder',

Двоичные данные
src/img/bottomdrawing.png Просмотреть файл


Двоичные данные
src/img/lALPDgQ9qVOiyrPMuMy9_189_184.png Просмотреть файл


Двоичные данные
src/img/lALPDgQ9qVOltnrM2MzY_216_216.png Просмотреть файл


+ 11
- 0
src/main.js Просмотреть файл

@@ -7,6 +7,16 @@ import store from './store'
7 7
 import AMap from 'vue-amap'
8 8
 import VueAwesomeSwiper from 'vue-awesome-swiper'
9 9
 import 'swiper/dist/css/swiper.css'
10
+import moment from 'moment/moment'
11
+import vueEventCalendar from 'vue-event-calendar' 
12
+
13
+
14
+
15
+
16
+Vue.filter('moment', function (value, formatString) {
17
+formatString = formatString || 'YYYY/MM/DD';
18
+return moment(value).format(formatString);
19
+});
10 20
 
11 21
 // import './theme'
12 22
 // import './public/style/common.scss'
@@ -15,6 +25,7 @@ import 'swiper/dist/css/swiper.css'
15 25
 Vue.use(Vant)
16 26
 Vue.use(AMap)
17 27
 Vue.use(VueAwesomeSwiper, /* { default global options } */)
28
+Vue.use(vueEventCalendar, {locale: 'en'}) //locale can be 'zh' or 'en'
18 29
 
19 30
 Vue.config.productionTip = false
20 31
 

+ 146
- 60
src/pages/building/buildingdetail.vue Просмотреть файл

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="context" >
2
+  <div class="context" v-if='showPage'>
3 3
     <vue-headful title="楼盘详情页"  />
4 4
     <div class="cityarea">
5 5
         <span class="iconfont icon-Shape1 iconarea"></span>
@@ -13,7 +13,7 @@
13 13
         <span class="iconline"></span>
14 14
         <div class="gotopagetype" @click="gotopagetype"><van-cell  class="clickcharacters" title="查看户型图"/><span class="iconfont icon-youfan right" ></span></div>
15 15
         <span class="iconline"></span>
16
-        <div class="gotopagecollect" @click="collecthouse"><span class="iconfont icon-Star collect"></span><van-cell class="clickcharacters"  title="已收藏"/></div>
16
+        <div class="gotopagecollect" @click="collecthouse(detail.buildingid)" ><span class="iconfont icon-Star collect"></span><van-cell class="clickcharacters"  title="已收藏"/></div>
17 17
     </van-cell-group>
18 18
     <div class="housecenter">
19 19
        <div class="housename">
@@ -31,16 +31,17 @@
31 31
             <span class="housetel"><i class="iconfont  icon-dianhua2 phone"> </i><span ><a :href="'tel:' + detail.salestel">{{detail.salestel}}</a></span></span>
32 32
         </div>
33 33
       </div>
34
-      <hr class="line" />
34
+      <hr class="line" />  
35 35
       <div class="buildingdata">
36 36
         <div class="datacontent">
37
-          <van-swipe class="slidewrapper">
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>
42
-            </van-swipe-item>
43
-          </van-swipe>
37
+          <swiper class="slidewrapper" :options="swiperOption" >
38
+            <swiper-slide class="slideimg" v-for="(page, index) in pages" :key="index" >
39
+              <div class="wrapperdesc" v-for="item in page" :key="item,id">
40
+                <span class="slidedesc" >{{item}}</span>
41
+              </div>     
42
+            </swiper-slide>
43
+            <div class="swiper-pagination"  slot="pagination"></div>
44
+          </swiper>
44 45
         </div>
45 46
       </div>
46 47
     </div>
@@ -58,21 +59,30 @@
58 59
             <span xlass="titlecharacters">周边配套</span>
59 60
         </div>
60 61
         <van-row class="user-links">
61
-          <van-col span="6" @click="perimeterinformation">
62
+          <van-col span="6" >
63
+            <div class="modulearea school" @click="perimeterinformation(school)">
62 64
               <i class="iconfont  icon-icon-test2 icontype"></i>
63 65
               <span class="characters">学校</span>
66
+            </div>
64 67
           </van-col> 
65 68
           <van-col span="6">
66
-            <i class="iconfont icon-icon-test4 icontype"></i>
67
-            <span class="characters">医院</span>
69
+            <div class="modulearea histoptal" @click="perimeterinformation(histoptal)">
70
+              <i class="iconfont icon-icon-test4 icontype"></i>
71
+              <span class="characters">医院</span>
72
+            </div>
68 73
           </van-col>
74
+
69 75
           <van-col span="6">
70
-            <i class="iconfont icon-icon-test1 icontype"></i>
71
-            <span class="characters">交通</span>
76
+            <div class="modulearea taxi" @click="perimeterinformation(taxi)">
77
+              <i class="iconfont icon-icon-test1 icontype"></i>
78
+              <span class="characters">交通</span>
79
+            </div>
72 80
           </van-col>
73 81
           <van-col span="6">
74
-            <i class="iconfont icon-icon-test3 icontype"></i>
75
-            <span class="characters">商业</span>
82
+            <div class="modulearea sround" @click="perimeterinformation(sround)">
83
+              <i class="iconfont icon-icon-test3 icontype"></i>
84
+              <span class="characters">商业</span>
85
+            </div>
76 86
           </van-col>
77 87
         </van-row>
78 88
     </div>
@@ -80,17 +90,20 @@
80 90
       <div class="dynamicstitle">
81 91
       <span class="titlecharacters">相关动态</span>
82 92
     </div>
83
-    <van-collapse v-model="activeName" accordion>
84
-      <van-collapse-item v-for="(list, index) in detail.buildingDynamicLst" :key="index">
85
-        <div slot="title">
93
+    <van-collapse v-model="activeName"  accordion >
94
+      <div v-for="list in detail.buildingDynamicLst" :key="list.id" @click="addvistornum(list)">
95
+         <van-collapse-item  >
96
+        <div slot="title"  >
86 97
           <span class="dynamictitle">{{list.title}}</span>
87 98
           <div class="peopletimer">
88 99
             <span class="people">{{list.browsingnum}}人看过</span>
89
-            <span class="timer">{{list.createtime}}</span>
100
+            <span class="timer">{{list.createtime |moment}}</span>
90 101
           </div>
91 102
         </div>
92 103
         <span class="dynamiccontent" v-html="list.dynamicinfo"></span>
93 104
       </van-collapse-item>
105
+      </div>
106
+     
94 107
     </van-collapse>
95 108
   </div>
96 109
     <div class="btn">
@@ -100,55 +113,89 @@
100 113
 </template>
101 114
 
102 115
 <script>
103
-import { mapState, mapActions } from "vuex";
104
-import BuildingPerimeter from "./components/buildingperimeter.vue";
116
+import { createNamespacedHelpers } from "vuex";
117
+const {mapState: mapbuildState, mapActions:mapbuildActions} = createNamespacedHelpers('building')
118
+const {mapState: mapcollectState, mapActions:mapcollectActions} = createNamespacedHelpers('collect')
119
+const {mapState: mapdelectState, mapActions:mapdelectActions} = createNamespacedHelpers('delete')
120
+const {mapState: mapvisitState, mapActions:mapvisitActions} = createNamespacedHelpers('visitors')
105 121
 
106 122
 export default {
107 123
   name: "BuildingDetail",
108 124
   data() {
109 125
     return {
110
-      activeName: ""
126
+      showPage:false,
127
+      activeName: "",
128
+      collect:'',
129
+      id:'',
130
+      isopen:false,
131
+      swiperOption: {
132
+          pagination: {
133
+            el: '.swiper-pagination'
134
+          }
135
+        },
111 136
     };
112 137
   },
113 138
   components: {
114 139
     "vue-headful": () => import("vue-headful"),
115
-    BuildingPerimeter: BuildingPerimeter
140
+
116 141
   },
142
+ 
117 143
   computed: {
118
-    ...mapState({
119
-      detail: s => s.building.detail
120
-      // buildingDatas:s => building.buildingDatas
144
+    ...mapbuildState({
145
+      detail: s => s.detail
121 146
     }),
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
-    // }
147
+    ...mapcollectState({
148
+      collcet:s=>s.collcet,
149
+      buildingid:s=>s.buildingid
150
+    }),
151
+     ...mapdelectState({
152
+      collcet:s=>s.collcet,
153
+      buildingid:s=>s.buildingid
154
+    }),
155
+    ...mapvisitState({
156
+      browsingnum: s => s.browsingnum
157
+    }),
158
+
159
+    pages () {
160
+     window.console.log(1)
161
+      const pages = []
162
+      this.detail.buildingDatas.forEach((item, index) =>{
163
+        const page =Math.floor(index / 7)
164
+        if(!pages[page]){
165
+          pages[page]=[]
166
+        }
167
+        pages[page].push(item)
168
+      })
169
+      return pages
170
+      }
133 171
    
134 172
   },
135 173
   created() {
136
-    this.getBuilding({ project_id: "1" });
174
+    this.getBuilding({ project_id: "1" }).then( ()=>{
175
+        this.showPage = true
176
+    });
137 177
   },
138 178
   methods: {
139
-    ...mapActions(["getBuilding"]),
179
+    ...mapbuildActions(["getBuilding"]),
180
+    ...mapcollectActions(['getAddCollect']),
181
+    ...mapvisitActions(['postVisitors']),
182
+    ...mapdelectActions(['getDeleteCollect']),
183
+    ...mapbuildActions(['numadd']),
184
+    //跳转到预约看房页面
140 185
     gotoLookHouse () {
141 186
       this.$router.push({ 
142 187
         name: "lookhouse",
143 188
         query: { id: this.detail.buildingid }
144 189
          });
145 190
     },
191
+    //跳转到楼盘相册
146 192
     gotopageimg () {
147 193
       this.$router.push({
148 194
         name: "buildingimage",
149 195
         query: { id: this.detail.buildingid }
150 196
       });
151 197
     },
198
+    //跳转到户型页
152 199
     gotopagetype () {
153 200
       this.$router.push({ 
154 201
         name: "buildingtype",
@@ -156,15 +203,44 @@ export default {
156 203
           id: this.detail.buildingid }
157 204
       });
158 205
     },
159
-    collecthouse () {
160
-      
206
+    //收藏信息
207
+    collecthouse (buildingid) {
208
+      this.$router.push ({ query: {  id: this.detail.buildingid, collect:this.detail.collect} })
209
+      if(this.detail.collect==0){
210
+        //未收藏,添加收藏
211
+        this.getAddCollect({
212
+        buildingid: this.$route.query.id,
213
+        collect :this.$route.query.collect})
214
+      }else{
215
+        //已收藏,删除收藏
216
+        this.getDeleteCollect({
217
+        buildingid: this.$route.query.id,
218
+        collect :this.$route.query.collect})
219
+      }
220
+      window.console.log(buildingid)
221
+      },
222
+      //浏览人数
223
+      addvistornum(element){
224
+      window.console.log(333)
225
+      let self = this;
226
+      if(!this.isopen){
227
+        this.postVisitors({
228
+            id: element.id,
229
+            browsingnu:element.browsingnum+1,
230
+          }).then(()=>{
231
+            self.numadd({id:element.id});
232
+          });
233
+      }
234
+       this.isopen = !this.isopen; 
161 235
       },
162 236
 
237
+//周边配套信息
163 238
     perimeterinformation () {
164 239
        this.$router.push({ 
165
-        name: "Map",
166
-        // query: { id: this.detail.buildingid }
240
+        name: "perimetertype",
241
+        query: { id: this.detail.buildingid }
167 242
       });
243
+      window.console.log(111)
168 244
     }
169 245
   }
170 246
 };
@@ -372,23 +448,27 @@ export default {
372 448
           height: 100%;
373 449
 
374 450
           .slideimg {
375
-            width: 100%;
451
+            width: 90%;
376 452
             height: 100%;
377 453
             display: flex;
378 454
             flex-direction: column;
379 455
             align-items: center;
380 456
 
381
-            .slidedesc {
382
-              padding: 10px 0;
383
-              font-size: 12px;
384
-              font-family: PingFangSC-Regular;
385
-              font-weight: 400;
386
-              color: rgba(128, 128, 128, 1);
387
-              line-height: 17px;
457
+            .wrapperdesc{
458
+              width:94%;
459
+              height: 15px;
388 460
               overflow: hidden;
389 461
               text-overflow: ellipsis;
390 462
               white-space: nowrap;
391
-              width: 96%;
463
+              padding: 5px 0;
464
+
465
+              .slidedesc {
466
+                font-size: 12px;
467
+                font-family: PingFangSC-Regular;
468
+                font-weight: 400;
469
+                color: rgba(128, 128, 128, 1);
470
+                line-height: 17px;
471
+              }
392 472
             }
393 473
           }
394 474
         }
@@ -520,21 +600,27 @@ export default {
520 600
         height: 80px;
521 601
         display: flex;
522 602
         
523
-        .icontype{
524
-            font-size: 16px!important;
525
-            color:#BABDC0!important;
526
-        }
527
-        
528 603
         .linevertical{
529 604
         border:1px solid #EDEDED;
530 605
         }
531 606
 
532 607
         .van-col--6{
608
+          border-right: 0.5px solid #EDEDED;
533 609
           display: flex;
534 610
           flex-direction: column;
535 611
           align-items: center;
536 612
           justify-content: center;
537
-          border-right: 0.5px solid #EDEDED;
613
+
614
+          .modulearea{
615
+            display: flex;
616
+            flex-direction: column;
617
+            align-items: center;
618
+
619
+            .icontype{
620
+              font-size: 16px!important;
621
+              color:#BABDC0!important;
622
+            }
623
+          }
538 624
         }
539 625
 
540 626
         .characters{

+ 133
- 69
src/pages/building/buildingimage.vue Просмотреть файл

@@ -1,83 +1,142 @@
1 1
 <template>
2
-    <div class="imgbackground">
3
-       <vue-headful title="楼盘相册"  />
4
-       <div class="houseimagecontent">
5
-           <div class="houseimage">
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>
63
-           </div>
64
-       </div>
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>
68
-           </div>
69
-       </div>
2
+  <div class="imgbackground" v-if='showPage'>
3
+    <vue-headful title="楼盘相册"  />
4
+    <div class="houseimagecontent">
5
+      <div class="houseimage">
6
+        <swiper ref='mySwiper' 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-if='detail.imageLst1==""||detail.imageLst1==null'>
19
+              <img class="lazyimage" :src="bottomDrawing" />
20
+              <div class="houseindex">
21
+                  <span class="imagetype">图片正在采集中...</span>
22
+                  <div class="imageindex">
23
+                      <span class="countimage countindex">1</span>
24
+                      <span class="countimage">/</span>
25
+                      <span class="countimage totalcount">1</span>
26
+                  </div>
27
+              </div>
28
+            </swiper-slide>
29
+            <swiper-slide class="slideimg" v-for="(list2, index2) in detail.imageLst2" :key="index2" >
30
+                <img class="lazyimage" :src="list2.fileurl" />
31
+                <div class="houseindex">
32
+                    <span class="imagetype">{{list2.name}}</span>
33
+                    <div class="imageindex">
34
+                        <span class="countimage countindex">{{index2+1}}</span>
35
+                        <span class="countimage">/</span>
36
+                        <span class="countimage totalcount">{{detail.imageLstCount2}}</span>
37
+                    </div>
38
+                </div>
39
+            </swiper-slide>
40
+              <swiper-slide class="slideimg"  v-if='detail.imageLst2==""||detail.imageLst2==null'>
41
+              <img class="lazyimage" :src="bottomDrawing" />
42
+              <div class="houseindex">
43
+                  <span class="imagetype">图片正在采集中...</span>
44
+                  <div class="imageindex">
45
+                      <span class="countimage countindex">1</span>
46
+                      <span class="countimage">/</span>
47
+                      <span class="countimage totalcount">1</span>
48
+                  </div>
49
+              </div>
50
+            </swiper-slide>
51
+            <swiper-slide class="slideimg" v-for="(list3, index3) in detail.imageLst3" :key="index3" >
52
+                <img class="lazyimage" :src="list3.fileurl" />
53
+                <div class="houseindex">
54
+                    <span class="imagetype">{{list3.name}}</span>
55
+                    <div class="imageindex">
56
+                        <span class="countimage countindex">{{index3+1}}</span>
57
+                        <span class="countimage">/</span>
58
+                        <span class="countimage totalcount">{{detail.imageLstCount3}}</span>
59
+                    </div>
60
+                </div>
61
+            </swiper-slide>
62
+              <swiper-slide class="slideimg"  v-if='detail.imageLst3==""||detail.imageLst3==null'>
63
+              <img class="lazyimage" :src="bottomDrawing" />
64
+              <div class="houseindex">
65
+                  <span class="imagetype">图片正在采集中...</span>
66
+                  <div class="imageindex">
67
+                      <span class="countimage countindex">1</span>
68
+                      <span class="countimage">/</span>
69
+                      <span class="countimage totalcount">1</span>
70
+                  </div>
71
+              </div>
72
+            </swiper-slide>
73
+            <swiper-slide class="slideimg" v-for="(list4, index4) in detail.imageLst4" :key="index4" >
74
+                <img class="lazyimage" :src="list4.fileurl" />
75
+                <div class="houseindex">
76
+                    <span class="imagetype">{{list4.name}}</span>
77
+                    <div class="imageindex">
78
+                        <span class="countimage countindex">{{index4+1}}</span>
79
+                        <span class="countimage">/</span>
80
+                        <span class="countimage totalcount">{{detail.imageLstCount4}}</span>
81
+                    </div>
82
+                </div>
83
+            </swiper-slide>
84
+              <swiper-slide class="slideimg" v-if='detail.imageLst4==""||detail.imageLst4==null' >
85
+              <img class="lazyimage" :src="bottomDrawing" />
86
+              <div class="houseindex">
87
+                  <span class="imagetype">图片正在采集中...</span>
88
+                  <div class="imageindex">
89
+                      <span class="countimage countindex">1</span>
90
+                      <span class="countimage">/</span>
91
+                      <span class="countimage totalcount">1</span>
92
+                  </div>
93
+              </div>
94
+            </swiper-slide>
95
+            <swiper-slide class="slideimg" v-for="(list5, index5) in detail.imageLst5" :key="index5">
96
+                <img class="lazyimage" :src="list5.fileurl" />
97
+                <div class="houseindex">
98
+                    <span class="imagetype">{{list5.name}}</span>
99
+                    <div class="imageindex">
100
+                        <span class="countimage countindex">{{index5+1}}</span>
101
+                        <span class="countimage">/</span>
102
+                        <span class="countimage totalcount">{{detail.imageLstCount5}}</span>
103
+                    </div>
104
+                </div>
105
+            </swiper-slide>
106
+              <swiper-slide class="slideimg"  v-if='detail.imageLst5==""||detail.imageLst5==null'>
107
+              <img class="lazyimage" :src="bottomDrawing" />
108
+              <div class="houseindex">
109
+                  <span class="imagetype">图片正在采集中...</span>
110
+                  <div class="imageindex">
111
+                      <span class="countimage countindex">1</span>
112
+                      <span class="countimage">/</span>
113
+                      <span class="countimage totalcount">1</span>
114
+                  </div>
115
+              </div>
116
+            </swiper-slide>
117
+        </swiper>
118
+      </div>
70 119
     </div>
120
+    <div class="imageboxtype" >
121
+      <div class="drawingimpress" v-for="(list, index) in lists" :key="index"  @click="toggle(index)" :class='{active:list.active}'>
122
+        <span class="boxcharacters" :class='{active:list.active}'>{{list.imagetypename}}</span>
123
+      </div>
124
+    </div>
125
+  </div>
71 126
 </template>
72 127
 
73 128
 <script>
74 129
 import { mapState, mapActions } from "vuex";
130
+import bottomDrawing from '../../img/bottomdrawing.png'
131
+import Swiper from 'swiper'; 
75 132
 
76 133
 export default {
77 134
   name: "BuildingImage",
78 135
   data() {
79 136
     return {
80 137
       lists: [],
138
+      bottomDrawing,
139
+      showPage:false
81 140
     };
82 141
   },
83 142
   components: {
@@ -90,6 +149,7 @@ export default {
90 149
   },
91 150
   created() {
92 151
     this.getBuildingimage({ buildingid: this.$route.query.id }).then(() => {
152
+      this.showPage = true
93 153
       this.lists = this.detail.imageTypeLst;
94 154
       this.lists.forEach((curr, index) => {
95 155
         curr.active = false;
@@ -102,6 +162,7 @@ export default {
102 162
   methods: {
103 163
     ...mapActions(["getBuildingimage"]),
104 164
     toggle(ind) {
165
+      this.swiper().slideTo(ind, 1000, false)
105 166
         let list = []
106 167
         this.lists.forEach((curr, index) => {
107 168
         curr.active = false;
@@ -112,7 +173,10 @@ export default {
112 173
       });
113 174
       this.lists = []
114 175
       this.lists = list
115
-    }
176
+    },
177
+    swiper() {
178
+        return this.$refs.mySwiper.swiper
179
+      }
116 180
   }
117 181
 };
118 182
 </script>

+ 169
- 171
src/pages/building/buildingtype.vue Просмотреть файл

@@ -13,30 +13,31 @@
13 13
                             <span class="countimage totalcount">{{detail.buildingModelLstCount}}</span>
14 14
                         </div>
15 15
                     </div>
16
+                    <div class="typecontent" >
17
+                        <div class="househeader">
18
+                            <div class="headertop">
19
+                                <span class="typetitle">{{ list.name }}</span>
20
+                                <span class="typeprice">{{ list.referenceprice }}<span class="fixedsize">起</span></span>
21
+                            </div>
22
+                            <div class="headerbottom">
23
+                                <div>
24
+                                <span class="typefeature" v-for="(item ,index) in list.childrenfeatures" :key="index">{{ item }}</span>
25
+                                </div>
26
+                                <span class="typearea">建筑面积:{{ list.area }}㎡</span>
27
+                            </div>
28
+                            <div class="housefeature">
29
+                                <span class="bigcharacters">{{ list.situation }}</span>
30
+                                <span class="smallcharacters">
31
+                                    <span class="fixedsmallcharacters">户型描述:</span>
32
+                                    <span class="trendssmallcharacters" v-for="(item, index) in list.modelParsingLst" :key="index">{{ item.detailparsing }}</span>
33
+                                </span>
34
+                            </div>
35
+                        </div>
36
+                    </div>
16 37
                 </swiper-slide>
17 38
             </swiper>
18 39
         </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">{{ item }}</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" v-for="(item, index) in list.modelParsingLst" :key="index">{{ item.detailparsing }}</span>
36
-                    </span>
37
-                </div>
38
-            </div>
39
-        </div>
40
+    
40 41
     </div>
41 42
 </template>
42 43
 
@@ -78,184 +79,181 @@ export default {
78 79
 
79 80
     .typeheader{
80 81
         width:100%;
81
-        height: 262px;
82
+        /* height: 262px; */
82 83
 
83
-    .slidewrapper{
84
-        width: 100%;
85
-        height: 100%;
86
-
87
-        .slideimg{
88
-            width: 100%;
89
-            height: 225px;
90
-        }
91
-        .typeimg{
84
+        .slidewrapper{
92 85
             width: 100%;
93
-            height: 100%;
94
-        }
86
+            /* height: 100%; */
95 87
 
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;
108
-
109
-        .typename{
110
-            font-size:12px;
111
-            font-family:PingFangSC-Regular;
112
-            font-weight:400;
113
-            color:rgba(127,127,127,1);
114
-            line-height:17px;
115
-            padding-left:15px;
116
-        }
88
+            .slideimg{
89
+                width: 100%;
90
+                /* height: 225px; */
91
+                .typeimg{
92
+                    width: 100%;
93
+                    height: 225px;
94
+                }   
117 95
 
118
-        .imageindex{
119
-                padding-right: 15px;
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;
120 108
 
121
-                .countimage{
122
-                    font-size:12px;
123
-                    font-family:PingFangSC-Regular;
124
-                    font-weight:400;
125
-                    color:rgba(127,127,127,1);
126
-                    line-height:17px;
127
-
128
-                    .boxcharacters{
109
+                    .typename{
129 110
                         font-size:12px;
130 111
                         font-family:PingFangSC-Regular;
131 112
                         font-weight:400;
132
-                        color:rgba(255,255,255,1);
113
+                        color:rgba(127,127,127,1);
133 114
                         line-height:17px;
115
+                        padding-left:15px;
134 116
                     }
135
-                }
136
-            }
137
-    }
138
-    }
139
-}
140
-
141
-.typecontent{
142
-    width: 100%;
143
-    background-color: rgba(248,248,248,1);
144
-    margin-top: 10px;
145
-    /* display: flex;
146
-    flex-direction: row;
147
-    justify-content: space-between;
148
-    overflow: hidden; */
149 117
 
150
-    .househeader{
151
-        width:100%;
118
+                    .imageindex{
119
+                        padding-right: 15px;
152 120
 
153
-        .headertop{
154
-            width: 100%;
155
-            display: flex;
156
-            flex-direction: row;
157
-            justify-content: space-between;
158
-            margin-bottom: 10px;
159
-            padding-top: 10px;
121
+                        .countimage{
122
+                            font-size:12px;
123
+                            font-family:PingFangSC-Regular;
124
+                            font-weight:400;
125
+                            color:rgba(127,127,127,1);
126
+                            line-height:17px;
160 127
 
161
-            .typetitle{
162
-                font-size:18px;
163
-                font-family:PingFangSC-Regular;
164
-                font-weight:400;
165
-                color:rgba(61,61,61,1);
166
-                line-height:25px;
167
-                padding-left:20px;
168
-            }
169
-            
170
-            .typeprice{
171
-                display: flex;
172
-                flex-direction: row;
173
-                font-size:16px;
174
-                font-family:PingFangSC-Medium;
175
-                font-weight:500;
176
-                color:rgba(255,84,84,1);
177
-                line-height:22px;
178
-                padding-right: 20px;
179
-
180
-                .fixedsize{
181
-                    font-size:12px;
182
-                    font-family:PingFangSC-Medium;
183
-                    font-weight:500;
184
-                    color:#999999;
185
-                    line-height:22px;
128
+                            .boxcharacters{
129
+                                font-size:12px;
130
+                                font-family:PingFangSC-Regular;
131
+                                font-weight:400;
132
+                                color:rgba(255,255,255,1);
133
+                                line-height:17px;
134
+                            }
135
+                        }
136
+                    }
186 137
                 }
187 138
             }
188
-
189 139
         }
190 140
 
191
-        .headerbottom{
141
+        .typecontent{
192 142
             width: 100%;
193
-            display: flex;
194
-            flex-direction: row;
195
-            justify-content: space-between;
143
+            background-color: rgba(248,248,248,1);
144
+            margin-top: 40px;
196 145
 
197
-            .typefeature{
198
-                background:rgba(247,250,255,1);
199
-                border-radius:2px;
200
-                padding: 4px 5px;
201
-                font-size:12px;
202
-                font-family:PingFangSC-Regular;
203
-                font-weight:400;
204
-                color:rgba(119,165,240,1);
205
-                line-height:17px;
206
-                padding-left:20px;
207
-                margin-right:10px;
208
-            }
146
+            .househeader{
147
+                width:100%;
209 148
 
210
-            .typearea{
211
-                font-size:12px;
212
-                font-family:PingFangSC-Regular;
213
-                font-weight:400;
214
-                color:rgba(97,97,97,1);
215
-                line-height:17px;
216
-                padding-right: 20px;
217
-            }
218
-            
219
-        }
149
+                .headertop{
150
+                    width: 100%;
151
+                    display: flex;
152
+                    flex-direction: row;
153
+                    justify-content: space-between;
154
+                    margin-bottom: 10px;
155
+                    padding-top: 10px;
220 156
 
221
-        .housefeature{
222
-            display: flex;
223
-            flex-direction: column;
224
-        
225
-            .bigcharacters{
226
-                font-size:18px;
227
-                font-family:PingFangSC-Regular;
228
-                font-weight:400;
229
-                color:rgba(61,61,61,1);
230
-                line-height:25px;
231
-                padding:20px 0 0 20px;
232
-            }
157
+                    .typetitle{
158
+                        font-size:18px;
159
+                        font-family:PingFangSC-Regular;
160
+                        font-weight:400;
161
+                        color:rgba(61,61,61,1);
162
+                        line-height:25px;
163
+                        padding-left:20px;
164
+                    }
165
+                    
166
+                    .typeprice{
167
+                        display: flex;
168
+                        flex-direction: row;
169
+                        font-size:16px;
170
+                        font-family:PingFangSC-Medium;
171
+                        font-weight:500;
172
+                        color:rgba(255,84,84,1);
173
+                        line-height:22px;
174
+                        padding-right: 20px;
233 175
 
234
-            .smallcharacters{
235
-                padding: 10px  20px  10px 20px;
236
-                display: flex;
237
-                flex-direction: row;
238
-                justify-content: space-between;
176
+                        .fixedsize{
177
+                            font-size:12px;
178
+                            font-family:PingFangSC-Medium;
179
+                            font-weight:500;
180
+                            color:#999999;
181
+                            line-height:22px;
182
+                        }
183
+                    }
239 184
 
240
-                .fixedsmallcharacters{
241
-                    font-size:14px;
242
-                    font-family:PingFangSC-Regular;
243
-                    font-weight:400;
244
-                    color:rgba(97,97,97,1);
245
-                    line-height:20px;
246
-                    width:46%;
247 185
                 }
248
-                .trendssmallcharacters{
249
-                    font-size:14px;
250
-                    font-family:PingFangSC-Regular;
251
-                    font-weight:400;
252
-                    color:rgba(97,97,97,1);
253
-                    line-height:20px;
186
+
187
+                .headerbottom{
188
+                    width: 100%;
189
+                    display: flex;
190
+                    flex-direction: row;
191
+                    justify-content: space-between;
192
+
193
+                    .typefeature{
194
+                        background:rgba(247,250,255,1);
195
+                        border-radius:2px;
196
+                        padding: 4px 5px;
197
+                        font-size:12px;
198
+                        font-family:PingFangSC-Regular;
199
+                        font-weight:400;
200
+                        color:rgba(119,165,240,1);
201
+                        line-height:17px;
202
+                        padding-left:20px;
203
+                        margin-right:10px;
204
+                    }
205
+
206
+                    .typearea{
207
+                        font-size:12px;
208
+                        font-family:PingFangSC-Regular;
209
+                        font-weight:400;
210
+                        color:rgba(97,97,97,1);
211
+                        line-height:17px;
212
+                        padding-right: 20px;
213
+                    }
214
+                    
215
+                }
216
+
217
+                .housefeature{
218
+                    display: flex;
219
+                    flex-direction: column;
220
+                
221
+                    .bigcharacters{
222
+                        font-size:18px;
223
+                        font-family:PingFangSC-Regular;
224
+                        font-weight:400;
225
+                        color:rgba(61,61,61,1);
226
+                        line-height:25px;
227
+                        padding:20px 0 0 20px;
228
+                    }
229
+
230
+                    .smallcharacters{
231
+                        padding: 10px  20px  10px 20px;
232
+                        display: flex;
233
+                        flex-direction: row;
234
+                        justify-content: space-between;
235
+
236
+                        .fixedsmallcharacters{
237
+                            font-size:14px;
238
+                            font-family:PingFangSC-Regular;
239
+                            font-weight:400;
240
+                            color:rgba(97,97,97,1);
241
+                            line-height:20px;
242
+                            width:46%;
243
+                        }
244
+                        .trendssmallcharacters{
245
+                            font-size:14px;
246
+                            font-family:PingFangSC-Regular;
247
+                            font-weight:400;
248
+                            color:rgba(97,97,97,1);
249
+                            line-height:20px;
250
+                        }
251
+                    }
254 252
                 }
255 253
             }
256 254
         }
257 255
     }
258
-}
256
+        
259 257
 
260 258
 }
261 259
 </style>

src/pages/building/typemap.vue → src/pages/building/perimetertype.vue Просмотреть файл

@@ -26,10 +26,9 @@
26 26
 </template>
27 27
 
28 28
 <script>
29
-// import {lazyAmapApiLoaderInstanse} from 'vue-amap';
30
-//  var map
29
+import {lazyAmapApiLoaderInstanse} from 'vue-amap';
31 30
 export default {
32
-  name:'Map',
31
+  name:'perimetertype',
33 32
   components: {
34 33
     'vue-headful': () => import('vue-headful'),
35 34
   },
@@ -38,13 +37,13 @@ export default {
38 37
     
39 38
         }
40 39
     },
41
-//   mounted() {
42
-//     this.map = new AMap.Map('mapcointainer', {
43
-//         resizeEnable:true,
44
-//         zoom:11,
45
-//         center:[118.915671,32.075366]
46
-//     })
47
-//    }
40
+  mounted() {
41
+    this.map = new AMap.Map('mapcointainer', {
42
+        resizeEnable:true,
43
+        zoom:11,
44
+        center:[118.915671,32.075366]
45
+    })
46
+   }
48 47
 }
49 48
 </script>
50 49
 

+ 127
- 65
src/pages/reservation/lookhouse.vue Просмотреть файл

@@ -1,15 +1,14 @@
1 1
 <template>
2
-  <div class="appoint-form" >
2
+  <div class="appoint-form" v-if='showPage' >
3 3
     <vue-headful title="预约看房信息填写"  />
4 4
     <div class="title"><h1>预约看房</h1>
5 5
         <van-cell-group>
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(detail.buildingList)">楼盘名称:<span class="buildingnamelist">{{detail.buildingName}}</span>
7 7
               <van-popup v-model="inside" position="bottom" :overlay="false">
8 8
                 <ul class="housenamelist">
9
-                  <li class="namelist" 
9
+                  <li @click.stop class="namelist" 
10 10
                     v-for="list in namelist.buildingList"
11 11
                     :key="list.buildingid"   
12
-                    :class="{'active':list.buildingname.show===true}" 
13 12
                     @click="clicknamelist(list.buildingid)">
14 13
                     <span class="namelist">{{list.buildingname}}</span>
15 14
                   </li>
@@ -18,9 +17,9 @@
18 17
           </van-cell>
19 18
           <van-cell class="field_name">楼盘地址:<span class="buildingaddress">{{detail.buildingAddress}}</span></van-cell>
20 19
           <van-switch-cell size="20px" v-model="checked" title="马上去"  @change="onChange" />
21
-          <van-field class="field_name" @click="showDatePicker()" label="预约时间:"  v-model="datetime"/>
20
+          <van-field class="field_name" @click="showDatePicker()" label="预约时间:"  v-model="formdata.booktime"  />
22 21
           <van-popup v-model="show" position="bottom" :overlay="true">
23
-            <van-datetime-picker v-model="currentDate" type="datetime" :formatter="formatter" @cancel="cancel" @confirm="confirm"/>
22
+            <van-datetime-picker v-model="currentDate" :formatter="formatter" type="datetime"  @cancel="cancel" @confirm="confirm"/>
24 23
           </van-popup>
25 24
           <van-field class="field_name" v-model="formdata.telnum" label="手机号码:" />
26 25
           <van-field class="field_name"  v-model="formdata.personcnt" label="看房人数:"/> 
@@ -41,15 +40,26 @@
41 40
 
42 41
 <script>
43 42
 import { createNamespacedHelpers } from "vuex";
44
-const {mapState: maploocState, mapActions:maploocActions} = createNamespacedHelpers('lookhouse')
45
-const {mapState: mapnameState, mapActions:mapnameActions} = createNamespacedHelpers('housenamelist')
46
-const {mapState: maphouseState, mapActions:maphouseActions} = createNamespacedHelpers('typelist')
47
-const {mapState: mapsaveState, mapActions:mapsaveActions} = createNamespacedHelpers('order')
48
-
43
+const {
44
+  mapState: maploocState,
45
+  mapActions: maploocActions
46
+} = createNamespacedHelpers("lookhouse");
47
+const {
48
+  mapState: mapnameState,
49
+  mapActions: mapnameActions
50
+} = createNamespacedHelpers("housenamelist");
51
+const {
52
+  mapState: maphouseState,
53
+  mapActions: maphouseActions
54
+} = createNamespacedHelpers("typelist");
55
+const {
56
+  mapState: mapsaveState,
57
+  mapActions: mapsaveActions
58
+} = createNamespacedHelpers("order");
49 59
 
50 60
 export default {
51 61
   components: {
52
-    "vue-headful": () => import("vue-headful"),
62
+    "vue-headful": () => import("vue-headful")
53 63
   },
54 64
   data() {
55 65
     return {
@@ -57,21 +67,45 @@ export default {
57 67
       inside: false,
58 68
       show: false,
59 69
       currentDate: new Date(),
60
-      showPage:false,
61
-      buildingname:'',
62
-      datetime:'',
70
+      showPage: false,
71
+      buildingname: "",
72
+      booktime: "",
73
+      buildingid: "",
63 74
       formdata: {
64
-        remark:'',
65
-        telnum:'',
66
-        personcnt:'',
75
+        remark: "",
76
+        telnum: "",
77
+        personcnt: "",
78
+        booktime: ""
79
+        // buildingname:'',
80
+        // buildingid:'',
81
+        // booktime:'',
67 82
       }
68 83
     };
69 84
   },
85
+
86
+  filters: {
87
+    formatDate(value) {
88
+      let date = new Date(value);
89
+      let y = date.getFullYear();
90
+      let MM = date.getMonth() + 1;
91
+      MM = MM < 10 ? "0" + MM : MM;
92
+      let d = date.getDate();
93
+      d = d < 10 ? "0" + d : d;
94
+      let h = date.getHours();
95
+      h = h < 10 ? "0" + h : h;
96
+      let m = date.getMinutes();
97
+      m = m < 10 ? "0" + m : m;
98
+      let s = date.getSeconds();
99
+      s = s < 10 ? "0" + s : s;
100
+      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
101
+    }
102
+  },
103
+
70 104
   computed: {
71
-    desc (){
72
-      return this.desc.length
105
+    desc() {
106
+      return this.desc.length;
73 107
     },
74
-     ...maploocState({
108
+    ...maploocState({
75 109
       detail: s => s.detail
76 110
     }),
77 111
     ...mapnameState({
@@ -80,70 +114,98 @@ export default {
80 114
     ...maphouseState({
81 115
       houselist: s => s.houselist
82 116
     }),
83
-     ...mapsaveState({
117
+    ...mapsaveState({
84 118
       saveinformation: s => s.saveinformation
85 119
     })
86 120
   },
87 121
   created() {
88
-    this.getLookHouse({  
89
-    project_id: "1",
90
-    buildingid: this.$route.query.id
122
+    this.getLookHouse({
123
+      project_id: "1"
91 124
     }).then(() => {
92
-      this.showPage = true
125
+      this.showPage = true;
93 126
     });
94
-    window.console.log(this.$route.query.id)
95 127
   },
96 128
   methods: {
129
+    //调用时间插件
97 130
     showDatePicker() {
98
-      this.show = true;
131
+      if (!this.checked) {
132
+        this.show = true;
133
+      }
99 134
     },
100 135
     onChange() {
101
-      this.$dialog.alert({
102
-        message: '使用马上去功能,我们将以短信形式发送楼盘地址给您,您可以选择使用滴滴、美团打车、或乘坐出租车等方式到达售楼中心,联系置业顾问后即可报销车票!   部分售楼处可能通过发放礼品等形式抵扣车费,也可能此售楼处报销车费活动已经结束,具体解释权归售楼处所有,可提前通过上方电话咨询。'
103
-        })
136
+      //this.formdata.booktime = new Date();
137
+      if (this.checked) {
138
+        this.$dialog.alert({
139
+          message:
140
+            "使用马上去功能,我们将以短信形式发送楼盘地址给您,您可以选择使用滴滴、美团打车、或乘坐出租车等方式到达售楼中心,联系置业顾问后即可报销车票!   部分售楼处可能通过发放礼品等形式抵扣车费,也可能此售楼处报销车费活动已经结束,具体解释权归售楼处所有,可提前通过上方电话咨询。"
141
+        });
142
+      }
104 143
     },
105
-
106
-  cancel () {
107
-    this.show=false
108
-  },
109
-  formatter(type, value) {
110
-      if (type === 'year') {
144
+    //点击取消按钮实现收起日历
145
+    cancel() {
146
+      this.show = false;
147
+    },
148
+    formatter(type, value) {
149
+      if (type === "year") {
111 150
         return `${value}年`;
112
-      } else if (type === 'month') {
113
-        return `${value}月`
151
+      } else if (type === "month") {
152
+        return `${value}月`;
114 153
       }
115 154
       return value;
116 155
     },
117
-    confirm (val){  
118
-      // this.msg=val;
119
-      window.console.log(val)
120
-      this.show=false;//点击确认后,show=false,组件隐藏掉,值已经传过去了
156
+    //点击确定按钮选中时间并收起日历
157
+    confirm(val) {
158
+      this.formdata.booktime = val;
159
+      window.console.log(val);
160
+      this.show = false; //点击确认后,show=false,组件隐藏掉,值已经传过去了
121 161
     },
122
-
123
-    showName (){
124
-      window.console.log()
162
+    //点击楼盘名称栏获取楼盘名称列表
163
+    showName(buildingid) {
125 164
       this.inside = true;
126
-      this.getHouseNameList({ 
127
-        project_id: "1" ,
128
-        // id:this.$route.params.id ,
129
-        })      
165
+      this.$router.push({
166
+        query: {
167
+          project_id: 1,
168
+          id: this.detail.buildingid
169
+        }
170
+      });
171
+      this.getHouseNameList({
172
+        project_id: "1",
173
+        buildingid: this.$route.query.id
174
+      });
175
+    },
176
+    //点击楼盘名称列表获取楼盘id
177
+    clicknamelist(buildingid) {
178
+      /* this.$router.push({ 
179
+        query: { id:buildingid}
180
+         });*/
181
+      this.getTypeList({
182
+        buildingid: buildingid /*this.$route.query.id,*/
183
+      }).then(() => {
184
+        this.inside = false;
185
+      });
186
+      return false;
187
+      window.console.log(buildingid);
130 188
     },
131
-    clicknamelist (buildingid){
132
-      this.getTypeList({ 
133
-        // project_id: "1",
134
-       id: this.namelist.buildingid 
135
-         })
136
-         window.console.log(buildingid)
137
-      
189
+    //填写完整后提交信息
190
+    submit() {
191
+      let reg = /^1[0-9]{10}$/;
192
+      if (!this.formdata.booktime&&!this.checked) {
193
+        this.$toast("请填写时间");
194
+        return;
195
+      } else if (!this.formdata.telnum) {
196
+        this.$toast("请先填写手机号");
197
+        return;
198
+      } else if (!reg.test(this.formdata.telnum)) {
199
+        this.$toast("请填写正确的手机号");
200
+        return;
201
+      }
202
+      const params = this.checked?{ ...this.formdata, buildingid: this.detail.buildingid,booktime:new Date()}:{ ...this.formdata, buildingid: this.detail.buildingid}
203
+      this.postOrder(params);
138 204
     },
139
-    submit () {
140
-      this.postOrder(this.formdata)
141
-     },
142
-     ...maploocActions(["getLookHouse"]),
143
-     ...mapnameActions(['getHouseNameList']),
144
-     ...maphouseActions(['getTypeList']),
145
-     ...mapsaveActions(['postOrder']),
146
-    
205
+    ...maploocActions(["getLookHouse"]),
206
+    ...mapnameActions(["getHouseNameList"]),
207
+    ...maphouseActions(["getTypeList"]),
208
+    ...mapsaveActions(["postOrder"])
147 209
   }
148 210
 };
149 211
 </script>

+ 4
- 4
src/router/routes.js Просмотреть файл

@@ -5,7 +5,7 @@ import BuildingDetail from '../pages/building/buildingdetail.vue'
5 5
 import LookHouse from '../pages/reservation/lookhouse.vue'
6 6
 import BuildingImage from '../pages/building/buildingimage.vue'
7 7
 import BuildingType from '../pages/building/buildingtype.vue'
8
-import Map from '../pages/building/typemap.vue'
8
+import PerimeterType from '../pages/building/perimetertype.vue'
9 9
 
10 10
 export default [
11 11
   {
@@ -43,9 +43,9 @@ export default [
43 43
         component: BuildingType
44 44
       },
45 45
       {
46
-        path: 'Map',
47
-        name: 'Map',
48
-        component: Map
46
+        path: 'perimetertype',
47
+        name: 'perimetertype',
48
+        component: PerimeterType
49 49
       }
50 50
     ]
51 51
   },

+ 13
- 1
src/store/building.js Просмотреть файл

@@ -2,18 +2,27 @@ import request from '../utils/request'
2 2
 import getAPI from '../config/apis'
3 3
 
4 4
 export default {
5
+  namespaced: true,
5 6
     state: {
6 7
       detail: {},
7 8
       // buildingDate:[]
8 9
     },
9 10
     mutations: {
10 11
       updateBuilding(state, detail) {
11
-        state.detail = detail
12
+        state.detail = detail;
12 13
         // state.buildingDate=buildingDate
14
+      },
15
+      numadd(state,params){
16
+       state.detail.buildingDynamicLst.forEach(element => {
17
+          if(element.id==params.id){
18
+            element.browsingnum++;
19
+          }
20
+        });
13 21
       }
14 22
     },
15 23
     actions: {
16 24
       getBuilding({ commit }, params) {
25
+        window.console.log(888)
17 26
         return new Promise((resolve, reject) => {
18 27
           request({ ...getAPI('building.getbuilding', { project_id: params.project_id }) }).then((data) => {
19 28
             commit('updateBuilding', data)
@@ -21,5 +30,8 @@ export default {
21 30
           }).catch(reject)
22 31
         });
23 32
       },
33
+      numadd({commit},params){
34
+        commit('numadd', params)
35
+      }
24 36
     }
25 37
   }

+ 2
- 1
src/store/buildingimage.js Просмотреть файл

@@ -3,7 +3,8 @@ import getAPI from '../config/apis'
3 3
 
4 4
 export default {
5 5
     state: {
6
-      detail: {},
6
+      detail: {}
7
+
7 8
     },
8 9
     mutations: {
9 10
         updateBuildingImage(state, detail) {

src/store/addcollect.js → src/store/collect.js Просмотреть файл

@@ -2,18 +2,22 @@ import request from '../utils/request'
2 2
 import getAPI from '../config/apis'
3 3
 
4 4
 export default {
5
+    namespaced: true,
5 6
     state: {
6
-      detail: {},
7
+      collect: '',
8
+      buildingid :'',
7 9
     },
8 10
     mutations: {
9
-      updateAddCollect(state, detail) {
10
-        state.detail = detail
11
+      updateAddCollect(state, collect,buildingid) {
12
+        state.collect = collect
13
+        state.buildingid = buildingid
11 14
       }
12 15
     },
13 16
     actions: {
14 17
       getAddCollect({ commit }, params) {
18
+        window.console.log(222)
15 19
         return new Promise((resolve, reject) => {
16
-          request({ ...getAPI('addcollect.collectbuilding', { buildingid: params.buildingid }) }).then((data) => {
20
+          request({ ...getAPI('collect.addcollect', {buildingid: params.buildingid ,data: params }) }).then((data) => {
17 21
             commit('updateAddCollect', data)
18 22
             resolve()            
19 23
           }).catch(reject)

+ 27
- 0
src/store/delete.js Просмотреть файл

@@ -0,0 +1,27 @@
1
+import request from '../utils/request'
2
+import getAPI from '../config/apis'
3
+
4
+export default {
5
+    namespaced: true,
6
+    state: {
7
+      collect: '',
8
+      buildingid :'',
9
+    },
10
+    mutations: {
11
+      updateDeleteCollect(state, collect,buildingid) {
12
+        state.collect = collect
13
+        state.buildingid = buildingid
14
+      }
15
+    },
16
+    actions: {
17
+        getDeleteCollect({ commit }, params) {
18
+        window.console.log(222)
19
+        return new Promise((resolve, reject) => {
20
+          request({ ...getAPI('deletecollect.delete', {buildingid: params.buildingid ,data: params }) }).then((data) => {
21
+            commit('updateDeleteCollect', data)
22
+            resolve()            
23
+          }).catch(reject)
24
+        });
25
+      },
26
+    }
27
+  }

+ 1
- 0
src/store/housenamelist.js Просмотреть файл

@@ -13,6 +13,7 @@ export default {
13 13
     },
14 14
     actions: {
15 15
       getHouseNameList({ commit }, params) {
16
+        window.console.log(444)
16 17
         return new Promise((resolve, reject) => {
17 18
           request({ ...getAPI('housenamelist.getnamelist', { project_id: params.project_id }) }).then((data) => {
18 19
             commit('updateHouseNameList', data)

+ 3
- 1
src/store/index.js Просмотреть файл

@@ -10,12 +10,14 @@ const store = new Vuex.Store({
10 10
     building: require('./building.js').default,
11 11
     buildingimage: require('./buildingimage.js').default,
12 12
     buildingtype: require('./buildingtype.js').default,
13
-    addcollect: require('./addcollect.js').default,
13
+    collect: require('./collect.js').default,
14
+    delete: require('./delete.js').default,
14 15
     map: require('./map.js').default,
15 16
     lookhouse: require('./lookhouse.js').default,
16 17
     housenamelist: require('./housenamelist.js').default,
17 18
     typelist: require('./typelist.js').default,
18 19
     order: require('./order.js').default,
20
+    visitors: require('./visitors.js').default,
19 21
     
20 22
   }
21 23
 });

+ 10
- 2
src/store/lookhouse.js Просмотреть файл

@@ -8,18 +8,26 @@ export default {
8 8
     },
9 9
     mutations: {
10 10
         updateLookHouse(state, detail) {
11
-        state.detail = detail
11
+        state.detail = detail;
12
+      },
13
+      updateLookHouseList(state, detail) {
14
+        state.detail = {...detail,buildingName:detail.name,buildingAddress: detail.buildingaddress};
15
+       // state.detail.buildingName = detail.name;
16
+        //state.detail.buildingAddress = detail.buildingaddress
12 17
       }
13 18
     },
14 19
     actions: {
15 20
       getLookHouse({ commit }, params) {
16 21
           window.console.log(111)
17 22
         return new Promise((resolve, reject) => {
18
-          request({ ...getAPI('lookhouse.subscribeinformation', { project_id: params.project_id }) }).then((data) => {
23
+          request({ ...getAPI('lookhouse.subscribeinformation', { project_id: params.project_id}) }).then((data) => {
19 24
             commit('updateLookHouse', data)
20 25
             resolve()            
21 26
           }).catch(reject)
22 27
         });
23 28
       },
29
+      updateData({ commit }, params) {
30
+        commit('updateLookHouseList', params);
31
+      }
24 32
     }
25 33
   }

+ 6
- 3
src/store/typelist.js Просмотреть файл

@@ -12,10 +12,13 @@ export default {
12 12
       }
13 13
     },
14 14
     actions: {
15
-      getTypeList({ commit }, params) {
15
+      getTypeList({ commit,dispatch}, params) {
16
+        window.console.log(777)
16 17
         return new Promise((resolve, reject) => {
17
-          request({ ...getAPI('typelist.gettypelist', { buildingid: params.buildingid }) }).then((data) => {
18
-            commit('updateTypeList', data)
18
+          request({ ...getAPI('typelist.gettypelist', { buildingid: params.buildingid,data: params  }) }).then((data) => {
19
+           
20
+            commit('updateTypeList', data);
21
+            dispatch('lookhouse/updateData',data.buildingInfo, {root: true});
19 22
             resolve()            
20 23
           }).catch(reject)
21 24
         });

+ 7
- 6
src/store/visitors.js Просмотреть файл

@@ -4,18 +4,19 @@ import getAPI from '../config/apis'
4 4
 export default {
5 5
     namespaced: true,
6 6
     state: {
7
-      vistorsnum: '',
7
+      browsingnum: '',
8 8
     },
9 9
     mutations: {
10
-      updateTypeList(state, vistorsnum) {
11
-        state.vistorsnum = vistorsnum
10
+      updateVisitors(state, browsingnum) {
11
+        state.browsingnum = browsingnum
12 12
       }
13 13
     },
14 14
     actions: {
15
-      postvistor({ commit }, params) {
15
+      postVisitors({ commit }, params) {
16
+        window.console.log(0)
16 17
         return new Promise((resolve, reject) => {
17
-          request({ ...getAPI('vistors.gettypelist', { buildingid: params.buildingid }) }).then((data) => {
18
-            commit('updateVistors', data)
18
+          request({ ...getAPI('visitors.add', { id:params.id, data:params}) }).then((data) => {
19
+            commit('updateVisitors', data)
19 20
             resolve()            
20 21
           }).catch(reject)
21 22
         });