diff --git a/app/api/mobile/apis/new_comment.rb b/app/api/mobile/apis/new_comment.rb index 298651e42..e5e42e624 100644 --- a/app/api/mobile/apis/new_comment.rb +++ b/app/api/mobile/apis/new_comment.rb @@ -64,24 +64,6 @@ module Mobile Rails.logger.info user_info 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 tip = 0 #0班级1项目 type = params[:type] diff --git a/lib/wechat/lib/wechat/api.rb b/lib/wechat/lib/wechat/api.rb index a7883ffe3..f267f8b69 100644 --- a/lib/wechat/lib/wechat/api.rb +++ b/lib/wechat/lib/wechat/api.rb @@ -139,9 +139,5 @@ module Wechat get 'userinfo', params: { access_token: web_access_token, openid: openid, lang: lang }, base: OAUTH2_USERINFO 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