修改支付宝小程序授权

This commit is contained in:
邹宗楠
2023-03-31 09:33:11 +08:00
parent 980fb17b1d
commit 352bb15636
3 changed files with 15 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ import (
"encoding/base64"
"encoding/pem"
"fmt"
"git.rosy.net.cn/baseapi/utils"
"io/ioutil"
"net/http"
"sort"
@@ -16,7 +17,6 @@ import (
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/platformapi"
"git.rosy.net.cn/baseapi/utils"
)
const (
@@ -131,7 +131,7 @@ func (a *API) AccessAPI(method string, params, bizContent map[string]interface{}
fullURL := utils.GenerateGetURL(prodURL, "", params)
if isPost {
request, _ = http.NewRequest(http.MethodPost, prodURL, strings.NewReader(utils.Map2URLValues(params).Encode()))
request, _ = http.NewRequest(http.MethodPost, prodURL, strings.NewReader(utils.Map2URLValues(bizContent).Encode()))
} else {
request, _ = http.NewRequest(http.MethodGet, fullURL, nil)
}