获取用户昵称修改
This commit is contained in:
parent
ae13435de6
commit
cfbbe3ab89
|
@ -7,6 +7,7 @@ module Wechat
|
||||||
class Api < ApiBase
|
class Api < ApiBase
|
||||||
API_BASE = 'https://api.weixin.qq.com/cgi-bin/'
|
API_BASE = 'https://api.weixin.qq.com/cgi-bin/'
|
||||||
OAUTH2_BASE = 'https://api.weixin.qq.com/sns/oauth2/'
|
OAUTH2_BASE = 'https://api.weixin.qq.com/sns/oauth2/'
|
||||||
|
OAUTH2_USERINFO = 'https://api.weixin.qq.com/sns'
|
||||||
|
|
||||||
def initialize(appid, secret, token_file, timeout, skip_verify_ssl, jsapi_ticket_file)
|
def initialize(appid, secret, token_file, timeout, skip_verify_ssl, jsapi_ticket_file)
|
||||||
@client = Client.new(API_BASE, timeout, skip_verify_ssl)
|
@client = Client.new(API_BASE, timeout, skip_verify_ssl)
|
||||||
|
@ -127,7 +128,7 @@ module Wechat
|
||||||
openid: openid,
|
openid: openid,
|
||||||
lang: "zh_CN"
|
lang: "zh_CN"
|
||||||
}
|
}
|
||||||
get 'userinfo', params: params, base: OAUTH2_BASE
|
get 'userinfo', params: params, base: OAUTH2_USERINFO
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue