From 7c222373dc76b90231d1ca9d94c03b3893a0a3f6 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Sun, 14 Aug 2016 09:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=85=B3=E6=B3=A8=E5=85=AC=E4=BC=97=E5=8F=B7=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/new_comment.rb | 18 ------------------ lib/wechat/lib/wechat/api.rb | 4 ---- 2 files changed, 22 deletions(-) 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