This commit is contained in:
suyl
2021-05-11 16:04:24 +08:00
parent c84d75e161
commit 93d66d1c6a

View File

@@ -212,9 +212,9 @@ func QueryPageStores2(db *DaoDB, pageSize, offset int, keyword string, vendorSto
for _, v := range shopList {
if v.Address != "" && v.CityName != "" {
result, _ := api.AutonaviAPI.GetCoordinateFromAddressByPageAll(v.Address, v.CityCode)
coords := strings.Split(result.Pois[0].Location, ",")
coords := strings.Split(result.Location, ",")
lng, lat := utils.Str2Float64(coords[0]), utils.Str2Float64(coords[1])
v.DistrictName = result.Pois[0].Adname
v.DistrictName = result.Adname
v.Lng, v.Lat = lng, lat
if lng1 > 0 {
if !(lng >= lng1 && lat >= lat1 && lng <= lng2 && lat <= lat2) {