...
|
...
|
@@ -408,7 +408,7 @@ var chat = { |
|
|
break;
|
|
|
case allTypes.CS_SEND:
|
|
|
viewData.from = 'employee';
|
|
|
viewData.avatar = customerService.head || socketConf.defaultUserHead;
|
|
|
viewData.avatar = customerService.head || socketConf.employeHead;
|
|
|
break;
|
|
|
case allTypes.ROBOT_SEND:
|
|
|
viewData.from = 'rebot';
|
...
|
...
|
@@ -579,13 +579,20 @@ var chat = { |
|
|
$chat.append(time(Date.now()).show());
|
|
|
}
|
|
|
|
|
|
// state: 0 没有人工客服
|
|
|
function noEmploye() {
|
|
|
$chatHeader.find('.js-service-txt').text('YOHO客服');
|
|
|
|
|
|
$chat.append(time(Date.now()).show());
|
|
|
sysInfo(chatMessage.content);
|
|
|
sysInfo();
|
|
|
}
|
|
|
|
|
|
// state 1: 排队中
|
|
|
function inQueue() {
|
|
|
// let info = `${chatMessage.content}您可以<span class="blue" data-trigger="leave-msg">留言</span>`;
|
|
|
let info = `${chatMessage.content}您可以<span class="blue" data-trigger="leave-msg">留言</span>`;
|
|
|
|
|
|
// sysInfo(info);
|
|
|
sysInfo();
|
|
|
sysInfo(info);
|
|
|
}
|
|
|
|
|
|
// state 2: 人工客服进入
|
...
|
...
|
@@ -600,6 +607,7 @@ var chat = { |
|
|
}
|
|
|
|
|
|
switch (state) {
|
|
|
case 0: noEmploye(); break;
|
|
|
case 1: inQueue(); break;
|
|
|
case 2:
|
|
|
case 3:
|
...
|
...
|
|