This commit is contained in:
guange 2016-06-24 15:42:00 +08:00
parent c522d7160c
commit 9a9f6400da
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ class WechatsController < ActionController::Base
if !uw
return sendBind()
else
return join_class({invite_code: content}, uw.user)
return join_class({invite_code: content}, uw.user, request)
end
rescue => e
logger.error e.inspect
@ -53,7 +53,7 @@ class WechatsController < ActionController::Base
if !uw
return sendBind()
else
return join_class({ticket: ticket}, uw.user)
return join_class({ticket: ticket}, uw.user, request)
end
rescue => e
logger.error e.inspect
@ -187,7 +187,7 @@ class WechatsController < ActionController::Base
end
end
def join_class(params, user)
def join_class(params, user, request)
course = nil
course = Course.where(qrcode: params[:ticket]).first if params[:ticket]
course = Course.where(invite_code: params[:invite_code]).first if params[:invite_code]