This commit is contained in:
xxj
2025-01-10 23:31:42 +08:00
parent 6b02a347fe
commit 8c2653597f

View File

@@ -47,10 +47,11 @@ func (_wx *wxTools) GetWebOauth(code string) (*AccessToken, error) {
}
var res AccessToken
json.Unmarshal(body, &res)
if res.Openid == "" {
mylog.Error(string(body))
return nil, fmt.Errorf("GetWebOauth error:%v", string(body))
err = json.Unmarshal(body, &res)
if err != nil {
mylog.Error(err, string(body))
return nil, err
}
return &res, nil
}