|
@@ -945,7 +945,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
|
this.tabVal = 'insidePlan';
|
|
this.tabVal = 'insidePlan';
|
|
|
- this.beforeAddFn();
|
|
|
|
|
// 授权
|
|
// 授权
|
|
|
getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
|
|
getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -1396,14 +1395,17 @@ export default {
|
|
|
var location = new TMap.LatLng(that.location.lat1, that.location.lon1);
|
|
var location = new TMap.LatLng(that.location.lat1, that.location.lon1);
|
|
|
map.setCenter(location);
|
|
map.setCenter(location);
|
|
|
markers.updateGeometries([{ id: 'marker', position: 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() {
|
|
getLocation() {
|
|
|
if (localStorage.getItem('loginType') == 'cs') {
|
|
if (localStorage.getItem('loginType') == 'cs') {
|