优化聊天
This commit is contained in:
@@ -26,7 +26,12 @@ Page({
|
||||
console.log("wenzhen onload");
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
if(wx.$TUIKit){
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}else{
|
||||
app.imInit();
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}
|
||||
setInterval(() => {
|
||||
let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum");
|
||||
let service_notice_unreadnnum = wx.getStorageSync(userID+"_service_notice_unreadnnum");
|
||||
@@ -70,6 +75,11 @@ Page({
|
||||
}).then(() => {
|
||||
console.log("开始查询订单状态")
|
||||
this.formatStatus();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
// 补偿登录操作
|
||||
app.imInit();
|
||||
this.getConversationList();
|
||||
});
|
||||
},
|
||||
go(e){
|
||||
@@ -302,6 +312,7 @@ Page({
|
||||
})
|
||||
|
||||
if(wenzhen_info == 0) wenzhen_info = "";
|
||||
if(wenzhen_info > 99) wenzhen_info = "99+";
|
||||
wx.setStorageSync(userID+'_wenzhen_info', wenzhen_info);
|
||||
|
||||
this.setData({
|
||||
|
||||
Reference in New Issue
Block a user