根据坐标得到城市

This commit is contained in:
苏尹岚
2020-09-24 18:26:04 +08:00
parent 5348bcb82e
commit 0b0930ccd1
3 changed files with 10 additions and 10 deletions

View File

@@ -146,10 +146,10 @@ func (c *CmsController) GetCoordinateDistrictCode() {
// @Param lat query number true "纬度"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetCoordinateTownInfo [get]
func (c *CmsController) GetCoordinateTownInfo() {
c.callGetCoordinateTownInfo(func(params *tCmsGetCoordinateTownInfoParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.GetCoordinateTownInfo(params.Ctx, params.Lng, params.Lat)
// @router /GetCoordinateCityInfo [get]
func (c *CmsController) GetCoordinateCityInfo() {
c.callGetCoordinateCityInfo(func(params *tCmsGetCoordinateCityInfoParams) (retVal interface{}, errCode string, err error) {
retVal, err = cms.GetCoordinateCityInfo(params.Ctx, params.Lng, params.Lat)
return retVal, "", err
})
}