diff --git a/app/controllers/ec_years_controller.rb b/app/controllers/ec_years_controller.rb index 6baf5d58..5e9063f1 100644 --- a/app/controllers/ec_years_controller.rb +++ b/app/controllers/ec_years_controller.rb @@ -239,7 +239,7 @@ class EcYearsController < ApplicationController template_file = EcTemplate.find_by_name "课程列表导入模板" if template_file.present? file = template_file.attachments.first - @file_url = '' #"/attachments/download/#{file.id}/#{file.filename}" + @file_url = "/attachments/download/#{file.id}/#{file.filename}" else @file_url = "javascript:void(0);" end diff --git a/app/controllers/ecs_controller.rb b/app/controllers/ecs_controller.rb index 12b6b5d9..943d6d40 100644 --- a/app/controllers/ecs_controller.rb +++ b/app/controllers/ecs_controller.rb @@ -58,8 +58,7 @@ class EcsController < ApplicationController # 获取工程认证头部url # GET: /ecs/get_navigation_url def get_navigation_url - ec_user = EcSchoolUser.where(:user_id => User.current.id).first - ec_url = "#{department_ecs_path(:school_id => ec_user.school_id)}" if ec_user + ec_url = "#{department_ecs_path(:school_id => User.current.ec_school)}" if User.current.ec_school.present? render :json => {ec_url: ec_url, project_packages_url: "/crowdsourcing" } end diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index af2b7fb6..6d521f3a 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -404,13 +404,13 @@ class NewHeader extends Component { -