正在显示
1 个修改的文件
包含
9 行增加
和
3 行删除
@@ -88,10 +88,16 @@ Page({ | @@ -88,10 +88,16 @@ Page({ | ||
88 | success: function(res) { | 88 | success: function(res) { |
89 | if (res && res.data) { | 89 | if (res && res.data) { |
90 | console.log("res", res) | 90 | console.log("res", res) |
91 | + var databean = {} | ||
92 | + databean.type = "1" | ||
93 | + databean.text = that.data.inputValue | ||
94 | + that.data.chatlist.push(databean) | ||
95 | + that.data.chatlist.push(res.data) | ||
91 | that.setData({ | 96 | that.setData({ |
92 | - inputValue:"" | 97 | + inputValue:"", |
98 | + chatlist: that.data.chatlist | ||
93 | }) | 99 | }) |
94 | - that.getChatinfo() | 100 | + // that.getChatinfo() |
95 | } | 101 | } |
96 | } | 102 | } |
97 | }) | 103 | }) |
@@ -168,7 +174,7 @@ Page({ | @@ -168,7 +174,7 @@ Page({ | ||
168 | }, | 174 | }, |
169 | success: function (res) { | 175 | success: function (res) { |
170 | if (res && res.data) { | 176 | if (res && res.data) { |
171 | - console.log("res", res) | 177 | + console.log("getChatinfo", res) |
172 | that.setData({ | 178 | that.setData({ |
173 | chatlist: res.data.items.reverse() | 179 | chatlist: res.data.items.reverse() |
174 | }) | 180 | }) |
请
注册
或
登录
后发表评论