|
|
@@ -92,14 +92,17 @@ function jobUuzc() {
|
|
|
var loginUrl = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=login';
|
|
|
$.get('uuzc/account/check', function(data) {
|
|
|
var user = data.user;
|
|
|
- if(data.usertype == 'company' && !data.ishr) {// 如果是企业账号并且未设置hr账号,停留在当前页,其他的都跳转到人才招聘页
|
|
|
+ if(data.usertype == 'hr') { // 账号类型是hr直接登录
|
|
|
+ loginJobUuzc(user, loginUrl, 'hr');
|
|
|
+ setTimeout(window.location.href = url, 200);
|
|
|
+ } else if(data.usertype == 'company' && !data.ishr) {// 如果是企业账号并且未设置hr账号,停留在当前页,其他的都跳转到人才招聘页
|
|
|
if(data.hr) {// 如果企业存在hr账号,直接跳转
|
|
|
loginJobUuzc(user, loginUrl, data.usertype);
|
|
|
setTimeout(window.location.href = url, 200);
|
|
|
} else {
|
|
|
return;
|
|
|
}
|
|
|
- } else if(null != data && null != data.usertype) {
|
|
|
+ } else if(data.usertype == 'personal') {
|
|
|
loginJobUuzc(user, loginUrl, data.usertype);
|
|
|
setTimeout(window.location.href = url, 200);
|
|
|
} else {
|
|
|
@@ -115,12 +118,9 @@ function jobUuzcGet() {
|
|
|
var url = 'http://job.uuzcc.com/';
|
|
|
var loginUrl = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=login';
|
|
|
$.get('uuzc/account/check', function(data) {
|
|
|
- if(data.info) {
|
|
|
- toastr.error(data.info);
|
|
|
- }
|
|
|
var user = data.user;
|
|
|
if(null != data && 'personal' == data.usertype) {
|
|
|
- toastr.info("您的账号为个人账号,不可进行此操作");
|
|
|
+ toastr.error("您的账号为个人账号,不可进行此操作");
|
|
|
} else if(null != data && 'company' == data.usertype) {
|
|
|
if(data.ishr) {//如果是hr直接登录
|
|
|
loginJobUuzc(user, loginUrl, 'company');
|
|
|
@@ -130,10 +130,10 @@ function jobUuzcGet() {
|
|
|
if(data.manager) {// 管理员停留设置hr
|
|
|
window.location.href = window.location.origin + window.location.pathname + "setHrAccount";
|
|
|
} else {
|
|
|
- toastr.info('请通知管理员' + data.managerName + '设置HR账号');
|
|
|
+ toastr.error('请通知管理员' + data.managerName + '设置HR账号');
|
|
|
}
|
|
|
} else {// 如果企业存在hr
|
|
|
- toastr.info('您的账号非HR账号,不可进行此操作');
|
|
|
+ toastr.error('您的账号非HR账号,不可进行此操作');
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -149,17 +149,15 @@ function jobUuzcPost() {
|
|
|
var url = 'http://job.uuzcc.com/';
|
|
|
var loginUrl = 'http://job.uuzcc.com/index.php?m=&c=ubtob&a=login';
|
|
|
$.get('uuzc/account/check', function(data) {
|
|
|
- if(data.ishr) {
|
|
|
- toastr.info('您的账号为HR账号,不能进行此操作');
|
|
|
- return;
|
|
|
- }
|
|
|
- if(data.info) {
|
|
|
- toastr.info(data.info);
|
|
|
- }
|
|
|
- var user = data.user;
|
|
|
- if(null != data && null != data.usertype) {
|
|
|
- loginJobUuzc(user, loginUrl, data.usertype);
|
|
|
- setTimeout(window.location.href = url, 200);
|
|
|
+ if(null != data.usertype) {
|
|
|
+ var user = data.user;
|
|
|
+ if(data.usertype == 'hr') {
|
|
|
+ toastr.error('您的账号为HR账号,不能进行此操作');
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ loginJobUuzc(user, loginUrl, data.usertype);
|
|
|
+ setTimeout(window.location.href = url, 200);
|
|
|
+ }
|
|
|
} else {// 求职时可以未登录
|
|
|
data.content && (window.location.href = url);
|
|
|
}
|
|
|
@@ -208,18 +206,18 @@ function addHrAccount() {
|
|
|
var result = data.result;
|
|
|
if(result == 'success') {
|
|
|
toastr.success('设置HR账号成功');
|
|
|
- setTimeout(window.location.href = 'http://www.ubtob.com/#/uuzcJob', 200);
|
|
|
+ setTimeout(window.location.href = 'http://www.ubtob.com/#/uuzcJob', 500);
|
|
|
}
|
|
|
if(result == 'exist') {
|
|
|
- toastr.info('该企业HR账号已存在');
|
|
|
+ toastr.error('该企业HR账号已存在');
|
|
|
}
|
|
|
if(result == 'setFailure') {
|
|
|
- toastr.error('设置HR账号失败');
|
|
|
+ toastr.erroror('设置HR账号失败');
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
error: function (error) {
|
|
|
- toastr.error(error);
|
|
|
+ toastr.erroror(error);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -244,18 +242,18 @@ function setHrAccount() {
|
|
|
var result = data.result;
|
|
|
if(result == 'success') {
|
|
|
toastr.success('设置HR账号成功');
|
|
|
- setTimeout(window.location.href = 'http://www.ubtob.com/#/uuzcJob', 200);
|
|
|
+ setTimeout(window.location.href = 'http://www.ubtob.com/#/uuzcJob', 500);
|
|
|
}
|
|
|
if(result == 'exist') {
|
|
|
- toastr.info('该企业HR账号已存在');
|
|
|
+ toastr.error('该企业HR账号已存在');
|
|
|
}
|
|
|
if(result == 'setFailure') {
|
|
|
- toastr.error('设置HR账号失败');
|
|
|
+ toastr.erroror('设置HR账号失败');
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
error: function (error) {
|
|
|
- toastr.error(error);
|
|
|
+ toastr.erroror(error);
|
|
|
}
|
|
|
});
|
|
|
}
|