This commit is contained in:
parent
fd036d758e
commit
ded55ca022
|
@ -440,14 +440,17 @@ class WechatsController < ActionController::Base
|
||||||
|
|
||||||
private
|
private
|
||||||
def get_openid_from_code(code)
|
def get_openid_from_code(code)
|
||||||
|
info = wechat.web_access_token(code)
|
||||||
|
logger.info "web_access_token!!!!!!!!!!!!"
|
||||||
|
logger.info info
|
||||||
return 'oCnvgvz8R7QheXE-R9Kkr39j8Ndg' if code =='only-for-test'
|
return 'oCnvgvz8R7QheXE-R9Kkr39j8Ndg' if code =='only-for-test'
|
||||||
openid = session[:wechat_openid]
|
openid = session[:wechat_openid]
|
||||||
unless openid
|
unless openid
|
||||||
if code
|
if code
|
||||||
openid = wechat.web_access_token(code)["openid"]
|
openid = wechat.web_access_token(code)["openid"]
|
||||||
info = wechat.web_access_token(code)
|
# info = wechat.web_access_token(code)
|
||||||
logger.info "web_access_token!!!!!!!!!!!!"
|
# logger.info "web_access_token!!!!!!!!!!!!"
|
||||||
logger.info info
|
# logger.info info
|
||||||
# access_token = wechat.web_access_token(code)["access_token"]
|
# access_token = wechat.web_access_token(code)["access_token"]
|
||||||
# if access_token
|
# if access_token
|
||||||
# session[:access_token] = access_token
|
# session[:access_token] = access_token
|
||||||
|
|
Loading…
Reference in New Issue