From a7606d41dd63bdab08ed1f5f27a50250fcae2ba9 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Fri, 26 Jul 2019 10:55:57 +0800 Subject: [PATCH] add flag to redirect user profile --- app/helpers/application_helper.rb | 2 +- app/views/competitions/_qg_second_opensource.html.erb | 2 +- app/views/competitions/enroll.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5737f99b..10e64bcf 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -629,7 +629,7 @@ module ApplicationHelper end =end if !User.current.profile_completed? - redirect_to my_account_path + redirect_to my_account_path(need_profile_completed: true) Rails.logger.info("check_authentication end") elsif User.current.certification != 1 # 系统没有授权 day_cer = UserDayCertification.where(:user_id => User.current.id).last diff --git a/app/views/competitions/_qg_second_opensource.html.erb b/app/views/competitions/_qg_second_opensource.html.erb index 47fc814b..87847a46 100644 --- a/app/views/competitions/_qg_second_opensource.html.erb +++ b/app/views/competitions/_qg_second_opensource.html.erb @@ -74,7 +74,7 @@ } if (<%= !@user.profile_completed? %>) { - userProfileModal('/my/account', '您需要去完善您的个人资料,才能使用此功能'); + userProfileModal('/my/account?need_profile_completed=true', '您需要去完善您的个人资料,才能使用此功能'); return } diff --git a/app/views/competitions/enroll.html.erb b/app/views/competitions/enroll.html.erb index c2a3d029..d5dde153 100644 --- a/app/views/competitions/enroll.html.erb +++ b/app/views/competitions/enroll.html.erb @@ -161,7 +161,7 @@ var htmlvalue = '
提示
'+ '

您需要去完善您的个人资料,才能使用此功能

' + '
'; + '立即完善'; pop_box_new(htmlvalue, 480, 205); }