Commit f9c3bf9a authored by 李博今's avatar 李博今

优化手机端

parent e3e349bf
...@@ -343,11 +343,42 @@ layui.config({ ...@@ -343,11 +343,42 @@ layui.config({
}; };
} }
createWebSocket(websocketurl,initEventHandle); createWebSocket(websocketurl,initEventHandle);
});
//客服登陆后获得用户信息
window.onload = function(){
var cache = layim.cache();
var username = "",avatar="",friend=false;
if(findNum > 0){
$.ajax({
url:"getusers2",
type:"post",
data: {mineId : cache.mine.id},
dataType:"json",
success:function(data){
if(data.data.deptId != 2){
cache.friend = data.data.friend;
}
}
});
}
findNum++;
layui.each(cache.friend, function(index1, item1){
layui.each(item1.list, function(index, item){
if(item.id == msg.getSender()){
username = item.username;
avatar = item.avatar;
return friend = true;
}
});
if(friend) return true;
});
}
});
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment