|
@@ -179,10 +179,13 @@ type WxUserInfo struct {
|
|
|
}
|
|
|
|
|
|
type QRCodeRequest struct {
|
|
|
- Path string `json:"path"`
|
|
|
- Width int `json:"width,omitempty"`
|
|
|
- AutoColor bool `json:"auto_color,omitempty"`
|
|
|
- LineColor struct {
|
|
|
+ Page string `json:"page"`
|
|
|
+ Scene string `json:"scene"`
|
|
|
+ CheckPath bool `json:"check_path"`
|
|
|
+ Width int `json:"width,omitempty"`
|
|
|
+ EnvVersion string `json:"env_version"`
|
|
|
+ AutoColor bool `json:"auto_color,omitempty"`
|
|
|
+ LineColor struct {
|
|
|
R int `json:"r"`
|
|
|
G int `json:"g"`
|
|
|
B int `json:"b"`
|
|
@@ -199,11 +202,14 @@ func (cli *Client) GenerateQRCode(code, path string) ([]byte, error) {
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- api := fmt.Sprintf("%s%s?access_token=%s", baseURL, "/cgi-bin/wxaapp/createwxaqrcode", accessToken)
|
|
|
+ api := fmt.Sprintf("%s%s?access_token=%s", baseURL, "/wxa/getwxacodeunlimit", accessToken)
|
|
|
reqBody := QRCodeRequest{
|
|
|
- Path: path,
|
|
|
- Width: 430,
|
|
|
- AutoColor: true,
|
|
|
+ Page: path,
|
|
|
+ Scene: "id=32",
|
|
|
+ Width: 1280,
|
|
|
+ CheckPath: false,
|
|
|
+ EnvVersion: "develop",
|
|
|
+ AutoColor: true,
|
|
|
LineColor: struct {
|
|
|
R int `json:"r"`
|
|
|
G int `json:"g"`
|