您当前未绑定微信,绑定后可发起聊天。
使用微信扫一扫,按提示快速绑定
微信扫一扫
{{ weChatQrcodeContent }}
ata.userinfo.utype if (that.utype == 1) { that.memberUrl = qscms.locationList.indexCompany } else { that.memberUrl = qscms.locationList.indexPersonal } that.loginUsername = res.data.show_username that.preview_id = res.data.preview_id that.imWindowGlobal() } }).catch(function() {}) }, imWindowGlobal: function() { var that = this httpget(qscms.apiList.imGlobal, {}) .then(function(res) { if (res.code == 200) { //检测通过 if (res.data.next == '') { that.initWebSocket() } } else { console.log(res.message) } }) .catch(() => {}); }, initWebSocket: function() { var that = this httpget(qscms.apiList.imGetToken, {}) .then(function(res) { if (res.data != '') { qscms.imToken = res.data window.ws = new WebSocket('wss://imserv.v2.74cms.com'); window.ws.onopen = that.websocketonopen; window.ws.onmessage = that.websocketonmessage; window.ws.onerror = that.websocketonerror; window.ws.onclose = that.websocketclose; } }).catch(() => {}) }, websocketonopen: function() { var that = this var msgObj = { controller: "Connect", action: "index", args: { token: qscms.imToken } }; var msgStr = JSON.stringify(msgObj); window.ws.send(msgStr); that.getImUnreaded() }, websocketonerror: function() { console.log('client:连接websocket失败,请刷新页面重试') }, websocketonmessage: function(e) { var that = this if (isJSON(e.data)) { var data = JSON.parse(e.data); if (data.error === undefined) { that.imUnreaded = true } } else { console.log('client:' + e.data); } }, websocketclose: function() { console.log("client:关闭连接"); }, getImUnreaded: function() { var that = this httppost(qscms.apiList.imChatlist, { token: qscms.imToken }) .then(function(res) { for (var i = 0; i < res.data.items.length; i++) { if (res.data.items[i].new > 0) { that.imUnreaded = true } } }) .catch(function() {}) }, handlerCompanyIndex: function() { location.href = qscms.locationList.indexCompany }, handlerResumeIndex: function() { location.href = qscms.locationList.personalResume }, handlerPersonalRecommend: function() { location.href = qscms.locationList.recommendJob }, handlerAddJob() { var that = this httpget(qscms.apiList.companyCheckJobaddNum, {}).then(function(res) { if (res.data.enable_addjob_num <= 0) { that.$confirm('您当前是' + res.data.setmeal_name + ',当前可发布职位数为0,建议您立即升级套餐或将暂时不招聘的职位设为关闭!', '系统提示', { confirmButtonText: '升级套餐', type: 'warning' }) .then(function() { location.href = qscms.locationList.companySetmealAdd }) .catch(function() {}) return false } else { location.href = qscms.locationList.companyJobAdd } }).catch(function() {}) }, handlerCompanyJoblist() { location.href = qscms.locationList.companyJoblist }, handlerCompanyRecommend() { location.href = qscms.locationList.recommendResume }, handlerCompanyService() { location.href = qscms.locationList.companyService }, handlerPersonalLogin() { location.href = qscms.locationList.loginPersonal }, handlerCompanyLogin() { location.href = qscms.locationList.loginCompany }, handlerForget() { location.href = qscms.locationList.forget }, handlerAppeal() { location.href = qscms.locationList.appeal }, // 地区选择 choseDistrict(val) { console.log(val, '====') // $('#district_text').text(val) $('#subsite_pupop').removeClass('displayBlock').addClass('displayNone') } } }) $(function() { // 头部下拉广告位 var showPopup = false var current = new Date() var expire_time = localStorage.getItem('index_popup_expire_time') console.log(current.getTime() > new Date(expire_time)) if (expire_time === undefined || !expire_time || current.getTime() > new Date(expire_time)) { showPopup = true expire_time = new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1) localStorage.setItem('index_popup_expire_time', expire_time) } var header_source_time = 6; var header_time = null; var distinguish_source = true; if ($(".down_source")[0]) { down_source(); } else { if ($(".popup_source")[0] && showPopup === true) { $('
您当前未绑定微信,绑定后可发起聊天。
使用微信扫一扫,按提示快速绑定
微信扫一扫
{{ weChatQrcodeContent }}