guhongwei 4 năm trước cách đây
mục cha
commit
00d8a9c0a7
1 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 5 3
      src/views/userCenter/message/index.vue

+ 5 - 3
src/views/userCenter/message/index.vue

@@ -46,9 +46,11 @@ export default {
     ...mapActions(['query', 'fetch']),
     ...personalChat({ getChatList: 'query' }),
     async search() {
-      let res = await this.query({ receiver_id: this.user.uid });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
+      let res = await this.query({ seller_id: this.user.uid });
+      let arr = await this.query({ buyer_id: this.user.uid });
+      var newData = res.data.concat(arr.data);
+      if (this.$checkRes(newData)) {
+        this.$set(this, `list`, newData);
         this.onMessage();
       }
     },