This commit is contained in:
苏尹岚
2020-12-22 18:09:23 +08:00
parent d2e6dd6bf3
commit a48e9d13ab

View File

@@ -123,10 +123,7 @@ func PublishJob(ctx *jxcontext.Context, jobExt *model.JobExt) (errCode string, e
}
}
if job.Address != "" && (job.Lng == 0 || job.Lat == 0) {
lng, lat, err := api.AutonaviAPI.GetCoordinateFromAddress(job.Address, "")
if err != nil {
return errCode, err
}
lng, lat, _ := api.AutonaviAPI.GetCoordinateFromAddress(job.Address, "")
job.Lng = jxutils.StandardCoordinate2Int(lng)
job.Lat = jxutils.StandardCoordinate2Int(lat)
}