Authored by 陈轩

im employee head

@@ -408,7 +408,7 @@ var chat = { @@ -408,7 +408,7 @@ var chat = {
408 break; 408 break;
409 case allTypes.CS_SEND: 409 case allTypes.CS_SEND:
410 viewData.from = 'employee'; 410 viewData.from = 'employee';
411 - viewData.avatar = customerService.head || socketConf.defaultUserHead; 411 + viewData.avatar = customerService.head || socketConf.employeHead;
412 break; 412 break;
413 case allTypes.ROBOT_SEND: 413 case allTypes.ROBOT_SEND:
414 viewData.from = 'rebot'; 414 viewData.from = 'rebot';
@@ -579,13 +579,20 @@ var chat = { @@ -579,13 +579,20 @@ var chat = {
579 $chat.append(time(Date.now()).show()); 579 $chat.append(time(Date.now()).show());
580 } 580 }
581 581
  582 + // state: 0 没有人工客服
  583 + function noEmploye() {
  584 + $chatHeader.find('.js-service-txt').text('YOHO客服');
  585 +
  586 + $chat.append(time(Date.now()).show());
  587 + sysInfo(chatMessage.content);
  588 + sysInfo();
  589 + }
582 590
583 // state 1: 排队中 591 // state 1: 排队中
584 function inQueue() { 592 function inQueue() {
585 - // let info = `${chatMessage.content}您可以<span class="blue" data-trigger="leave-msg">留言</span>`; 593 + let info = `${chatMessage.content}您可以<span class="blue" data-trigger="leave-msg">留言</span>`;
586 594
587 - // sysInfo(info);  
588 - sysInfo(); 595 + sysInfo(info);
589 } 596 }
590 597
591 // state 2: 人工客服进入 598 // state 2: 人工客服进入
@@ -600,6 +607,7 @@ var chat = { @@ -600,6 +607,7 @@ var chat = {
600 } 607 }
601 608
602 switch (state) { 609 switch (state) {
  610 + case 0: noEmploye(); break;
603 case 1: inQueue(); break; 611 case 1: inQueue(); break;
604 case 2: 612 case 2:
605 case 3: 613 case 3:
@@ -10,6 +10,7 @@ var config = { @@ -10,6 +10,7 @@ var config = {
10 servers: [gDomains.imSocket], 10 servers: [gDomains.imSocket],
11 defaultUserHead: '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif', 11 defaultUserHead: '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif',
12 rebotUserHead: `${window.STATIC_RESOURCE_PATH}/img/service/chat/im-robot.png`, 12 rebotUserHead: `${window.STATIC_RESOURCE_PATH}/img/service/chat/im-robot.png`,
  13 + employeHead: '//img12.static.yhbimg.com/imserver/2016/11/17/11/02bc3c3de856432175c01d937342a1f2ce.jpg',
13 recType: { 14 recType: {
14 ENTER: 1, // 用户进入 15 ENTER: 1, // 用户进入
15 LINK_SUCCESS: 2, // 连线人工客服回应 16 LINK_SUCCESS: 2, // 连线人工客服回应