1
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
|
||||
// IncomingToken 进件api,token获取
|
||||
func (a *API) IncomingToken() (comingToken string, expiresIn int64, err error) {
|
||||
result, err := a.AccessAPI(IncomingUrlTest, TokenActive, http.MethodPost, "", map[string]interface{}{
|
||||
result, err := a.AccessAPI(IncomingUrlProd, TokenActive, http.MethodPost, "", map[string]interface{}{
|
||||
"grant_type": "client_credentials",
|
||||
"client_id": a.clientId,
|
||||
"client_secret": a.clientSecret,
|
||||
@@ -43,7 +43,7 @@ func (a *API) IncomingToken() (comingToken string, expiresIn int64, err error) {
|
||||
|
||||
// ModifiedToken 更新token获取
|
||||
func (a *API) ModifiedToken(userName string, password string) (modifiedToken string, modifiedExpire int64, err error) {
|
||||
result, err := a.AccessAPI(IncomingUrlTest, TokenActive, http.MethodPost, "", map[string]interface{}{
|
||||
result, err := a.AccessAPI(ModifiedUrlProd, TokenActive, http.MethodPost, "", map[string]interface{}{
|
||||
"grant_type": "password",
|
||||
"username": userName,
|
||||
"password": password,
|
||||
@@ -98,7 +98,7 @@ func (a *API) FileUpload(filePath, imgType, sourcechnl, isOcr string) (*UploadIm
|
||||
}
|
||||
|
||||
// 创建 HTTP 请求
|
||||
req, err := http.NewRequest("POST", fmt.Sprintf("%s/%s", BaseTestUrl, FileUpload), body)
|
||||
req, err := http.NewRequest("POST", fmt.Sprintf("%s/%s", BaseProdUrl, FileUpload), body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user