门店配送范围-修改多边形计算公式

This commit is contained in:
Rosy-zhudan
2019-09-17 09:26:35 +08:00
parent 05809c3a50
commit f208fea6a1
2 changed files with 1 additions and 158 deletions

View File

@@ -447,7 +447,7 @@ func ScoreStoreRange(storeInfo *cms.StoreExt) {
if storeInfo.DeliveryRangeType == model.DeliveryRangeTypePolygon {
if storeInfo.DeliveryRange != "" {
points := jxutils.CoordinateStr2Points(storeInfo.DeliveryRange)
area := jxutils.CalcPolygonAreaByLngAndLat(points)
area := jxutils.CalcPolygonAreaAutonavi(points)
goodArea := math.Pi * StoreRangeGoodRadius * StoreRangeGoodRadius
badArea := math.Pi * StoreRangeBadRadius * StoreRangeBadRadius
if area >= goodArea {