From ed17526c79429d3a4b4afe0ca3cfdd37069e0709 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 2 Dec 2019 16:04:10 +0800 Subject: [PATCH] 1 --- app/controllers/weapps/code_sessions_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/weapps/code_sessions_controller.rb b/app/controllers/weapps/code_sessions_controller.rb index 2dbd08e82..350fa4978 100644 --- a/app/controllers/weapps/code_sessions_controller.rb +++ b/app/controllers/weapps/code_sessions_controller.rb @@ -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