|
@@ -1,6 +1,7 @@
|
1
|
1
|
|
2
|
2
|
|
3
|
3
|
const webSocket = require('../../utils/websocket.js');
|
|
4
|
+const timefunc = require('../../utils/time.js');
|
4
|
5
|
const app = getApp();
|
5
|
6
|
|
6
|
7
|
* 会话列表页面
|
|
@@ -24,8 +25,6 @@ Page({
|
24
|
25
|
timestamp = timestamp / 1000;
|
25
|
26
|
console.log("当前时间戳为:" + timestamp);
|
26
|
27
|
|
27
|
|
-
|
28
|
|
-
|
29
|
28
|
|
30
|
29
|
app.postRequest('my/images/headurl', {}, function (res) {
|
31
|
30
|
if (res.code == 201) {
|
|
@@ -37,11 +36,6 @@ Page({
|
37
|
36
|
}
|
38
|
37
|
})
|
39
|
38
|
|
40
|
|
-
|
41
|
|
-
|
42
|
|
-
|
43
|
|
-
|
44
|
|
-
|
45
|
39
|
},
|
46
|
40
|
toChat(e) {
|
47
|
41
|
|
|
@@ -129,6 +123,7 @@ Page({
|
129
|
123
|
|
130
|
124
|
dataAtt[index].count = 0;
|
131
|
125
|
}
|
|
126
|
+ dataAtt[index].timeStr = timefunc.TimeFormatting(dataAtt[index].create_at)
|
132
|
127
|
if (dataAtt[index].type == 2) {
|
133
|
128
|
dataAtt[index].content = '[图片]'
|
134
|
129
|
}
|
|
@@ -148,11 +143,11 @@ Page({
|
148
|
143
|
for (var index in dataArr){
|
149
|
144
|
|
150
|
145
|
idData.push(String(dataArr[index].to_str));
|
|
146
|
+ dataArr[index].timeStr = timefunc.TimeFormatting(data.data.create_at);
|
151
|
147
|
if (dataArr[index].to_str == data.data.to_str)
|
152
|
148
|
{
|
153
|
149
|
dataArr[index].count = data.data.count;
|
154
|
150
|
dataArr[index].content = data.data.content;
|
155
|
|
- dataArr[index].timeStr = data.data.timeStr;
|
156
|
151
|
dataArr[index].create_at = data.data.create_at;
|
157
|
152
|
}
|
158
|
153
|
|
|
@@ -168,9 +163,7 @@ Page({
|
168
|
163
|
_this.setData({
|
169
|
164
|
conversations: _this.sortarr(dataArr)
|
170
|
165
|
})
|
171
|
|
-
|
172
|
166
|
break;
|
173
|
|
- break;
|
174
|
167
|
}
|
175
|
168
|
},
|
176
|
169
|
sortarr:function(arr){
|