Bläddra i källkod

Merge branch 'feature_20250427_新增门店等级错误问题修改' into release

zhujindu 7 månader sedan
förälder
incheckning
4cc298df74
1 ändrade filer med 11 tillägg och 9 borttagningar
  1. 11 9
      src/views/storeManagement/storeAdd.vue

+ 11 - 9
src/views/storeManagement/storeAdd.vue

@@ -945,7 +945,6 @@ export default {
   },
   activated() {
     this.tabVal = 'insidePlan';
-    this.beforeAddFn();
     // 授权
     getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
       this.$nextTick(() => {
@@ -1396,14 +1395,17 @@ export default {
       var location = new TMap.LatLng(that.location.lat1, that.location.lon1);
       map.setCenter(location);
       markers.updateGeometries([{ id: 'marker', position: location }]);
-      geocoder.getAddress({ location: location }).then(function (result) {
-        var addresses = result.result.formatted_addresses;
-        that.fromValue.cityNameOld = result.result.ad_info.city;
-        that.fromValue.districtNameOld = result.result.ad_info.district;
-        that.fromValue.addressLine = addresses.recommend;
-        localStorage.setItem('locationRemark', addresses.recommend);
-        that.beforeAddFn();
-      });
+      geocoder
+        .getAddress({ location: location })
+        .then(function (result) {
+          var addresses = result.result.formatted_addresses;
+          that.fromValue.cityNameOld = result.result.ad_info.city;
+          that.fromValue.districtNameOld = result.result.ad_info.district;
+          that.fromValue.addressLine = addresses.recommend;
+          localStorage.setItem('locationRemark', addresses.recommend);
+          that.beforeAddFn();
+        })
+        .catch((error) => console.error('Geocoding error:', error));
     },
     getLocation() {
       if (localStorage.getItem('loginType') == 'cs') {