This commit is contained in:
parent
c522d7160c
commit
9a9f6400da
|
@ -13,7 +13,7 @@ class WechatsController < ActionController::Base
|
||||||
if !uw
|
if !uw
|
||||||
return sendBind()
|
return sendBind()
|
||||||
else
|
else
|
||||||
return join_class({invite_code: content}, uw.user)
|
return join_class({invite_code: content}, uw.user, request)
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.error e.inspect
|
logger.error e.inspect
|
||||||
|
@ -53,7 +53,7 @@ class WechatsController < ActionController::Base
|
||||||
if !uw
|
if !uw
|
||||||
return sendBind()
|
return sendBind()
|
||||||
else
|
else
|
||||||
return join_class({ticket: ticket}, uw.user)
|
return join_class({ticket: ticket}, uw.user, request)
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.error e.inspect
|
logger.error e.inspect
|
||||||
|
@ -187,7 +187,7 @@ class WechatsController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def join_class(params, user)
|
def join_class(params, user, request)
|
||||||
course = nil
|
course = nil
|
||||||
course = Course.where(qrcode: params[:ticket]).first if params[:ticket]
|
course = Course.where(qrcode: params[:ticket]).first if params[:ticket]
|
||||||
course = Course.where(invite_code: params[:invite_code]).first if params[:invite_code]
|
course = Course.where(invite_code: params[:invite_code]).first if params[:invite_code]
|
||||||
|
|
Loading…
Reference in New Issue