From 21043d1a6c001403b0324ab22bd046ba8ee37141 Mon Sep 17 00:00:00 2001 From: Alec Zhou Date: Sun, 5 May 2019 17:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AA=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E7=94=A8=E6=88=B7=E7=82=B9=E5=87=BB=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E5=AE=9E=E6=88=98=E6=8C=89=E9=92=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=97=A0=E5=8F=8D=E5=BA=94=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- app/helpers/application_helper.rb | 5 ++--- app/views/shixuns/operation.js.erb | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index f6578f18..c60a9959 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -3,7 +3,7 @@ class ShixunsController < ApplicationController layout 'base_shixun' before_filter :require_login, :except => [:ghook, :download_file, :show, :index] - before_filter :check_authentication, :except => [:ghook, :download_file, :show, :index] + before_filter :check_authentication, :except => [:ghook, :download_file, :show, :index, :operation] before_filter :find_shixun, :except => [ :index, :new, :create, :index, :search, :shixun_courses, :new_disscuss, :shixun_migrate, :qrcode, :download_file, :departments, :get_mirror_script, :send_message_to_administrator] skip_before_filter :verify_authenticity_token, :only => [:ghook, :download_file] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e3dd080f..ade22d4e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -612,13 +612,12 @@ module ApplicationHelper =end user_e = UserExtensions.where(:user_id => User.current.id).first if User.current.lastname.blank? || user_e.school_id.blank? || user_e.identity.blank? || User.current.mail.blank? - redirect_to user_info_path() + redirect_to my_account_path Rails.logger.info("check_authentication end") - return elsif User.current.certification != 1 # 系统没有授权 day_cer = UserDayCertification.where(:user_id => User.current.id).last unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400 - redirect_to my_account_path() + redirect_to my_account_path Rails.logger.info("check_authentication end") return end diff --git a/app/views/shixuns/operation.js.erb b/app/views/shixuns/operation.js.erb index 2fabd57b..cc9535d7 100644 --- a/app/views/shixuns/operation.js.erb +++ b/app/views/shixuns/operation.js.erb @@ -1,6 +1,6 @@ <% if @mail %> flag=true; - sure_box_redirect_btn('<%= security_settings_path %>', '开启实训,请先绑定邮箱','绑定邮箱'); + sure_box_redirect_btn('<%= my_account_path %>', '开启实训,请先绑定邮箱','绑定邮箱'); <% else %> <% if @is_modify.blank? %> //为了防止浏览器阻挡,在实训路径中需要弹出新的页面,而实训首页又不需要弹出新的页面