陈冉 il y a 6 ans
Parent
révision
67f3616b76

+ 1
- 1
src/config/apis.js Voir le fichier

@@ -91,7 +91,7 @@ const apiList = {
91 91
   //获取code
92 92
   getcode: {
93 93
     get: {
94
-      url: 'api/user/getUserInfo/:code',
94
+      url: 'api/wx/getUserInfo/:code',
95 95
       method: 'get',
96 96
     },
97 97
   },

+ 11
- 3
src/main.js Voir le fichier

@@ -17,17 +17,25 @@ import 'vue-photo-preview/dist/skin.css'
17 17
 
18 18
 
19 19
 Vue.filter('moment', function (value, formatString) {
20
-formatString = formatString || 'YYYY/MM/DD';
21
-return moment(value).format(formatString);
20
+  formatString = formatString || 'YYYY/MM/DD';
21
+  return moment(value).format(formatString);
22 22
 });
23 23
 
24
+// AMap.initAMapApiLoader({
25
+//   key: 'f0d1d4f82432504003ebf46e5e36ff03',
26
+//   plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
27
+//   // 默认高德 sdk 版本为 1.4.4
28
+//   v: '1.4.4'
29
+// })
30
+
31
+
24 32
 // import './theme'
25 33
 // import './public/style/common.scss'
26 34
 // import AMap  from 'vue-amap'
27 35
 
28 36
 Vue.use(Vant)
29 37
 Vue.use(AMap)
30
-Vue.use(VueAwesomeSwiper, /* { default global options } */)
38
+Vue.use(VueAwesomeSwiper)
31 39
 Vue.use(preview)
32 40
 
33 41
 Vue.config.productionTip = false

+ 4
- 3
src/pages/building/buildingdetail.vue Voir le fichier

@@ -115,6 +115,8 @@
115 115
 
116 116
 <script>
117 117
 import { createNamespacedHelpers } from "vuex";
118
+// import { lazyAmapApiLoaderInstanse } from "vue-amap";
119
+
118 120
 const {
119 121
   mapState: mapbuildState,
120 122
   mapActions: mapbuildActions
@@ -249,7 +251,7 @@ export default {
249 251
     //浏览人数
250 252
     addvistornum(element) {
251 253
       let self = this;
252
-      if (!self.isopen) {
254
+      if (!this.isopen) {
253 255
         this.postVisitors({
254 256
           id: element.id,
255 257
           browsingnu: element.browsingnum + 1
@@ -257,12 +259,11 @@ export default {
257 259
           self.numadd({ id: element.id });
258 260
         });
259 261
       }
260
-      self.isopen = !this.isopen;
262
+      this.isopen = !this.isopen;
261 263
     },
262 264
 
263 265
     //周边配套信息
264 266
     perimeterinformation(element, tag) {
265
-      // let self = this;
266 267
       this.getMap({
267 268
         id: element.buildingid,
268 269
         buildingname: element.buildingname,

+ 16
- 17
src/pages/building/perimetertype.vue Voir le fichier

@@ -2,12 +2,10 @@
2 2
     <div class="context" >
3 3
             <vue-headful title="周边配套"  />
4 4
           <!-- <div class="mapId">
5
-            <el-amap ref="map" :events="events" :center="mapCenter" :zoom="12" id='mapcointainer' vid="amapDemo" >
6
-              <el-amap-marker v-for="(item,index) in markers" :key="index" :position="item" />
7
-            </el-amap>
5
+            <el-amap vid="amapDemo" :zoom="zoom" :center="center" id='mapcointainer'></el-amap>
8 6
           </div> -->
9 7
             <div class="mapId">
10
-                <div id='mapcointainer'></div>
8
+                <div id="mapcointainer"></div>
11 9
             </div>
12 10
              <van-row class="user-links">
13 11
           <van-col span="6" >
@@ -40,7 +38,8 @@
40 38
 </template>
41 39
 
42 40
 <script>
43
-import { lazyAmapApiLoaderInstanse } from "vue-amap";
41
+
42
+// import { lazyAmapApiLoaderInstanse } from "vue-amap";
44 43
 
45 44
 let map;
46 45
 let routerParams;
@@ -50,7 +49,7 @@ export default {
50 49
   data(){
51 50
       return{
52 51
           keyword:String,
53
-          shows:false
52
+          shows:false,
54 53
       }
55 54
   },
56 55
   components: {
@@ -84,13 +83,13 @@ export default {
84 83
       });
85 84
       this.searchAround(routerParams.tag);
86 85
         if(routerParams.tag=="学校"){
87
-           this.shows = 1;
86
+          this.shows = 1;
88 87
         }else if(routerParams.tag=="医院"){
89
-         this.shows = 2;
88
+          this.shows = 2;
90 89
         }else if(routerParams.tag=="交通"){
91
-         this.shows = 3;
90
+          this.shows = 3;
92 91
         }else if(routerParams.tag=="商业"){
93
-         this.shows = 4;
92
+          this.shows = 4;
94 93
         }
95 94
     },
96 95
 
@@ -118,14 +117,14 @@ export default {
118 117
       });
119 118
        AMap.plugin(['AMap.ToolBar','AMap.Scale'],
120 119
          ()=>{
121
-             map.addControl(new AMap.ToolBar());
122
-           map.addControl(new AMap.Scale());
120
+          map.addControl(new AMap.ToolBar());
121
+          map.addControl(new AMap.Scale());
123 122
         });
124
-      marker = new AMap.Marker({
125
-        position: [routerParams.lng, routerParams.lat],
126
-        title: "routerParams.buildingname",
127
-        map: map
128
-      });
123
+      // marker = new AMap.Marker({
124
+      //   position: [routerParams.lng, routerParams.lat],
125
+      //   title: "routerParams.buildingname",
126
+      //   map: map
127
+      // });
129 128
         this.searchAround(val);
130 129
         if(val=="学校"){
131 130
            this.shows = 1;

+ 1
- 1
src/store/getcode.js Voir le fichier

@@ -12,7 +12,7 @@ export default {
12 12
       }
13 13
     },
14 14
     actions: {
15
-        getGetCode({ commit }, params) {  
15
+        getGetCode({ commit }, params) { 
16 16
         return new Promise((resolve, reject) => {
17 17
           request({ ...getAPI('getcode.get',{code: params.usercode}) }).then((data) => {
18 18
             commit('updateGetCode', data)

+ 1
- 0
src/store/map.js Voir le fichier

@@ -13,6 +13,7 @@ export default {
13 13
     },
14 14
     actions: {
15 15
       getMap({ commit }, params) {
16
+        // debugger
16 17
         return new Promise((resolve, reject) => {
17 18
           request({ ...getAPI('map.getmapinformation',{ buildingid: params.id }) }).then((data) => {
18 19
             commit('updateMap', data)