fk
This commit is contained in:
@@ -94,6 +94,9 @@ func (c *NetSpiderController) QueryPageStores() {
|
|||||||
if len(shopList2) > 0 {
|
if len(shopList2) > 0 {
|
||||||
for _, v := range shopList2 {
|
for _, v := range shopList2 {
|
||||||
v.Distance = int(jxutils.EarthDistance(v.Lng, v.Lat, lng, lat) * 1000)
|
v.Distance = int(jxutils.EarthDistance(v.Lng, v.Lat, lng, lat) * 1000)
|
||||||
|
if v.Distance < 0 {
|
||||||
|
v.Distance = 0
|
||||||
|
}
|
||||||
if v.Distance <= params.Radius {
|
if v.Distance <= params.Radius {
|
||||||
shopList = append(shopList, v)
|
shopList = append(shopList, v)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user