22
This commit is contained in:
@@ -402,4 +402,26 @@ export const getConversationContent = (message) => {
|
||||
return `${message.senderNickname}:${parseMessageByType(message)}`;
|
||||
}
|
||||
return parseMessageByType(message);
|
||||
};
|
||||
export const updateDot = (index,count) =>{
|
||||
if(count>0){
|
||||
uni.setTabBarBadge({
|
||||
index:index,
|
||||
text:(count<100?count:'99+')+'',
|
||||
});
|
||||
}else{
|
||||
uni.hideTabBarRedDot({index:index})
|
||||
}
|
||||
}
|
||||
export const updateTabbar = (index)=>{
|
||||
if(index===0 || index === undefined){
|
||||
updateDot(0,store.getters.storeUnReadCount);
|
||||
}
|
||||
if(index===1 || index === undefined){
|
||||
updateDot(1,store.getters.storeUnHandleFriendApplicationNum+store.getters.storeUnHandleGroupApplicationNum);
|
||||
}
|
||||
if(index===2 || index === undefined){
|
||||
updateDot(2,store.getters.storeCircleUnreadCount);
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user