Skip to content

Commit

Permalink
Merge pull request #591 from ArtisanCloud/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Matrix-X authored Dec 19, 2024
2 parents 1713bce + d172c92 commit 38a5032
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/openPlatform/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (app *OpenPlatform) MiniProgram(appID string, refreshToken string, accessTo
app.Config.GetString("token", ""),
app.Config.GetString("aes_key", ""),
)
application.Auth, err = auth3.NewClient(app, application)
application.Auth, err = auth3.NewClient(application, app)

return application, err

Expand Down
11 changes: 6 additions & 5 deletions src/openPlatform/authorizer/miniProgram/code/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/ArtisanCloud/PowerLibs/v3/object"
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
response2 "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/response"
response4 "github.com/ArtisanCloud/PowerWeChat/v3/src/work/media/response"
"github.com/ArtisanCloud/PowerWeChat/v3/src/openPlatform/authorizer/miniProgram/code/request"
"github.com/ArtisanCloud/PowerWeChat/v3/src/openPlatform/authorizer/miniProgram/code/response"
"net/http"
Expand Down Expand Up @@ -44,16 +45,16 @@ func (comp *Client) Commit(ctx context.Context, templateID string, extJson strin

// 获取体验版二维码
// https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/code/get_qrcode.html
func (comp *Client) GetQrCode(ctx context.Context, path string) (*response2.ResponseOpenPlatform, error) {
func (comp *Client) GetQrCode(ctx context.Context, path string) (*http.Response, error) {

result := &response2.ResponseOpenPlatform{}
var header = &response4.ResponseHeaderMedia{}

_, err := comp.BaseClient.RequestRaw(ctx, "wxa/get_qrcode", http.MethodPost, &object.HashMap{
rs, err := comp.BaseClient.RequestRaw(ctx, "wxa/get_qrcode", http.MethodGet, &object.HashMap{
"query": &object.StringMap{
"path": path,
}}, nil, result)
}}, &header, nil)

return result, err
return rs, err

}

Expand Down

0 comments on commit 38a5032

Please sign in to comment.