Authored by 陈轩

fix

@@ -28,9 +28,10 @@ module.exports = { @@ -28,9 +28,10 @@ module.exports = {
28 service: 'http://service.yoho.cn/', 28 service: 'http://service.yoho.cn/',
29 liveApi: 'http://api.live.yoho.cn/', 29 liveApi: 'http://api.live.yoho.cn/',
30 singleApi: 'http://single.yoho.cn/', 30 singleApi: 'http://single.yoho.cn/',
31 - imSocket: 'ws://imsocket.yohobuy.com:10000', 31 + // imSocket: 'ws://imsocket.yohobuy.com:10000',
  32 + imSocket: 'wss://imsocket.yohobuy.com:443',
32 imCs: 'http://imhttp.yohobuy.com/api', 33 imCs: 'http://imhttp.yohobuy.com/api',
33 - imServer: 'http://imhttp.yohobuy.com/server' 34 + imServer: 'http://imhttp.yohobuy.com:60201/imserver-web'
34 }, 35 },
35 subDomains: { 36 subDomains: {
36 host: '.m.yohobuy.com', 37 host: '.m.yohobuy.com',
@@ -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