|
|
|
@ -151,12 +151,21 @@ Page({
|
|
|
|
|
},true).then(data => { |
|
|
|
|
console.log(data); |
|
|
|
|
if(data.code == 0){ |
|
|
|
|
let l = data.data.centerPoint.indexOf('POINT('); |
|
|
|
|
console.log(l) |
|
|
|
|
return; |
|
|
|
|
let lag = data.data.centerPoint.splice() |
|
|
|
|
let number = data.data[0].centerPoint; |
|
|
|
|
console.log(number) |
|
|
|
|
let l = number.indexOf('(')+1; |
|
|
|
|
let z = number.indexOf(' '); |
|
|
|
|
let r = number.indexOf(')'); |
|
|
|
|
|
|
|
|
|
console.log(l,z,r) |
|
|
|
|
|
|
|
|
|
let log = number.substr(l,z-l); |
|
|
|
|
let lag = number.substr(z,r-z); |
|
|
|
|
|
|
|
|
|
console.log(lag,log) |
|
|
|
|
this.setData({ |
|
|
|
|
latitude:data.data.centerPoint, |
|
|
|
|
latitude:lag, |
|
|
|
|
longitude:log, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|