Merge branch 'master' of https://e.coding.net/rosydev/baseapi
This commit is contained in:
@@ -36,38 +36,34 @@ package baidunavi
|
||||
//}
|
||||
|
||||
type RiderPath struct {
|
||||
Status int `json:"status"`
|
||||
Message string `json:"message"`
|
||||
Result struct {
|
||||
Origin struct {
|
||||
Lng float64 `json:"lng"`
|
||||
Lat float64 `json:"lat"`
|
||||
} `json:"origin"`
|
||||
Destination struct {
|
||||
Lng float64 `json:"lng"`
|
||||
Lat float64 `json:"lat"`
|
||||
} `json:"destination"`
|
||||
Routes []struct {
|
||||
Distance int `json:"distance"`
|
||||
Duration int `json:"duration"`
|
||||
Steps []struct {
|
||||
Distance int `json:"distance"`
|
||||
Duration int `json:"duration"`
|
||||
Direction int `json:"direction"`
|
||||
TurnType string `json:"turn_type"`
|
||||
Name string `json:"name"`
|
||||
Instruction string `json:"instruction"`
|
||||
RestrictionsInfo string `json:"restrictions_info"`
|
||||
Path string `json:"path"`
|
||||
StartLocation struct {
|
||||
Lng string `json:"lng"`
|
||||
Lat string `json:"lat"`
|
||||
} `json:"start_location"`
|
||||
EndLocation struct {
|
||||
Lng string `json:"lng"`
|
||||
Lat string `json:"lat"`
|
||||
} `json:"end_location"`
|
||||
} `json:"steps"`
|
||||
} `json:"routes"`
|
||||
} `json:"result"`
|
||||
Destination struct {
|
||||
Lat float64 `json:"lat"`
|
||||
Lng float64 `json:"lng"`
|
||||
} `json:"destination"`
|
||||
Origin struct {
|
||||
Lat float64 `json:"lat"`
|
||||
Lng float64 `json:"lng"`
|
||||
} `json:"origin"`
|
||||
Routes []struct {
|
||||
Distance int `json:"distance"`
|
||||
Duration int `json:"duration"`
|
||||
Steps []struct {
|
||||
Direction int `json:"direction"`
|
||||
Distance int `json:"distance"`
|
||||
Duration int `json:"duration"`
|
||||
EndLocation struct {
|
||||
Lat string `json:"lat"`
|
||||
Lng string `json:"lng"`
|
||||
} `json:"end_location"`
|
||||
Instruction string `json:"instruction"`
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
RestrictionsInfo string `json:"restrictions_info"`
|
||||
StartLocation struct {
|
||||
Lat string `json:"lat"`
|
||||
Lng string `json:"lng"`
|
||||
} `json:"start_location"`
|
||||
TurnType string `json:"turn_type"`
|
||||
} `json:"steps"`
|
||||
} `json:"routes"`
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package ebaiapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -311,6 +312,8 @@ func (a *API) SkuCreate(trackInfo, shopID string, customSkuID int64, params map[
|
||||
}*/
|
||||
params = utils.MergeMaps(params, defParams)
|
||||
result, err := a.AccessAPI2("sku.create", params, trackInfo)
|
||||
globals.SugarLogger.Debugf("========result := %s", utils.Format4Output(result, false))
|
||||
globals.SugarLogger.Debugf("========result := %v", err)
|
||||
if err == nil && result.Data != nil {
|
||||
return utils.Interface2Int64WithDefault(result.Data.(map[string]interface{})[KeySkuID], 0), nil
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestSkuBrandList(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPictureUpload(t *testing.T) {
|
||||
result, err := api.PictureUpload("http://image.jxc4.com/image/e078b225d7b232b4497a689dbf65159e.jpg", nil)
|
||||
result, err := api.PictureUpload("http://image.jxc4.com/f0406c28c014a69a1150730c6b4b569b.jpg", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
|
||||
@@ -234,7 +234,6 @@ func TestGetJdUpcCodeByUpc(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("==============================================================")
|
||||
for _, v := range data {
|
||||
fmt.Println(v)
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
)
|
||||
|
||||
// 京西速食(蔬菜)
|
||||
var token1 = `{"access_token":"b27e1e5a-0e07-4311-b98b-69df26bbd82e","expires_in":1698285505,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f6822620-4154-4a4a-b04e-7db30c08e7f9","authority_id":""}`
|
||||
var token1 = `{"access_token":"5ffb6ad8-3f74-4711-b0d7-7b3dad8e4bca","expires_in":1698887957,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"62ca247b-519d-4b8b-bd1e-54b63208dc55","authority_id":""}`
|
||||
|
||||
// 京西到家(商超)
|
||||
var token2 = `{"access_token":"7e3853fa-24d4-4649-938b-46947da04c92","expires_in":1698887957,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"1dd634e9-9f9e-459b-a770-341fb64e4f88","authority_id":""}`
|
||||
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token2)
|
||||
//var token2 = `{"access_token":"7e3853fa-24d4-4649-938b-46947da04c92","expires_in":1698887957,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"1dd634e9-9f9e-459b-a770-341fb64e4f88","authority_id":""}`
|
||||
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token1)
|
||||
|
||||
// 查询售后单详情
|
||||
func TestAfsOrder(t *testing.T) {
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestGetDispatcherInfo(t *testing.T) {
|
||||
fmt.Println(err)
|
||||
}
|
||||
func TestCancelWaybill(t *testing.T) {
|
||||
err := a.ShopOrderDispatcher(75324142, "6922809843002512994", 2)
|
||||
err := a.ShopOrderDispatcher(64251630, "6923172525153719861", DispatcherFeeTypeCall)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user