Merge branch 'weixin_guange' into develop

This commit is contained in:
yuanke 2016-08-14 12:06:52 +08:00
commit c16ea6d8be
2 changed files with 6 additions and 2 deletions

View File

@ -24,7 +24,7 @@ module Mobile
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

View File

@ -470,7 +470,11 @@ class WechatsController < ActionController::Base
def user_binded?(openid)
uw = UserWechat.where(openid: openid).first
uw && uw.bindtype == 0
if uw && uw.bindtype == 0
uw
else
nil
end
end
def current_url