layim.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. /*
  2. @Name: layui WebIM 1.0.0
  3. @Author:贤心
  4. @Date: 2014-04-25
  5. @Blog: http://sentsin.com
  6. */
  7. ;!function(win, undefined){
  8. var config = {
  9. msgurl: 'mailbox.html?msg=',
  10. chatlogurl: 'mailbox.html?user=',
  11. aniTime: 200,
  12. right: -232,
  13. api: {
  14. friend: 'js/plugins/layer/layim/data/friend.json', //好友列表接口
  15. group: 'js/plugins/layer/layim/data/group.json', //群组列表接口
  16. chatlog: 'js/plugins/layer/layim/data/chatlog.json', //聊天记录接口
  17. groups: 'js/plugins/layer/layim/data/groups.json', //群组成员接口
  18. sendurl: '' //发送消息接口
  19. },
  20. user: { //当前用户信息
  21. name: '游客',
  22. face: 'img/a1.jpg'
  23. },
  24. //自动回复内置文案,也可动态读取数据库配置
  25. autoReplay: [
  26. '您好,我现在有事不在,一会再和您联系。',
  27. '你没发错吧?',
  28. '洗澡中,请勿打扰,偷窥请购票,个体四十,团体八折,订票电话:一般人我不告诉他!',
  29. '你好,我是主人的美女秘书,有什么事就跟我说吧,等他回来我会转告他的。',
  30. '我正在拉磨,没法招呼您,因为我们家毛驴去动物保护协会把我告了,说我剥夺它休产假的权利。',
  31. '<(@ ̄︶ ̄@)>',
  32. '你要和我说话?你真的要和我说话?你确定自己想说吗?你一定非说不可吗?那你说吧,这是自动回复。',
  33. '主人正在开机自检,键盘鼠标看好机会出去凉快去了,我是他的电冰箱,我打字比较慢,你慢慢说,别急……',
  34. '(*^__^*) 嘻嘻,是贤心吗?'
  35. ],
  36. chating: {},
  37. hosts: (function(){
  38. var dk = location.href.match(/\:\d+/);
  39. dk = dk ? dk[0] : '';
  40. return 'http://' + document.domain + dk + '/';
  41. })(),
  42. json: function(url, data, callback, error){
  43. return $.ajax({
  44. type: 'POST',
  45. url: url,
  46. data: data,
  47. dataType: 'json',
  48. success: callback,
  49. error: error
  50. });
  51. },
  52. stopMP: function(e){
  53. e ? e.stopPropagation() : e.cancelBubble = true;
  54. }
  55. }, dom = [$(window), $(document), $('html'), $('body')], xxim = {};
  56. //主界面tab
  57. xxim.tabs = function(index){
  58. var node = xxim.node;
  59. node.tabs.eq(index).addClass('xxim_tabnow').siblings().removeClass('xxim_tabnow');
  60. node.list.eq(index).show().siblings('.xxim_list').hide();
  61. if(node.list.eq(index).find('li').length === 0){
  62. xxim.getDates(index);
  63. }
  64. };
  65. //节点
  66. xxim.renode = function(){
  67. var node = xxim.node = {
  68. tabs: $('#xxim_tabs>span'),
  69. list: $('.xxim_list'),
  70. online: $('.xxim_online'),
  71. setonline: $('.xxim_setonline'),
  72. onlinetex: $('#xxim_onlinetex'),
  73. xximon: $('#xxim_on'),
  74. layimFooter: $('#xxim_bottom'),
  75. xximHide: $('#xxim_hide'),
  76. xximSearch: $('#xxim_searchkey'),
  77. searchMian: $('#xxim_searchmain'),
  78. closeSearch: $('#xxim_closesearch'),
  79. layimMin: $('#layim_min')
  80. };
  81. };
  82. //主界面缩放
  83. xxim.expend = function(){
  84. var node = xxim.node;
  85. if(xxim.layimNode.attr('state') !== '1'){
  86. xxim.layimNode.stop().animate({right: config.right}, config.aniTime, function(){
  87. node.xximon.addClass('xxim_off');
  88. try{
  89. localStorage.layimState = 1;
  90. }catch(e){}
  91. xxim.layimNode.attr({state: 1});
  92. node.layimFooter.addClass('xxim_expend').stop().animate({marginLeft: config.right}, config.aniTime/2);
  93. node.xximHide.addClass('xxim_show');
  94. });
  95. } else {
  96. xxim.layimNode.stop().animate({right: 1}, config.aniTime, function(){
  97. node.xximon.removeClass('xxim_off');
  98. try{
  99. localStorage.layimState = 2;
  100. }catch(e){}
  101. xxim.layimNode.removeAttr('state');
  102. node.layimFooter.removeClass('xxim_expend');
  103. node.xximHide.removeClass('xxim_show');
  104. });
  105. node.layimFooter.stop().animate({marginLeft: 0}, config.aniTime);
  106. }
  107. };
  108. //初始化窗口格局
  109. xxim.layinit = function(){
  110. var node = xxim.node;
  111. //主界面
  112. try{
  113. /*
  114. if(!localStorage.layimState){
  115. config.aniTime = 0;
  116. localStorage.layimState = 1;
  117. }
  118. */
  119. if(localStorage.layimState === '1'){
  120. xxim.layimNode.attr({state: 1}).css({right: config.right});
  121. node.xximon.addClass('xxim_off');
  122. node.layimFooter.addClass('xxim_expend').css({marginLeft: config.right});
  123. node.xximHide.addClass('xxim_show');
  124. }
  125. }catch(e){
  126. //layer.msg(e.message, 5, -1);
  127. }
  128. };
  129. //聊天窗口
  130. xxim.popchat = function(param){
  131. var node = xxim.node, log = {};
  132. log.success = function(layero){
  133. layer.setMove();
  134. xxim.chatbox = layero.find('#layim_chatbox');
  135. log.chatlist = xxim.chatbox.find('.layim_chatmore>ul');
  136. log.chatlist.html('<li data-id="'+ param.id +'" type="'+ param.type +'" id="layim_user'+ param.type + param.id +'"><span>'+ param.name +'</span><em>×</em></li>')
  137. xxim.tabchat(param, xxim.chatbox);
  138. //最小化聊天窗
  139. xxim.chatbox.find('.layer_setmin').on('click', function(){
  140. var indexs = layero.attr('times');
  141. layero.hide();
  142. node.layimMin.text(xxim.nowchat.name).show();
  143. });
  144. //关闭窗口
  145. xxim.chatbox.find('.layim_close').on('click', function(){
  146. var indexs = layero.attr('times');
  147. layer.close(indexs);
  148. xxim.chatbox = null;
  149. config.chating = {};
  150. config.chatings = 0;
  151. });
  152. //关闭某个聊天
  153. log.chatlist.on('mouseenter', 'li', function(){
  154. $(this).find('em').show();
  155. }).on('mouseleave', 'li', function(){
  156. $(this).find('em').hide();
  157. });
  158. log.chatlist.on('click', 'li em', function(e){
  159. var parents = $(this).parent(), dataType = parents.attr('type');
  160. var dataId = parents.attr('data-id'), index = parents.index();
  161. var chatlist = log.chatlist.find('li'), indexs;
  162. config.stopMP(e);
  163. delete config.chating[dataType + dataId];
  164. config.chatings--;
  165. parents.remove();
  166. $('#layim_area'+ dataType + dataId).remove();
  167. if(dataType === 'group'){
  168. $('#layim_group'+ dataType + dataId).remove();
  169. }
  170. if(parents.hasClass('layim_chatnow')){
  171. if(index === config.chatings){
  172. indexs = index - 1;
  173. } else {
  174. indexs = index + 1;
  175. }
  176. xxim.tabchat(config.chating[chatlist.eq(indexs).attr('type') + chatlist.eq(indexs).attr('data-id')]);
  177. }
  178. if(log.chatlist.find('li').length === 1){
  179. log.chatlist.parent().hide();
  180. }
  181. });
  182. //聊天选项卡
  183. log.chatlist.on('click', 'li', function(){
  184. var othis = $(this), dataType = othis.attr('type'), dataId = othis.attr('data-id');
  185. xxim.tabchat(config.chating[dataType + dataId]);
  186. });
  187. //发送热键切换
  188. log.sendType = $('#layim_sendtype'), log.sendTypes = log.sendType.find('span');
  189. $('#layim_enter').on('click', function(e){
  190. config.stopMP(e);
  191. log.sendType.show();
  192. });
  193. log.sendTypes.on('click', function(){
  194. log.sendTypes.find('i').text('')
  195. $(this).find('i').text('√');
  196. });
  197. xxim.transmit();
  198. };
  199. log.html = '<div class="layim_chatbox" id="layim_chatbox">'
  200. +'<h6>'
  201. +'<span class="layim_move"></span>'
  202. +' <a href="'+ param.url +'" class="layim_face" target="_blank"><img src="'+ param.face +'" ></a>'
  203. +' <a href="'+ param.url +'" class="layim_names" target="_blank">'+ param.name +'</a>'
  204. +' <span class="layim_rightbtn">'
  205. +' <i class="layer_setmin">—</i>'
  206. +' <i class="layim_close">&times;</i>'
  207. +' </span>'
  208. +'</h6>'
  209. +'<div class="layim_chatmore" id="layim_chatmore">'
  210. +' <ul class="layim_chatlist"></ul>'
  211. +'</div>'
  212. +'<div class="layim_groups" id="layim_groups"></div>'
  213. +'<div class="layim_chat">'
  214. +' <div class="layim_chatarea" id="layim_chatarea">'
  215. +' <ul class="layim_chatview layim_chatthis" id="layim_area'+ param.type + param.id +'"></ul>'
  216. +' </div>'
  217. +' <div class="layim_tool">'
  218. +' <i class="layim_addface fa fa-meh-o" title="发送表情"></i>'
  219. +' <a href="javascript:;"><i class="layim_addimage fa fa-picture-o" title="上传图片"></i></a>'
  220. +' <a href="javascript:;"><i class="layim_addfile fa fa-paperclip" title="上传附件"></i></a>'
  221. +' <a href="" target="_blank" class="layim_seechatlog"><i class="fa fa-comment-o"></i>聊天记录</a>'
  222. +' </div>'
  223. +' <textarea class="layim_write" id="layim_write"></textarea>'
  224. +' <div class="layim_send">'
  225. +' <div class="layim_sendbtn" id="layim_sendbtn">发送<span class="layim_enter" id="layim_enter"><em class="layim_zero"></em></span></div>'
  226. +' <div class="layim_sendtype" id="layim_sendtype">'
  227. +' <span><i>√</i>按Enter键发送</span>'
  228. +' <span><i></i>按Ctrl+Enter键发送</span>'
  229. +' </div>'
  230. +' </div>'
  231. +'</div>'
  232. +'</div>';
  233. if(config.chatings < 1){
  234. $.layer({
  235. type: 1,
  236. border: [0],
  237. title: false,
  238. shade: [0],
  239. area: ['620px', '493px'],
  240. move: '.layim_chatbox .layim_move',
  241. moveType: 1,
  242. closeBtn: false,
  243. offset: [(($(window).height() - 493)/2)+'px', ''],
  244. page: {
  245. html: log.html
  246. }, success: function(layero){
  247. log.success(layero);
  248. }
  249. })
  250. } else {
  251. log.chatmore = xxim.chatbox.find('#layim_chatmore');
  252. log.chatarea = xxim.chatbox.find('#layim_chatarea');
  253. log.chatmore.show();
  254. log.chatmore.find('ul>li').removeClass('layim_chatnow');
  255. log.chatmore.find('ul').append('<li data-id="'+ param.id +'" type="'+ param.type +'" id="layim_user'+ param.type + param.id +'" class="layim_chatnow"><span>'+ param.name +'</span><em>×</em></li>');
  256. log.chatarea.find('.layim_chatview').removeClass('layim_chatthis');
  257. log.chatarea.append('<ul class="layim_chatview layim_chatthis" id="layim_area'+ param.type + param.id +'"></ul>');
  258. xxim.tabchat(param);
  259. }
  260. //群组
  261. log.chatgroup = xxim.chatbox.find('#layim_groups');
  262. if(param.type === 'group'){
  263. log.chatgroup.find('ul').removeClass('layim_groupthis');
  264. log.chatgroup.append('<ul class="layim_groupthis" id="layim_group'+ param.type + param.id +'"></ul>');
  265. xxim.getGroups(param);
  266. }
  267. //点击群员切换聊天窗
  268. log.chatgroup.on('click', 'ul>li', function(){
  269. xxim.popchatbox($(this));
  270. });
  271. };
  272. //定位到某个聊天队列
  273. xxim.tabchat = function(param){
  274. var node = xxim.node, log = {}, keys = param.type + param.id;
  275. xxim.nowchat = param;
  276. xxim.chatbox.find('#layim_user'+ keys).addClass('layim_chatnow').siblings().removeClass('layim_chatnow');
  277. xxim.chatbox.find('#layim_area'+ keys).addClass('layim_chatthis').siblings().removeClass('layim_chatthis');
  278. xxim.chatbox.find('#layim_group'+ keys).addClass('layim_groupthis').siblings().removeClass('layim_groupthis');
  279. xxim.chatbox.find('.layim_face>img').attr('src', param.face);
  280. xxim.chatbox.find('.layim_face, .layim_names').attr('href', param.href);
  281. xxim.chatbox.find('.layim_names').text(param.name);
  282. xxim.chatbox.find('.layim_seechatlog').attr('href', config.chatlogurl + param.id);
  283. log.groups = xxim.chatbox.find('.layim_groups');
  284. if(param.type === 'group'){
  285. log.groups.show();
  286. } else {
  287. log.groups.hide();
  288. }
  289. $('#layim_write').focus();
  290. };
  291. //弹出聊天窗
  292. xxim.popchatbox = function(othis){
  293. var node = xxim.node, dataId = othis.attr('data-id'), param = {
  294. id: dataId, //用户ID
  295. type: othis.attr('type'),
  296. name: othis.find('.xxim_onename').text(), //用户名
  297. face: othis.find('.xxim_oneface').attr('src'), //用户头像
  298. href: 'profile.html?user=' + dataId //用户主页
  299. }, key = param.type + dataId;
  300. if(!config.chating[key]){
  301. xxim.popchat(param);
  302. config.chatings++;
  303. } else {
  304. xxim.tabchat(param);
  305. }
  306. config.chating[key] = param;
  307. var chatbox = $('#layim_chatbox');
  308. if(chatbox[0]){
  309. node.layimMin.hide();
  310. chatbox.parents('.xubox_layer').show();
  311. }
  312. };
  313. //请求群员
  314. xxim.getGroups = function(param){
  315. var keys = param.type + param.id, str = '',
  316. groupss = xxim.chatbox.find('#layim_group'+ keys);
  317. groupss.addClass('loading');
  318. config.json(config.api.groups, {}, function(datas){
  319. if(datas.status === 1){
  320. var ii = 0, lens = datas.data.length;
  321. if(lens > 0){
  322. for(; ii < lens; ii++){
  323. str += '<li data-id="'+ datas.data[ii].id +'" type="one"><img src="'+ datas.data[ii].face +'" class="xxim_oneface"><span class="xxim_onename">'+ datas.data[ii].name +'</span></li>';
  324. }
  325. } else {
  326. str = '<li class="layim_errors">没有群员</li>';
  327. }
  328. } else {
  329. str = '<li class="layim_errors">'+ datas.msg +'</li>';
  330. }
  331. groupss.removeClass('loading');
  332. groupss.html(str);
  333. }, function(){
  334. groupss.removeClass('loading');
  335. groupss.html('<li class="layim_errors">请求异常</li>');
  336. });
  337. };
  338. //消息传输
  339. xxim.transmit = function(){
  340. var node = xxim.node, log = {};
  341. node.sendbtn = $('#layim_sendbtn');
  342. node.imwrite = $('#layim_write');
  343. //发送
  344. log.send = function(){
  345. var data = {
  346. content: node.imwrite.val(),
  347. id: xxim.nowchat.id,
  348. sign_key: '', //密匙
  349. _: +new Date
  350. };
  351. if(data.content.replace(/\s/g, '') === ''){
  352. layer.tips('说点啥呗!', '#layim_write', 2);
  353. node.imwrite.focus();
  354. } else {
  355. //此处皆为模拟
  356. var keys = xxim.nowchat.type + xxim.nowchat.id;
  357. //聊天模版
  358. log.html = function(param, type){
  359. return '<li class="'+ (type === 'me' ? 'layim_chateme' : '') +'">'
  360. +'<div class="layim_chatuser">'
  361. + function(){
  362. if(type === 'me'){
  363. return '<span class="layim_chattime">'+ param.time +'</span>'
  364. +'<span class="layim_chatname">'+ param.name +'</span>'
  365. +'<img src="'+ param.face +'" >';
  366. } else {
  367. return '<img src="'+ param.face +'" >'
  368. +'<span class="layim_chatname">'+ param.name +'</span>'
  369. +'<span class="layim_chattime">'+ param.time +'</span>';
  370. }
  371. }()
  372. +'</div>'
  373. +'<div class="layim_chatsay">'+ param.content +'<em class="layim_zero"></em></div>'
  374. +'</li>';
  375. };
  376. log.imarea = xxim.chatbox.find('#layim_area'+ keys);
  377. log.imarea.append(log.html({
  378. time: '2014-04-26 0:37',
  379. name: config.user.name,
  380. face: config.user.face,
  381. content: data.content
  382. }, 'me'));
  383. node.imwrite.val('').focus();
  384. log.imarea.scrollTop(log.imarea[0].scrollHeight);
  385. setTimeout(function(){
  386. log.imarea.append(log.html({
  387. time: '2014-04-26 0:38',
  388. name: xxim.nowchat.name,
  389. face: xxim.nowchat.face,
  390. content: config.autoReplay[(Math.random()*config.autoReplay.length) | 0]
  391. }));
  392. log.imarea.scrollTop(log.imarea[0].scrollHeight);
  393. }, 500);
  394. /*
  395. that.json(config.api.sendurl, data, function(datas){
  396. });
  397. */
  398. }
  399. };
  400. node.sendbtn.on('click', log.send);
  401. node.imwrite.keyup(function(e){
  402. if(e.keyCode === 13){
  403. log.send();
  404. }
  405. });
  406. };
  407. //事件
  408. xxim.event = function(){
  409. var node = xxim.node;
  410. //主界面tab
  411. node.tabs.eq(0).addClass('xxim_tabnow');
  412. node.tabs.on('click', function(){
  413. var othis = $(this), index = othis.index();
  414. xxim.tabs(index);
  415. });
  416. //列表展收
  417. node.list.on('click', 'h5', function(){
  418. var othis = $(this), chat = othis.siblings('.xxim_chatlist'), parentss = othis.find("i");
  419. if(parentss.hasClass('fa-caret-down')){
  420. chat.hide();
  421. parentss.attr('class','fa fa-caret-right');
  422. } else {
  423. chat.show();
  424. parentss.attr('class','fa fa-caret-down');
  425. }
  426. });
  427. //设置在线隐身
  428. node.online.on('click', function(e){
  429. config.stopMP(e);
  430. node.setonline.show();
  431. });
  432. node.setonline.find('span').on('click', function(e){
  433. var index = $(this).index();
  434. config.stopMP(e);
  435. if(index === 0){
  436. node.onlinetex.html('在线');
  437. node.online.removeClass('xxim_offline');
  438. } else if(index === 1) {
  439. node.onlinetex.html('隐身');
  440. node.online.addClass('xxim_offline');
  441. }
  442. node.setonline.hide();
  443. });
  444. node.xximon.on('click', xxim.expend);
  445. node.xximHide.on('click', xxim.expend);
  446. //搜索
  447. node.xximSearch.keyup(function(){
  448. var val = $(this).val().replace(/\s/g, '');
  449. if(val !== ''){
  450. node.searchMian.show();
  451. node.closeSearch.show();
  452. //此处的搜索ajax参考xxim.getDates
  453. node.list.eq(3).html('<li class="xxim_errormsg">没有符合条件的结果</li>');
  454. } else {
  455. node.searchMian.hide();
  456. node.closeSearch.hide();
  457. }
  458. });
  459. node.closeSearch.on('click', function(){
  460. $(this).hide();
  461. node.searchMian.hide();
  462. node.xximSearch.val('').focus();
  463. });
  464. //弹出聊天窗
  465. config.chatings = 0;
  466. node.list.on('click', '.xxim_childnode', function(){
  467. var othis = $(this);
  468. xxim.popchatbox(othis);
  469. });
  470. //点击最小化栏
  471. node.layimMin.on('click', function(){
  472. $(this).hide();
  473. $('#layim_chatbox').parents('.xubox_layer').show();
  474. });
  475. //document事件
  476. dom[1].on('click', function(){
  477. node.setonline.hide();
  478. $('#layim_sendtype').hide();
  479. });
  480. };
  481. //请求列表数据
  482. xxim.getDates = function(index){
  483. var api = [config.api.friend, config.api.group, config.api.chatlog],
  484. node = xxim.node, myf = node.list.eq(index);
  485. myf.addClass('loading');
  486. config.json(api[index], {}, function(datas){
  487. if(datas.status === 1){
  488. var i = 0, myflen = datas.data.length, str = '', item;
  489. if(myflen > 1){
  490. if(index !== 2){
  491. for(; i < myflen; i++){
  492. str += '<li data-id="'+ datas.data[i].id +'" class="xxim_parentnode">'
  493. +'<h5><i class="fa fa-caret-right"></i><span class="xxim_parentname">'+ datas.data[i].name +'</span><em class="xxim_nums">('+ datas.data[i].nums +')</em></h5>'
  494. +'<ul class="xxim_chatlist">';
  495. item = datas.data[i].item;
  496. for(var j = 0; j < item.length; j++){
  497. str += '<li data-id="'+ item[j].id +'" class="xxim_childnode" type="'+ (index === 0 ? 'one' : 'group') +'"><img src="'+ item[j].face +'" class="xxim_oneface"><span class="xxim_onename">'+ item[j].name +'</span></li>';
  498. }
  499. str += '</ul></li>';
  500. }
  501. } else {
  502. str += '<li class="xxim_liston">'
  503. +'<ul class="xxim_chatlist">';
  504. for(; i < myflen; i++){
  505. str += '<li data-id="'+ datas.data[i].id +'" class="xxim_childnode" type="one"><img src="'+ datas.data[i].face +'" class="xxim_oneface"><span class="xxim_onename">'+ datas.data[i].name +'</span><em class="xxim_time">'+ datas.data[i].time +'</em></li>';
  506. }
  507. str += '</ul></li>';
  508. }
  509. myf.html(str);
  510. } else {
  511. myf.html('<li class="xxim_errormsg">没有任何数据</li>');
  512. }
  513. myf.removeClass('loading');
  514. } else {
  515. myf.html('<li class="xxim_errormsg">'+ datas.msg +'</li>');
  516. }
  517. }, function(){
  518. myf.html('<li class="xxim_errormsg">请求失败</li>');
  519. myf.removeClass('loading');
  520. });
  521. };
  522. //渲染骨架
  523. xxim.view = (function(){
  524. var xximNode = xxim.layimNode = $('<div id="xximmm" class="xxim_main">'
  525. +'<div class="xxim_top" id="xxim_top">'
  526. +' <div class="xxim_search"><i class="fa fa-search"></i><input id="xxim_searchkey" /><span id="xxim_closesearch">×</span></div>'
  527. +' <div class="xxim_tabs" id="xxim_tabs"><span class="xxim_tabfriend" title="好友"><i class="fa fa-user"></i></span><span class="xxim_tabgroup" title="群组"><i class="fa fa-users"></i></span><span class="xxim_latechat" title="最近聊天"><i class="fa fa-clock-o"></i></span></div>'
  528. +' <ul class="xxim_list" style="display:block"></ul>'
  529. +' <ul class="xxim_list"></ul>'
  530. +' <ul class="xxim_list"></ul>'
  531. +' <ul class="xxim_list xxim_searchmain" id="xxim_searchmain"></ul>'
  532. +'</div>'
  533. +'<ul class="xxim_bottom" id="xxim_bottom">'
  534. +'<li class="xxim_online" id="xxim_online">'
  535. +'<i class="xxim_nowstate fa fa-check-circle"></i><span id="xxim_onlinetex">在线</span>'
  536. +'<div class="xxim_setonline">'
  537. +'<span><i class="fa fa-check-circle"></i>在线</span>'
  538. +'<span class="xxim_setoffline"><i class="fa fa-check-circle"></i>隐身</span>'
  539. +'</div>'
  540. +'</li>'
  541. +'<li class="xxim_mymsg" id="xxim_mymsg" title="我的私信"><i class="fa fa-comment"></i><a href="'+ config.msgurl +'" target="_blank"></a></li>'
  542. +'<li class="xxim_seter" id="xxim_seter" title="设置">'
  543. +'<i class="fa fa-gear"></i>'
  544. +'<div>'
  545. +'</div>'
  546. +'</li>'
  547. +'<li class="xxim_hide" id="xxim_hide"><i class="fa fa-exchange"></i></li>'
  548. +'<li id="xxim_on" class="xxim_icon xxim_on fa fa-ellipsis-v"></li>'
  549. +'<div class="layim_min" id="layim_min"></div>'
  550. +'</ul>'
  551. +'</div>');
  552. dom[3].append(xximNode);
  553. xxim.renode();
  554. xxim.getDates(0);
  555. xxim.event();
  556. xxim.layinit();
  557. }());
  558. }(window);