sdk
This commit is contained in:
@@ -268,7 +268,7 @@ func (a *API) GetStoreFreight(storeId int64) ([]int64, error) {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
}
|
||||
tempList := make([]int64, 0)
|
||||
if len(result.Data.StoreFreights) == 0 {
|
||||
if utils.IsNil(result.Data) {
|
||||
tempList = append(tempList, 0)
|
||||
return tempList, err
|
||||
} else {
|
||||
|
||||
@@ -257,7 +257,7 @@ func TestUpdateStore(t *testing.T) {
|
||||
func TestGetStoreBindFreight(t *testing.T) {
|
||||
var token = `{"access_token":"d590b649-0dd9-4988-a5e2-bf7e06e2f105","expires_in":1667808519,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f57c6a55-af5f-45ca-8ade-b2282be86341","authority_id":""}`
|
||||
var a2 = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
||||
resp, err := a2.GetStoreFreight(62490423)
|
||||
resp, err := a2.GetStoreFreight(64251634)
|
||||
fmt.Println(resp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user