From 3b97347fe84fc74d5a25e980fd40d26ff63a95de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 27 Oct 2023 18:13:54 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/cms.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 6a9b72bc7..ff688684d 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -1,7 +1,6 @@ package cms import ( - "encoding/json" "fmt" "git.rosy.net.cn/jx-callback/globals" "math" @@ -740,9 +739,13 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist return nil, 0, 0, fmt.Errorf("获取骑行规划路线错误") } path := &baidunavi.RiderPath{} - if err := json.Unmarshal([]byte(data.(string)), path); err != nil { + if err := utils.Map2StructByJson(data, path, false); err != nil { return nil, 0, 0, err } + globals.SugarLogger.Debugf("==============:path %s", utils.Format4Output(path, false)) + //if err := json.Unmarshal([]byte(data.(map[string]interface{})), path); err != nil { + // return nil, 0, 0, err + //} if path.Status != model.NO { return nil, 0, 0, fmt.Errorf("%d,%s", path.Status, path.Message) }