|
@@ -145,6 +145,12 @@ var webSocket = {
|
145
|
145
|
if (!heart) {
|
146
|
146
|
return;
|
147
|
147
|
}
|
|
148
|
+
|
|
149
|
+ self.sendSocketMessage({
|
|
150
|
+ msg: JSON.stringify({
|
|
151
|
+ form_id: getApp().UserId(),
|
|
152
|
+ type: 'resetChatTotal'})})
|
|
153
|
+
|
148
|
154
|
self.sendSocketMessage({
|
149
|
155
|
msg: JSON.stringify({
|
150
|
156
|
form_id: getApp().UserId(),
|
|
@@ -217,8 +223,15 @@ wx.onSocketMessage(function (res) {
|
217
|
223
|
if (data.data.message_exists == true){
|
218
|
224
|
wx.setTabBarBadge({
|
219
|
225
|
index: 0,
|
220
|
|
- text: ' 1'
|
|
226
|
+ text: '1'
|
221
|
227
|
})
|
|
228
|
+ }else{
|
|
229
|
+ wx.removeTabBarBadge({
|
|
230
|
+ index: 0,
|
|
231
|
+ });
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
222
|
235
|
}
|
223
|
236
|
break;
|
224
|
237
|
}
|