Browse Source

计划内拜访百度地图获取定位描述报错bug

zhujindu 7 tháng trước cách đây
mục cha
commit
d32dedb7d3
1 tập tin đã thay đổi với 7 bổ sung3 xóa
  1. 7 3
      src/views/deviceWithin/storeVisit.vue

+ 7 - 3
src/views/deviceWithin/storeVisit.vue

@@ -408,6 +408,10 @@ export default {
           console.log('province=' + province);
           console.log('city=' + city);
           console.log('district=' + district);
+          let recommend = '';
+          if (addresses) {
+            recommend = addresses.recommend;
+          }
           if (that.$route.query.type == 'edit') {
             var params = {
               storeId: that.storeId,
@@ -421,7 +425,7 @@ export default {
               visitSource: '1',
               insert: insert,
               locationCity: '',
-              locationRemark: '',
+              locationRemark: recommend,
               locationAccuracy: that.urlParameter.PointSum,
               province: address_component.province,
               city: address_component.city,
@@ -468,7 +472,7 @@ export default {
               visitSource: '1',
               insert: insert,
               locationCity: '',
-              locationRemark: addresses.recommend,
+              locationRemark: recommend,
               locationAccuracy: that.urlParameter.PointSum,
               province: address_component.province,
               city: address_component.city,
@@ -476,7 +480,7 @@ export default {
             };
             that.locationAccuracy = that.urlParameter.PointSum;
             that.city = '';
-            that.address = addresses.recommend;
+            that.address = recommend;
             localStorage.setItem('address', '');
             if (that.visitId != null) {
               params.id = that.visitId;