Browse Source

消息数据判空

yangc 7 years ago
parent
commit
b2ed92864c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      components/mobile/center/Message.vue

+ 2 - 2
components/mobile/center/Message.vue

@@ -61,10 +61,10 @@
         handler: function (val) {
         handler: function (val) {
           if (val) {
           if (val) {
             if (this.isChange) {
             if (this.isChange) {
-              this.msgList = val.content
+              this.msgList = val.content || []
               this.isChange = false
               this.isChange = false
             } else {
             } else {
-              this.msgList = [...this.msgList, ...val.content]
+              this.msgList = [...this.msgList, ...(val.content || [])]
               this.getRead()
               this.getRead()
             }
             }
           }
           }