修改获取用户关注公众号结果
This commit is contained in:
parent
4eec1f5d4e
commit
7c222373dc
|
@ -64,24 +64,6 @@ module Mobile
|
||||||
Rails.logger.info user_info
|
Rails.logger.info user_info
|
||||||
subscribe = user_info["subscribe"]
|
subscribe = user_info["subscribe"]
|
||||||
|
|
||||||
# access_token = session[:access_token]
|
|
||||||
# refresh_token = session[:refresh_token]
|
|
||||||
#
|
|
||||||
# if access_token.present? && refresh_token.present?
|
|
||||||
# refreshinfo = Wechat.api.web_refresh_access_token(refresh_token)
|
|
||||||
#
|
|
||||||
# access_token = refreshinfo["access_token"]
|
|
||||||
# refresh_token = refreshinfo["refresh_token"]
|
|
||||||
# session[:access_token] = access_token
|
|
||||||
# session[:refresh_token] = refresh_token
|
|
||||||
#
|
|
||||||
# #获取用户信息
|
|
||||||
# user_info = Wechat.api.web_user_info(access_token,openid)
|
|
||||||
# Rails.logger.info "user_info!!!!!!!!!"
|
|
||||||
# Rails.logger.info user_info
|
|
||||||
# subscribe = user_info["subscribe"]
|
|
||||||
# end
|
|
||||||
|
|
||||||
status = 0
|
status = 0
|
||||||
tip = 0 #0班级1项目
|
tip = 0 #0班级1项目
|
||||||
type = params[:type]
|
type = params[:type]
|
||||||
|
|
|
@ -139,9 +139,5 @@ module Wechat
|
||||||
get 'userinfo', params: { access_token: web_access_token, openid: openid, lang: lang }, base: OAUTH2_USERINFO
|
get 'userinfo', params: { access_token: web_access_token, openid: openid, lang: lang }, base: OAUTH2_USERINFO
|
||||||
end
|
end
|
||||||
|
|
||||||
def web_user_info(web_access_token, openid, lang = 'zh_CN')
|
|
||||||
get 'user/info', params: { access_token: web_access_token, openid: openid, lang: lang }, base: API_BASE
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue