This commit is contained in:
邹宗楠
2023-09-06 15:02:53 +08:00
parent 979f9565bd
commit 5ed3015c61
4 changed files with 9 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ func (a *API) GetCyclingPlan(origin, destination string) ([]string, int64, int64
return nil, 0, 0, err
}
var data *CyclingPlan
if err := utils.Map2StructByJson(result, data, false); err != nil {
if err := utils.Map2StructByJson(result, &data, false); err != nil {
return nil, 0, 0, err
}

View File

@@ -8,7 +8,11 @@ import (
func TestGetCyclingPlan(t *testing.T) {
key := "e44ae2850c0ac930b65c9652d2db0321"
a := New(key)
a.GetCyclingPlan("113.854912,22.601450", "113.846355,22.625570")
data1, dada2, dada3, err := a.GetCyclingPlan("104.045460,30.693001", "104.045474,30.693344")
fmt.Println(data1)
fmt.Println(dada2)
fmt.Println(dada3)
fmt.Println(err)
}
func TestLng(t *testing.T) {

View File

@@ -20,13 +20,13 @@ func init() {
baseapi.Init(sugarLogger)
// 菜市
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_n_YVCkjFuV_0-76UFfNKCg") //token_n4TwqCntWWuvQwAawzxC0w
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_stuXR8Sf8XhvNz4f9A9Bxw") //token_n4TwqCntWWuvQwAawzxC0w
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w
cookieStr := `
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;

View File

@@ -77,7 +77,7 @@ func TestOrderApplyPartRefund(t *testing.T) {
}
func TestOrderLogisticsStatus(t *testing.T) {
result, err := api.OrderLogisticsStatus(1100687990339131759)
result, err := api.OrderLogisticsStatus(1100710754248464487)
if err != nil {
t.Fatal(err)
}