...
|
...
|
@@ -300,6 +300,10 @@ var chat = { |
|
|
cmEntity.chatMessage.type = 10;
|
|
|
cmEntity.chatMessage.content = arr;
|
|
|
break;
|
|
|
case 'picture':
|
|
|
cmEntity.chatMessage.type = 2;
|
|
|
cmEntity.chatMessage.content = data.content;
|
|
|
break;
|
|
|
case 'text':
|
|
|
default:
|
|
|
cmEntity.chatMessage.type = 1;
|
...
|
...
|
@@ -773,7 +777,7 @@ $upload.on('change', function() { |
|
|
if (res.code === 200) {
|
|
|
$elem.removeClass('send-loading')
|
|
|
.find('.chat-image').attr('src', res.data.filePath);
|
|
|
|
|
|
msg.data.content = res.data.filePath;
|
|
|
chat.sendMSG(msg, true); // only send msg, no draw msg;
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -783,6 +787,9 @@ $upload.on('change', function() { |
|
|
.removeClass('send-loading')
|
|
|
.addClass('send-fail')
|
|
|
.one('click', _action);
|
|
|
})
|
|
|
.always(function() {
|
|
|
input.value = '';
|
|
|
});
|
|
|
};
|
|
|
|
...
|
...
|
|