|
@@ -300,6 +300,10 @@ var chat = { |
|
@@ -300,6 +300,10 @@ var chat = { |
300
|
cmEntity.chatMessage.type = 10;
|
300
|
cmEntity.chatMessage.type = 10;
|
301
|
cmEntity.chatMessage.content = arr;
|
301
|
cmEntity.chatMessage.content = arr;
|
302
|
break;
|
302
|
break;
|
|
|
303
|
+ case 'picture':
|
|
|
304
|
+ cmEntity.chatMessage.type = 2;
|
|
|
305
|
+ cmEntity.chatMessage.content = data.content;
|
|
|
306
|
+ break;
|
303
|
case 'text':
|
307
|
case 'text':
|
304
|
default:
|
308
|
default:
|
305
|
cmEntity.chatMessage.type = 1;
|
309
|
cmEntity.chatMessage.type = 1;
|
|
@@ -773,7 +777,7 @@ $upload.on('change', function() { |
|
@@ -773,7 +777,7 @@ $upload.on('change', function() { |
773
|
if (res.code === 200) {
|
777
|
if (res.code === 200) {
|
774
|
$elem.removeClass('send-loading')
|
778
|
$elem.removeClass('send-loading')
|
775
|
.find('.chat-image').attr('src', res.data.filePath);
|
779
|
.find('.chat-image').attr('src', res.data.filePath);
|
776
|
-
|
780
|
+ msg.data.content = res.data.filePath;
|
777
|
chat.sendMSG(msg, true); // only send msg, no draw msg;
|
781
|
chat.sendMSG(msg, true); // only send msg, no draw msg;
|
778
|
}
|
782
|
}
|
779
|
})
|
783
|
})
|
|
@@ -783,6 +787,9 @@ $upload.on('change', function() { |
|
@@ -783,6 +787,9 @@ $upload.on('change', function() { |
783
|
.removeClass('send-loading')
|
787
|
.removeClass('send-loading')
|
784
|
.addClass('send-fail')
|
788
|
.addClass('send-fail')
|
785
|
.one('click', _action);
|
789
|
.one('click', _action);
|
|
|
790
|
+ })
|
|
|
791
|
+ .always(function() {
|
|
|
792
|
+ input.value = '';
|
786
|
});
|
793
|
});
|
787
|
};
|
794
|
};
|
788
|
|
795
|
|