Update questionnaireSurvey.go
This commit is contained in:
parent
af15840755
commit
ff21b6b424
@ -12,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
m "fonchain-fiee/pkg/model"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
@ -64,6 +65,10 @@ func QuestionnaireSurveyCreate(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
if req.Longitude == "" || req.Latitude == "" {
|
||||
service.Error(c, errors.New("获取定位失败"))
|
||||
return
|
||||
}
|
||||
address, err := utils.ReverseGeo(req.Longitude, req.Latitude, "ZhCN")
|
||||
if err != nil {
|
||||
service.Error(c, errors.New("获取地址失败"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user