Compare commits
No commits in common. "e87107462af7e5ef5f82fd4747752a2d192a531b" and "5762064979c4bb57fc9341c62a2c6e87a0e03a47" have entirely different histories.
e87107462a
...
5762064979
|
@ -39,9 +39,6 @@ func (o *MpSdk) GetUserInfoByJsCode(code string) (*UserInfo, error) {
|
||||||
userInfo := new(UserInfo)
|
userInfo := new(UserInfo)
|
||||||
|
|
||||||
g := gjson.ParseBytes(body)
|
g := gjson.ParseBytes(body)
|
||||||
if g.Get("errcode").Int() != 0 {
|
|
||||||
return nil, errors.New(string(body))
|
|
||||||
}
|
|
||||||
userInfo.Openid = g.Get("openid").String()
|
userInfo.Openid = g.Get("openid").String()
|
||||||
userInfo.Unionid = g.Get("unionid").String()
|
userInfo.Unionid = g.Get("unionid").String()
|
||||||
return userInfo, nil
|
return userInfo, nil
|
||||||
|
|
Loading…
Reference in New Issue