- update WxaGetWxaCodeUnLimit

master v1.0.27
李光春 2 years ago
parent b1dd60284d
commit b34320ffa3

@ -3,5 +3,5 @@ package wechatopen
const (
apiUrl = "https://api.weixin.qq.com"
logTable = "wechatopen"
Version = "1.0.26"
Version = "1.0.27"
)

@ -92,5 +92,5 @@ require (
gorm.io/gorm v1.23.8 // indirect
mellium.im/sasl v0.3.0 // indirect
xorm.io/builder v0.3.12 // indirect
xorm.io/xorm v1.3.1 // indirect
xorm.io/xorm v1.3.2 // indirect
)

@ -905,5 +905,5 @@ sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
xorm.io/builder v0.3.12 h1:ASZYX7fQmy+o8UJdhlLHSW57JDOkM8DNhcAF5d0LiJM=
xorm.io/builder v0.3.12/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=
xorm.io/xorm v1.3.1 h1:z5egKrDoOLqZFhMjcGF4FBHiTmE5/feQoHclfhNidfM=
xorm.io/xorm v1.3.1/go.mod h1:9NbjqdnjX6eyjRRhh01GHm64r6N9shTb/8Ak3YRt8Nw=
xorm.io/xorm v1.3.2 h1:uTRRKF2jYzbZ5nsofXVUx6ncMaek+SHjWYtCXyZo1oM=
xorm.io/xorm v1.3.2/go.mod h1:9NbjqdnjX6eyjRRhh01GHm64r6N9shTb/8Ak3YRt8Nw=

@ -46,9 +46,13 @@ func (c *Client) WxaGetWxaCodeUnLimit(ctx context.Context, notMustParams ...gore
}
// 定义
var response WxaGetWxaCodeUnLimitResponse
err = json.Unmarshal(request.ResponseBody, &response)
if err != nil {
return nil, err
// 判断内容是否为图片
if request.HeaderIsImg() {
} else {
err = json.Unmarshal(request.ResponseBody, &response)
if err != nil {
return nil, err
}
}
return newWxaGetWxaCodeUnLimitResult(response, request.ResponseBody, request), nil
}

Loading…
Cancel
Save