|
@@ -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:
|