This commit is contained in:
邹宗楠
2022-12-06 14:09:27 +08:00
parent 4af9b84f2f
commit 677572a3bd
2 changed files with 7 additions and 3 deletions

View File

@@ -188,8 +188,8 @@ func (a *API) MiniProgramSortLink() (string, error) {
bodyJson := map[string]interface{}{
//"access_token ": weChatToken,
"expire_type ": 1,
"expire_time": 1,
"expire_type": 1,
"expire_interval": 1,
}
body, _ := json.Marshal(bodyJson)
result, err := a.AccessAPI("wxa/generate_urllink", parmaJson, string(body))
@@ -197,7 +197,8 @@ func (a *API) MiniProgramSortLink() (string, error) {
return "", err
}
if result["errcode"] != 0 {
errCode, _ := result["errcode"].(json.Number).Int64()
if errCode != 0 {
return "", errors.New(result["errmsg"].(string))
}