1
This commit is contained in:
@@ -12,8 +12,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
prodURL = "http://api.jxc4.com/openapi/CallOpenAPI"
|
||||
signKey = "sign"
|
||||
prodURL = "http://api.jxc4.com/openapi/CallOpenAPI" // 老版本的URL
|
||||
prodURLNew = "http://print.jxcs.net/v2/openapi/CallOpenAPI" // 老版本的URL
|
||||
signKey = "sign"
|
||||
)
|
||||
const (
|
||||
// ResponseCodeSuccess 操作成功
|
||||
@@ -76,7 +77,7 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa
|
||||
params["timestamp"] = utils.Int64ToStr(time.Now().Unix())
|
||||
sign := a.signParams(params)
|
||||
params[signKey] = sign
|
||||
fullURL := prodURL
|
||||
fullURL := prodURLNew
|
||||
request, _ := http.NewRequest(http.MethodPost, fullURL, strings.NewReader(utils.Map2URLValues(params).Encode()))
|
||||
request.Header.Set("charset", "UTF-8")
|
||||
request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user