aa
This commit is contained in:
@@ -143,7 +143,7 @@ type TokenInfo struct {
|
||||
}
|
||||
|
||||
func (a *API) GetAccessToken() (tokenInfo *TokenInfo, err error) {
|
||||
result, err := a.AccessAPI(tokenAction, TestURL, nil, false)
|
||||
result, err := a.AccessAPI(tokenAction, URL, nil, false)
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result["data"], &tokenInfo, false)
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ type ItemsJSON struct {
|
||||
//https://open.ele.me/documents/%E5%88%9B%E5%BB%BA%E8%9C%82%E9%B8%9F%E8%AE%A2%E5%8D%95
|
||||
func (a *API) CreateOrder(createOrderParam *CreateOrderParam) (err error) {
|
||||
params := utils.Struct2FlatMap(createOrderParam)
|
||||
_, err = a.AccessAPI("v2/order", TestURL, params, true)
|
||||
_, err = a.AccessAPI("v2/order", URL, params, true)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -110,12 +110,12 @@ type CancelOrderParam struct {
|
||||
|
||||
func (a *API) CancelOrder(cancelOrderParam *CancelOrderParam) (err error) {
|
||||
params := utils.Struct2FlatMap(cancelOrderParam)
|
||||
_, err = a.AccessAPI("v2/order/cancel", TestURL, params, true)
|
||||
_, err = a.AccessAPI("v2/order/cancel", URL, params, true)
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *API) ComplaintOrder(cancelOrderParam *CancelOrderParam) (err error) {
|
||||
params := utils.Struct2FlatMap(cancelOrderParam)
|
||||
_, err = a.AccessAPI("v2/order/complaint", TestURL, params, true)
|
||||
_, err = a.AccessAPI("v2/order/complaint", URL, params, true)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ type CreateStoreParam struct {
|
||||
|
||||
func (a *API) CreateStore(createStoreParam *CreateStoreParam) (err error) {
|
||||
params := utils.Struct2FlatMap(createStoreParam)
|
||||
_, err = a.AccessAPI("v2/chain_store", TestURL, params, true)
|
||||
_, err = a.AccessAPI("v2/chain_store", URL, params, true)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ type GetStoreResult struct {
|
||||
}
|
||||
|
||||
func (a *API) GetStore(storeID int) (getStoreResult *GetStoreResult, err error) {
|
||||
result, err := a.AccessAPI("v2/chain_store/query", TestURL, map[string]interface{}{
|
||||
result, err := a.AccessAPI("v2/chain_store/query", URL, map[string]interface{}{
|
||||
"chain_store_code": []string{utils.Int2Str(storeID)},
|
||||
}, true)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user