|
@@ -246,7 +246,8 @@
|
|
|
},
|
|
|
watch: {
|
|
|
listenWebsocket: async function(newstr) {
|
|
|
- if (newstr && newstr.type == 'chat' && newstr.room == this.id) {
|
|
|
+ const that = this;
|
|
|
+ if (newstr && newstr.type == 'chat' && newstr.room == that.id) {
|
|
|
if (newstr.msg_type == '2') {
|
|
|
// 商品
|
|
|
res = await that.$api(`/viewGoods/goodsDetail`, `POST`, {
|
|
@@ -306,8 +307,8 @@
|
|
|
newstr.is_send = '1'
|
|
|
}
|
|
|
}
|
|
|
- this.msgList.push(newstr);
|
|
|
- this.goBottom();
|
|
|
+ that.msgList.push(newstr);
|
|
|
+ that.goBottom();
|
|
|
}
|
|
|
}
|
|
|
},
|