Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forge
cxt 5 years ago
commit 2d29187d26

@ -6,7 +6,9 @@ class Weapps::CodeSessionsController < Weapps::BaseController
logged = false
result = Wechat::Weapp.jscode2session(params[:code])
Rails.logger.info("###########result: #{result}")
Rails.logger.info("###########result: #{result['session_key']}")
Rails.logger.info("###########result: #{result['unionid']}")
# 能根据 code 拿到 unionid
open_user = OpenUsers::Wechat.find_by(uid: result['unionid'])
if open_user.present? && open_user.user

Loading…
Cancel
Save