|
|
@@ -332,7 +332,7 @@ import {
|
|
|
} from '@/api/index';
|
|
|
import { validatePhone } from '@/utils';
|
|
|
import { jsonp } from 'vue-jsonp';
|
|
|
-import { getPosition, getTicketFun } from '@/utils/TXApiFun';
|
|
|
+import { getPosition, getTicketFun, getGeocoder } from '@/utils/TXApiFun';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -405,7 +405,7 @@ export default {
|
|
|
this.fromData.lon = TXisBD.lon;
|
|
|
this.location.lat1 = resData.latitude;
|
|
|
this.location.lon1 = resData.longitude;
|
|
|
- this.addVisits();
|
|
|
+ this.initData();
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
this.beforeAddFn();
|
|
|
@@ -414,16 +414,32 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ initData() {
|
|
|
+ getGeocoder({ latitude: this.location.lat1, longitude: this.location.lon1 }).then((res) => {
|
|
|
+ if (res.status == 0 && res.result) {
|
|
|
+ let result = res.result;
|
|
|
+ this.fromData.cityNameOld = result.ad_info.city;
|
|
|
+ this.fromData.districtNameOld = result.ad_info.district;
|
|
|
+ let addresses = result.formatted_addresses; // 描述性地址
|
|
|
+ if (addresses) {
|
|
|
+ this.fromData.addressLine = addresses.recommend;
|
|
|
+ localStorage.setItem('locationRemark', addresses.recommend);
|
|
|
+ }
|
|
|
+ // this.beforeAddFn();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
moreTypeShowfn() {
|
|
|
this.chainsData = [];
|
|
|
this.moreTypeShow = true;
|
|
|
},
|
|
|
+ // 搜索经销商列表
|
|
|
getChainsByDeptCodesearch(chainName) {
|
|
|
this.chainsData = [];
|
|
|
getChainsByDeptCode({
|
|
|
chainName: this.searchChainName,
|
|
|
- // cityName: this.fromData.cityNameOld,
|
|
|
- // districtName: this.fromData.districtNameOld,
|
|
|
+ cityName: this.fromData.cityNameOld,
|
|
|
+ districtName: this.fromData.districtNameOld,
|
|
|
// deptId: this.fromData.orgId,
|
|
|
// ifJzStoreType: this.fromData.ifJzStoreType,
|
|
|
// storeCategory: this.fromData.storeCategory,
|