This commit is contained in:
邹宗楠
2023-09-11 15:38:23 +08:00
parent 1065088ea8
commit 72fe439cdf
2 changed files with 6 additions and 9 deletions

View File

@@ -2,9 +2,7 @@ package baidunavi
import (
"crypto/md5"
"encoding/json"
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"io/ioutil"
"net/http"
"net/url"
@@ -261,11 +259,5 @@ func (a *API) DirectionLiteRide(coords []*Coordinate) (retVal interface{}, err e
}
result := string(body)
path := &RiderPath{}
if err := json.Unmarshal([]byte(result), path); err != nil {
return result, nil
}
globals.SugarLogger.Debugf("=======path := %s", utils.Format4Output(path, false))
return result, nil
}

View File

@@ -88,7 +88,12 @@ func TestOrderLogisticsStatus(t *testing.T) {
}
func TestGetDeliveryPath(t *testing.T) {
api.GetDeliveryPath(1000713330160837459, "7821254")
data1, data2, err := api.GetDeliveryPath(1100718012566212160, "7290541")
fmt.Println(data1)
fmt.Println(data2)
fmt.Println(utils.Float64ToStr(float64(data1) / 1000000))
fmt.Println(utils.Float64ToStr(float64(data2) / 1000000))
fmt.Println(err)
}
func TestOrderLogisticsFee(t *testing.T) {