瀏覽代碼

回复消息

zs 2 年之前
父節點
當前提交
784f25ad44
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      pagesMessage/message/info.vue

+ 4 - 3
pagesMessage/message/info.vue

@@ -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();
 				}
 			}
 		},