1
This commit is contained in:
@@ -2,9 +2,7 @@ package baidunavi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/json"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -261,11 +259,5 @@ func (a *API) DirectionLiteRide(coords []*Coordinate) (retVal interface{}, err e
|
|||||||
}
|
}
|
||||||
result := string(body)
|
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
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,12 @@ func TestOrderLogisticsStatus(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetDeliveryPath(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) {
|
func TestOrderLogisticsFee(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user