This commit is contained in:
yuanke 2016-08-22 10:04:31 +08:00
parent eaf6706e34
commit be95b3990d
1 changed files with 7 additions and 7 deletions

View File

@ -419,9 +419,9 @@ class WechatsController < ActionController::Base
logger.info "user_activities!!!!!!!!!!!!!!" logger.info "user_activities!!!!!!!!!!!!!!"
logger.info params logger.info params
# unless (user_binded?(open_id) || params[:state] == "invite_code" || params[:state] == "project_invite_code" || params[:state] == "blog_comment" || params[:state] == "course_notice" || params[:state] == "project_discussion" || params[:state] == "course_discussion" || params[:state] == "homework" || params[:state] == "issues" || params[:state] == "journal_for_message") unless (user_binded?(open_id) || params[:state] == "invite_code" || params[:state] == "project_invite_code" || params[:state] == "blog_comment" || params[:state] == "course_notice" || params[:state] == "project_discussion" || params[:state] == "course_discussion" || params[:state] == "homework" || params[:state] == "issues" || params[:state] == "journal_for_message")
# @path = '/login' @path = '/login'
# else else
if params[:state] == 'myclass' if params[:state] == 'myclass'
@course_id = params[:id]; @course_id = params[:id];
elsif params[:state] == 'myproject' elsif params[:state] == 'myproject'
@ -431,15 +431,15 @@ class WechatsController < ActionController::Base
session[:wechat_openid] = open_id session[:wechat_openid] = open_id
if params[:code] if params[:code]
if params[:userid] if params[:userid]
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&userid=#{params[:userid]}" and return render "/wechat/user_activities##{@path}?id=#{params[:id]}&userid=#{params[:userid]}" and return
elsif params[:id] elsif params[:id]
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return render "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
else else
redirect_to "/wechat/user_activities##{@path}" and return render "/wechat/user_activities##{@path}" and return
end end
# redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return # redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
end end
# end end
render 'wechats/user_activities', layout: nil render 'wechats/user_activities', layout: nil
end end