This commit is contained in:
suyl
2021-05-08 15:50:56 +08:00
parent 317fdd59a1
commit 2ae4b513dd
7 changed files with 122 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ import (
)
const (
prodURL = "http://gw.api.taobao.com/router/rest"
prodURL = "https://gw.api.taobao.com/router/rest"
testURL = "http://gw.api.tbsandbox.com/router/rest"
sigKey = "sign"
)
@@ -70,6 +70,7 @@ func (a *API) AccessAPI(action string, isPost bool, bizParams map[string]interfa
params["timestamp"] = utils.Time2Str(time.Now())
params["v"] = "2.0"
params["format"] = "json"
params["simplify"] = true
params = utils.MergeMaps(params, bizParams)
signStr := a.signParam(params)
params[sigKey] = signStr