Authored by 陈轩

fix

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