陈冉 6 years ago
parent
commit
c244308ac6

+ 1
- 1
public/index.html View File

@@ -6,7 +6,7 @@
6 6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8 8
     <link rel="stylesheet" href="//at.alicdn.com/t/font_666494_3y8olbksjs5.css"/>
9
-    <!-- <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=c76c4e9a861fe1f715c48d893d07116b"></script> -->
9
+    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.1&key=73df496773bd9a021d44d32d6e272fb5"></script>
10 10
     <title>study</title>
11 11
   </head>
12 12
   <body>

src/pages/building/components/buildingdetailheader.vue → src/component/buildingdetailheader.vue View File

@@ -1,23 +1,23 @@
1
-<template>
2
-    <div class="headerbigimg">
3
-    <img class="bigimg" src=""/>
4
-    </div>
5
-</template>
6
-
7
-<script>
8
-export default {
9
-  name:'buildingdetail',
10
-}
11
-</script>
12
-
13
-<style lang="postcss" scoped>
14
-.headerbigimg{
15
-  width: 100%;
16
-  height: 211px;
17
-  & .bigimg{
18
-    width: 100%;
19
-  }
20
-}
21
-</style>
22
-
23
-
1
+<template>
2
+    <div class="headerbigimg">
3
+    <img class="bigimg" src=""/>
4
+    </div>
5
+</template>
6
+
7
+<script>
8
+export default {
9
+  name:'buildingdetail',
10
+}
11
+</script>
12
+
13
+<style lang="postcss" scoped>
14
+.headerbigimg{
15
+  width: 100%;
16
+  height: 211px;
17
+  & .bigimg{
18
+    width: 100%;
19
+  }
20
+}
21
+</style>
22
+
23
+

src/pages/building/components/cityarea.vue → src/component/cityarea.vue View File

@@ -1,44 +1,44 @@
1
-<template>
2
-    <div class="cityarea">
3
-        <span class="iconfont icon-Shape1 iconarea"></span>
4
-        <span class="areaname">浦口区</span>
5
-    </div>
6
-</template>
7
-
8
-<script>
9
-export default {
10
-    name:'CityArea',
11
-}
12
-</script>
13
-
14
-<style lang="postcss" scoped>
15
-.cityarea{
16
-    width:72px;
17
-    height:27px;
18
-    background:rgba(0,0,0,0.39);
19
-    padding: 0 0 0 5px;
20
-    border-radius:0px 0px 25px 0px;
21
-    position: fixed;
22
-    top: 0;
23
-    left: 0;
24
-    display: flex;
25
-    flex-direction: row;
26
-    align-items: center;
27
-
28
-    .iconarea{
29
-        font-size: 10px !important;
30
-        color:rgba(255,255,255,1) !important;
31
-        padding-right:5px;
32
-    }
33
-
34
-    .areaname{
35
-        font-size:12px;
36
-        font-family:PingFangSC-Regular;
37
-        font-weight:400;
38
-        color:rgba(255,255,255,1);
39
-        line-height:17px;
40
-    }
41
-}
42
-</style>
43
-
44
-
1
+<template>
2
+    <div class="cityarea">
3
+        <span class="iconfont icon-Shape1 iconarea"></span>
4
+        <span class="areaname">浦口区</span>
5
+    </div>
6
+</template>
7
+
8
+<script>
9
+export default {
10
+    name:'CityArea',
11
+}
12
+</script>
13
+
14
+<style lang="postcss" scoped>
15
+.cityarea{
16
+    width:72px;
17
+    height:27px;
18
+    background:rgba(0,0,0,0.39);
19
+    padding: 0 0 0 5px;
20
+    border-radius:0px 0px 25px 0px;
21
+    position: fixed;
22
+    top: 0;
23
+    left: 0;
24
+    display: flex;
25
+    flex-direction: row;
26
+    align-items: center;
27
+
28
+    .iconarea{
29
+        font-size: 10px !important;
30
+        color:rgba(255,255,255,1) !important;
31
+        padding-right:5px;
32
+    }
33
+
34
+    .areaname{
35
+        font-size:12px;
36
+        font-family:PingFangSC-Regular;
37
+        font-weight:400;
38
+        color:rgba(255,255,255,1);
39
+        line-height:17px;
40
+    }
41
+}
42
+</style>
43
+
44
+

+ 2
- 2
src/config/apis.js View File

@@ -7,7 +7,7 @@ const apiList = {
7 7
   },
8 8
   building:{
9 9
     get:{
10
-      url: '/api/lp/buildingBaseInfo',
10
+      url: '/api/lp/buildingBaseInfo/:project_id',
11 11
       method: 'get',
12 12
     },
13 13
   },
@@ -31,7 +31,7 @@ export default function getAPI(api, params) {
31 31
     return apiList;
32 32
   }
33 33
 
34
-  const theAPI = get(api)
34
+  const theAPI = get(apiList, api)
35 35
   if (!params) {
36 36
     return theAPI;
37 37
   }

+ 3
- 1
src/main.js View File

@@ -4,12 +4,14 @@ import 'vant/lib/vant-css/index.css'
4 4
 import App from './App.vue'
5 5
 import router from './router'
6 6
 import store from './store'
7
+import AMap from 'vue-amap'
8
+
7 9
 // import './theme'
8 10
 // import './public/style/common.scss'
9 11
 // import AMap  from 'vue-amap'
10 12
 
11 13
 Vue.use(Vant)
12
-// Vue.use(AMap)
14
+Vue.use(AMap)
13 15
 
14 16
 Vue.config.productionTip = false
15 17
 

+ 6
- 4
src/pages/building/buildingdetail.vue View File

@@ -8,7 +8,6 @@
8 8
     <div class="headerbigimg">
9 9
       <img class="bigimg" src=""/>
10 10
     </div>
11
-  
12 11
     <van-cell-group class="clickbutton">
13 12
         <div class="gotopageimg" @click="gotopageimg"><van-cell  class="clickcharacters" title="查看更多图片"/><span class="iconfont icon-youfan right"></span></div>
14 13
         <span class="iconline"></span>
@@ -49,7 +48,9 @@ export default {
49 48
     CorrelationDynamics: CorrelationDynamics,
50 49
   },
51 50
   data() {
52
-    return {};
51
+    return {
52
+      
53
+    };
53 54
   },
54 55
   computed: {
55 56
     // building() {
@@ -61,7 +62,7 @@ export default {
61 62
   },
62 63
   created() {
63 64
     // this.$store.dispatch('getBuilding')
64
-    this.getBuilding({ id: "123" });
65
+    this.getBuilding({ project_id: "1" });
65 66
   },
66 67
   methods: {
67 68
     ...mapActions(["getBuilding"]),
@@ -87,6 +88,7 @@ export default {
87 88
   width: 100%;
88 89
   height: 610px;
89 90
   overflow-y: auto;
91
+  position: relative;
90 92
 
91 93
   .cityarea{
92 94
     width:72px;
@@ -94,7 +96,7 @@ export default {
94 96
     background:rgba(0,0,0,0.39);
95 97
     padding: 0 0 0 5px;
96 98
     border-radius:0px 0px 25px 0px;
97
-    position: fixed;
99
+    position: absolute;
98 100
     top: 0;
99 101
     left: 0;
100 102
     display: flex;

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

@@ -1,30 +1,30 @@
1
-<template>
2
-    <div class="context">
3
-     <vue-headful title="户型图"  />
4
-        <type-header></type-header>
5
-        <type-content></type-content>
6
-    </div>
7
-</template>
8
-
9
-<script>
10
-import TypeHeader from './components/typeheader.vue'
11
-import TypeContent from './components/typecontent.vue'
12
-
13
-export default {
14
-    name:'BuildingType',
15
-    components: {
16
-        'vue-headful': () => import('vue-headful'),
17
-        'TypeHeader':TypeHeader,
18
-        'TypeContent':TypeContent
19
-    },
20
-}
21
-</script>
22
-
23
-<style lang="postcss" scoped>
24
-.context{
25
-    width: 100%;
26
-    height: 100%;
27
-    overflow-y: auto;
28
-}
29
-</style>
30
-
1
+<template>
2
+    <div class="context">
3
+     <vue-headful title="户型图"  />
4
+        <type-header></type-header>
5
+        <type-content></type-content>
6
+    </div>
7
+</template>
8
+
9
+<script>
10
+import TypeHeader from './components/typeheader.vue'
11
+import TypeContent from './components/typecontent.vue'
12
+
13
+export default {
14
+    name:'BuildingType',
15
+    components: {
16
+        'vue-headful': () => import('vue-headful'),
17
+        'TypeHeader':TypeHeader,
18
+        'TypeContent':TypeContent
19
+    },
20
+}
21
+</script>
22
+
23
+<style lang="postcss" scoped>
24
+.context{
25
+    width: 100%;
26
+    height: 100%;
27
+    overflow-y: auto;
28
+}
29
+</style>
30
+

+ 1
- 1
src/pages/building/components/buildingdata.vue View File

@@ -3,7 +3,7 @@
3 3
     <div class="datacontent">
4 4
       <van-swipe class="slidewrapper" :autoplay="3000">
5 5
         <van-swipe-item class="slideimg" v-for="(image, index) in images" :key="index">
6
-          <img v-lazy="image" />
6
+          <img />
7 7
         </van-swipe-item>
8 8
       </van-swipe>
9 9
     </div>

+ 98
- 80
src/pages/building/typemap.vue View File

@@ -1,80 +1,98 @@
1
-<template>
2
-    <div class=context>
3
-            <vue-headful title="周边配套"  />
4
-            <div class="mapId">
5
-
6
-            </div>
7
-            <van-row class="user-links">
8
-                <van-col span="6">
9
-                    <i class="iconfont  icon-icon-test2 icontype"></i>
10
-                    <span class="characters">学校</span>
11
-                </van-col>
12
-                <van-col span="6">
13
-                    <i class="iconfont icon-icon-test4 icontype"></i>
14
-                    <span class="characters">医院</span>
15
-                </van-col>
16
-                <van-col span="6">
17
-                    <i class="iconfont icon-icon-test1 icontype"></i>
18
-                    <span class="characters">交通</span>
19
-                </van-col>
20
-                <van-col span="6">
21
-                    <i class="iconfont icon-icon-test3 icontype"></i>
22
-                    <span class="characters">商业</span>
23
-                </van-col>
24
-            </van-row>
25
-    </div>
26
-</template>
27
-
28
-<script>
29
-
30
-export default {
31
-name:'mapId',
32
-components: {
33
-    'vue-headful': () => import('vue-headful'),
34
-  },
35
-}
36
-</script>
37
-
38
-<style lang="postcss" scoped>
39
-.context{
40
-    width: 100%;
41
-    height: 100%;
42
-
43
-    .mapId{
44
-        width: 100%;
45
-        height: 587px;
46
-    }
47
-    .user-links{
48
-        width: 100%;
49
-        height: 80px;
50
-        display: flex;
51
-
52
-        .icontype{
53
-            font-size: 16px!important;
54
-            color:#BABDC0!important;
55
-        }
56
-        
57
-        .linevertical{
58
-        border:1px solid #EDEDED;
59
-        }
60
-
61
-        .van-col--6{
62
-          display: flex;
63
-          flex-direction: column;
64
-          align-items: center;
65
-          justify-content: center;
66
-        }
67
-
68
-        .characters{
69
-            font-size:16px;
70
-            font-family:PingFangSC-Regular;
71
-            font-weight:400;
72
-            color:rgba(102,102,102,1);
73
-            line-height:22px;
74
-        }
75
-    }
76
-}
77
-
78
-</style>
79
-
80
-
1
+<template>
2
+    <div class=context>
3
+            <vue-headful title="周边配套"  />
4
+            <div class="mapId">
5
+                <div id='mapcointainer'></div>
6
+            </div>
7
+            <van-row class="user-links">
8
+                <van-col span="6">
9
+                    <i class="iconfont  icon-icon-test2 icontype"></i>
10
+                    <span class="characters">学校</span>
11
+                </van-col>
12
+                <van-col span="6">
13
+                    <i class="iconfont icon-icon-test4 icontype"></i>
14
+                    <span class="characters">医院</span>
15
+                </van-col>
16
+                <van-col span="6">
17
+                    <i class="iconfont icon-icon-test1 icontype"></i>
18
+                    <span class="characters">交通</span>
19
+                </van-col>
20
+                <van-col span="6">
21
+                    <i class="iconfont icon-icon-test3 icontype"></i>
22
+                    <span class="characters">商业</span>
23
+                </van-col>
24
+            </van-row>
25
+    </div>
26
+</template>
27
+
28
+<script>
29
+// import {lazyAmapApiLoaderInstanse} from 'vue-amap';
30
+//  var map
31
+export default {
32
+  name:'mapId',
33
+  components: {
34
+    'vue-headful': () => import('vue-headful'),
35
+  },
36
+  data () {
37
+        return {
38
+    
39
+        }
40
+    },
41
+  mounted() {
42
+    this.map = new AMap.Map('mapcointainer', {
43
+        resizeEnable:true,
44
+        zoom:11,
45
+        center:[118.915671,32.075366]
46
+    })
47
+   }
48
+}
49
+</script>
50
+
51
+<style lang="postcss" scoped>
52
+.context{
53
+    width: 100%;
54
+    height: 100%;
55
+
56
+    .mapId{
57
+        width: 100%;
58
+        height: 587px;
59
+
60
+        #mapcointainer{
61
+            width: 100%;
62
+            height: 100%;
63
+        }
64
+    }
65
+    .user-links{
66
+        width: 100%;
67
+        height: 80px;
68
+        display: flex;
69
+
70
+        .icontype{
71
+            font-size: 16px!important;
72
+            color:#BABDC0!important;
73
+        }
74
+        
75
+        .linevertical{
76
+        border:1px solid #EDEDED;
77
+        }
78
+
79
+        .van-col--6{
80
+          display: flex;
81
+          flex-direction: column;
82
+          align-items: center;
83
+          justify-content: center;
84
+        }
85
+
86
+        .characters{
87
+            font-size:16px;
88
+            font-family:PingFangSC-Regular;
89
+            font-weight:400;
90
+            color:rgba(102,102,102,1);
91
+            line-height:22px;
92
+        }
93
+    }
94
+}
95
+
96
+</style>
97
+
98
+

+ 2
- 2
src/pages/reservation/lookhouse.vue View File

@@ -11,7 +11,7 @@
11 11
               </van-popup>
12 12
           </van-cell>
13 13
           <van-cell class="field_name">楼盘地址:</van-cell>
14
-          <van-switch-cell v-model="checked" title="马上去" />
14
+          <van-switch-cell size="20px" v-model="checked" title="马上去"  />
15 15
           <van-field class="field_name" @click="showDatePicker()" label="预约时间:" />
16 16
           <van-popup v-model="show" position="bottom" :overlay="false">
17 17
             <van-datetime-picker v-model="currentDate" type="datetime" :min-date="minDate" :max-date="maxDate"/>
@@ -124,7 +124,7 @@ export default {
124 124
         width: 90%;
125 125
         height: 125px;
126 126
         position: relative;
127
-        margin-left: 15px;
127
+        margin: 8px 0 0 15px;
128 128
 
129 129
         .content_txt {
130 130
           width: 100%;

+ 4
- 4
src/store/building.js View File

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

+ 1
- 1
src/utils/request.js View File

@@ -21,7 +21,7 @@ export default function request(config) {
21 21
         }
22 22
       })
23 23
     }
24
-
24
+    
25 25
     // const id = loadding.start()
26 26
     axios({
27 27
       params,