Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
hjm 5 years ago
commit 27792d3362

@ -73,8 +73,7 @@ class UsersController < ApplicationController
@user_url = "/users/#{@user.login}"
@career = Career.where(status: true).order("created_at asc").pluck(:id, :name)
ec_user = EcSchoolUser.where(:user_id => current_user.id).first
@auth = ec_user ? "#{@old_domain}/ecs/department?school_id=#{ec_user.school_id}" : nil
@auth = User.current.ec_school.present? ? "#{@old_domain}/ecs/department?school_id=#{User.current.ec_school}" : nil
end
# 用户回复功能

@ -497,6 +497,13 @@ class User < ApplicationRecord
)
end
# 工程认证的学校
def ec_school
school_id = self.ec_school_users.pluck(:school_id).first ||
self.ec_major_schools.pluck(:school_id).first ||
(self.ec_course_users.first && self.ec_course_users.first.try(:ec_course).try(:ec_year).try(:ec_major_school).try(:school_id))
end
# 登录,返回用户名与密码匹配的用户
def self.try_to_login(login, password)
login = login.to_s.strip

@ -5,7 +5,7 @@
margin-top: 16px;
float: left;
width: 97px;}
.head-nav{float: left;width: 780px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav{float: left;width: 830px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;}
.head-nav ul#header-nav li{float: left;height: 60px;line-height: 60px;margin-right: 30px;cursor: pointer;position: relative;font-size: 16px}
.head-nav ul#header-nav li a{display: block;height: 100%;width: 100%;color: #fff}

@ -360,7 +360,7 @@ class LoginDialog extends Component {
if(response.status===200){
if (response.data.status === 402) {
window.location.href = response.data.url;
// window.location.href = response.data.url;
}else if (response.data.status === -2) {
notification.open({
message: '提示',

@ -362,6 +362,9 @@ class LoginRegisterComponent extends Component {
if(weekArray===null){
weekArray="/";
}
if(weekArray==="null"){
weekArray="/";
}
window.location.href = weekArray;
}
}

@ -40,6 +40,9 @@ class Notcompletedysl extends Component {
if(weekArray===null){
weekArray="/";
}
if(weekArray==="null"){
weekArray="/";
}
window.location.href = weekArray;
}

@ -5,7 +5,7 @@
margin-top: 16px;
float: left;
width: 97px;}
.head-nav{float: left;width: 780px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav{float: left;width:830px;text-align: center;height: 60px;box-sizing: border-box; min-width: 400px;}
.head-nav ul#header-nav{position: absolute;top: 0px;z-index: 3;height: 60px;box-sizing: border-box;}
.head-nav ul#header-nav li{float: left;height: 60px;line-height: 60px;margin-right: 30px;cursor: pointer;position: relative;font-size: 16px}
.head-nav ul#header-nav li a{display: block;height: 100%;width: 100%;color: #fff}

Loading…
Cancel
Save