$(function() {
if (usertype == '2') {
getLineData();
} else if (usertype == '1') {
var isspview = window.localStorage.getItem("isspview");
if (isspview && isspview == '1') {
$("#splist").css('display', 'none');
$("#sproom").css('display', 'block');
$("#backicon").css('display', 'none');
$("#spComment").css('display', 'none');
$("#hangdiv").css('display', 'none');
}
setTimeout(function() {
if (isspview && isspview == '1') {
sendCommentAllow();
joinRoom();
window.localStorage.setItem("isspview", "2");
}
}, 1000);
}
});
function getLineData(nowuid) {
$("#nowresume").addClass('none');
showLoading();
$.post("index.php?c=getLineData", {
'sid': sid,
'nowuid': nowuid
}, function(data) {
hideLoading();
if (data.errorcode == '9') {
$('#subnum').text(data.subnum);
$('#linenum').text(data.linenum);
$('#msnum').text(data.msnum);
if (data.msnum) {
var msdata = {
msnum: data.msnum,
msuid: viewuid
};
roomMessage(msdata);
}
viewuid = data.nowuid;
var ehtml = '';
if (data.expects) {
$("#nouser").css('display', 'none');
var expects = data.expects;
for (let i in expects) {
ehtml += '
';
ehtml += '
';
ehtml += '
';
ehtml += '

';
ehtml += '
' + expects[i].uname;
ehtml += '
查看简历';
ehtml += '
预约职位:' + expects[i].jobname + '
'
if (viewuid && viewuid == expects[i].uid) {
ehtml += '
面试中';
} else {
ehtml += '
面试TA';
}
ehtml += '
暂离';
ehtml += ' ';
offlineList.push(expects[i].uid);
}
} else {
$("#nouser").css('display', 'block');
}
$('#waitingUser').html(ehtml);
if (nowuid) {
// 发送视频面试通知
sendComment(nowuid, data.jobid);
}
} else {
showToast(data.msg)
return false;
}
},'json');
}
function nowresume(eid, jobid) {
showLoading();
$.post(nowresumeUrl, {
'eid': eid
}, function(data) {
hideLoading();
var expect = data.data;
var rhtml = '' + expect.uname + '
';
rhtml += '' + expect.sex_n;
rhtml += expect.age ? '|' + expect.age + '岁' : '';
rhtml += expect.liveing ? '|' + expect.liveing : '';
rhtml += expect.edu_n ? '|' + expect.edu_n : '';
rhtml += expect.exp_n ? '|' + expect.exp_n : '';
rhtml += '
';
rhtml += '求职意向
';
rhtml += '';
rhtml += '
期望职位:' + expect.r_name + '
';
rhtml += '
工作地点:' + expect.cityname + '
';
rhtml += '
从事行业:' + expect.hy + '
';
rhtml += '
期望薪资:' + expect.salary + '
';
rhtml += '
到岗时间:' + expect.report + '
';
rhtml += '
工作性质:' + expect.type + '
';
rhtml += '
求职状态:' + expect.jobstatus + '
';
rhtml += '
工作职能:' + expect.expectjob + '
';
rhtml += '
';
if (expect.user_work && expect.user_work.length > 0) {
var work = expect.user_work;
rhtml += '工作经历
';
for (let i in work) {
rhtml += '';
rhtml += '
' + work[i].name + '
';
rhtml += '
' + work[i].title + '
';
rhtml += '
' + work[i].date_n + '
';
rhtml += '
' + work[i].content + '
';
rhtml += '
';
}
}
if (expect.user_edu && expect.user_edu.length > 0) {
var edu = expect.user_edu;
rhtml += '教育经历
';
for (let i in edu) {
rhtml += '';
rhtml += '
' + edu[i].name + '
';
rhtml += '
' + edu[i].education_n + '
';
rhtml += '
' + edu[i].specialty + '
';
rhtml += '
' + edu[i].date_n + '
';
rhtml += '
';
}
}
if (expect.user_xm && expect.user_xm.length > 0) {
var project = expect.user_xm;
rhtml += '项目经历
';
for (let i in project) {
rhtml += '';
rhtml += '
' + project[i].name + '
';
rhtml += '
' + project[i].title + '
';
rhtml += '
' + project[i].date_n + '
';
rhtml += '
' + project[i].content + '
';
rhtml += '
';
}
}
if (expect.user_tra && expect.user_tra.length > 0) {
var train = expect.user_tra;
rhtml += '培训经历
';
for (let i in train) {
rhtml += '';
rhtml += '
' + train[i].name + '
';
rhtml += '
' + train[i].title + '
';
rhtml += '
' + train[i].date_n + '
';
rhtml += '
' + train[i].content + '
';
rhtml += '
';
}
}
if (expect.user_skill && expect.user_skill.length > 0) {
var skill = expect.user_skill;
rhtml += '职业技能
';
for (let i in skill) {
rhtml += '';
rhtml += '
技能名称:' + skill[i].name + '
';
rhtml += '
掌握时间:' + skill[i].longtime + '年
';
rhtml += '
熟练程度:' + skill[i].ing_n + '
';
rhtml += '
';
}
}
if (expect.user_other && expect.user_other.length > 0) {
var other = expect.user_other;
rhtml += '其他信息
';
for (let i in other) {
rhtml += '';
rhtml += '
' + other[i].name + '
';
rhtml += '
' + other[i].content + '
';
rhtml += '
';
}
}
if (expect.description || expect.tag) {
rhtml += '自我评价
';
if (expect.tag) {
rhtml += '' + expect.tag + '
';
}
if (expect.description) {
rhtml += '' + expect.description + '
';
}
}
rhtml += '';
rhtml += '
';
if (viewuid && viewuid == expect.uid) {
// 有正在面试中的
rhtml += '
继续面试';
} else {
rhtml += '
面试TA';
}
rhtml += '
';
$("#rinfo").html(rhtml);
$("#nowresume").css('display', 'block');
},'json')
}
function closeResume() {
$("#nowresume").css('display', 'none');
}