This commit is contained in:
邹宗楠
2023-09-15 09:15:50 +08:00
parent 4524867791
commit de0332cf8b

View File

@@ -599,7 +599,10 @@ func (a *API) GetDeliveryPath(orderId int64, appPoiCode string) (lng, lat int, e
if err := json.Unmarshal(path, &riderPath); err != nil {
return 0, 0, err
}
return riderPath[len(riderPath)-1].Longitude, riderPath[len(riderPath)-1].Latitude, nil
if len(riderPath) > 0 {
return riderPath[len(riderPath)-1].Longitude, riderPath[len(riderPath)-1].Latitude, nil
}
return 0, 0, nil
}
// OrderLogisticsFee 获取订单配送费