mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
更改查找不显示问题
This commit is contained in:
@@ -485,7 +485,7 @@ export default {
|
|||||||
// console.log("data", data); // data就是它传过来的值
|
// console.log("data", data); // data就是它传过来的值
|
||||||
// console.log("原始this.station", this.station);
|
// console.log("原始this.station", this.station);
|
||||||
// 地址
|
// 地址
|
||||||
this.detailedAddress = data.address;
|
// this.detailedAddress = data.address;
|
||||||
// console.log("详细地址", data.address);
|
// console.log("详细地址", data.address);
|
||||||
var adcode = data.adcode;
|
var adcode = data.adcode;
|
||||||
var areaCode = [];
|
var areaCode = [];
|
||||||
@@ -498,14 +498,15 @@ export default {
|
|||||||
this.station.stationLng = String(data.pos[0]);
|
this.station.stationLng = String(data.pos[0]);
|
||||||
this.station.stationLat = String(data.pos[1]);
|
this.station.stationLat = String(data.pos[1]);
|
||||||
// console.log("修改后this.station", this.station);
|
// console.log("修改后this.station", this.station);
|
||||||
|
console.log(data.address,'data.address')
|
||||||
|
this.station.address = data.address.includes('区') ? data.address.replace(/区/, ' ').split(' ')[1] : data.address
|
||||||
// 优化之后
|
// 优化之后
|
||||||
let newAddress2 = this.detailedAddress
|
// let newAddress2 = this.detailedAddress
|
||||||
.replace(/(?<=[省市区])/g, "$&,")
|
// .replace(/(?<=[省市区])/g, "$&,")
|
||||||
.split(",");
|
// .split(",");
|
||||||
let end = newAddress2.pop();
|
// let end = newAddress2.pop();
|
||||||
console.log("详细地址", end);
|
// console.log("详细地址",this.station.areaCode,newAddress2);
|
||||||
this.station.address = end;
|
// this.station.address = newAddress2;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user