diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 54cd15d6..97949807 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -159,20 +159,20 @@ class MyController < ApplicationController # 认证 - @trail_authentication = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").order("created_at desc").first - if @trail_authentication && (@trail_authentication.status == 1 || @trail_authentication.status == 2) && !@trail_authentication.noticed - @noticed_result = true - @trail_authentication.update_attribute("noticed", 1) - elsif @user.certification != 1 && (@trail_authentication.nil? || @trail_authentication.try(:status) != 0) - first_update = Grade.where(:user_id => @user.id, :container_id => @user.id, :container_type => 'Account').first - if first_update.present? && (Time.now.to_i - first_update.created_at.to_i) > 86400 && @user.user_day_certifications.last.present? && @user.user_day_certifications.last.status == 1 - @require_trail_auth = true - @user.user_day_certifications.update_all("status = 2") - @certification_expired = 1 - elsif first_update.present? && (Time.now.to_i - first_update.created_at.to_i) > 86400 - @require_trail_auth = true - end - end + # @trail_authentication = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").order("created_at desc").first + # if @trail_authentication && (@trail_authentication.status == 1 || @trail_authentication.status == 2) && !@trail_authentication.noticed + # @noticed_result = true + # @trail_authentication.update_attribute("noticed", 1) + # elsif @user.certification != 1 && (@trail_authentication.nil? || @trail_authentication.try(:status) != 0) + # first_update = Grade.where(:user_id => @user.id, :container_id => @user.id, :container_type => 'Account').first + # if first_update.present? && (Time.now.to_i - first_update.created_at.to_i) > 86400 && @user.user_day_certifications.last.present? && @user.user_day_certifications.last.status == 1 + # @require_trail_auth = true + # @user.user_day_certifications.update_all("status = 2") + # @certification_expired = 1 + # elsif first_update.present? && (Time.now.to_i - first_update.created_at.to_i) > 86400 + # @require_trail_auth = true + # end + # end =begin if @user.nickname.nil? || @user.lastname.nil? || ue.try(:identity).nil? || (ue.try(:identity) == 1 && ue.try(:student_id).blank?) || (ue.try(:identity) != 1 && ue.try(:technical_title).blank?) || ue.try(:location).nil? || ue.try(:location_city).nil? || ue.try(:gender).nil? || ue.try(:school_id).nil? diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 5103d7f9..6b33b461 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -3,11 +3,11 @@
- <% if @require_trail_auth %> - 试用申请 - <% else %> + <%# if @require_trail_auth %> + + <%# else %> 返回首页 - <% end %> + <%# end %> 退出 @@ -91,21 +91,21 @@