This commit is contained in:
cansnow
2026-01-15 22:50:35 +08:00
parent dd16348558
commit db99bebcb4
26 changed files with 433 additions and 284 deletions
+22
View File
@@ -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);
}
};