初始提交

This commit is contained in:
2026-01-04 11:09:06 +08:00
commit 8fa31df250
1326 changed files with 213907 additions and 0 deletions

24
pages/index/mixin.js Normal file
View File

@@ -0,0 +1,24 @@
import {
useChatStore
} from '@/store/modules/chat'
export default {
onShow() {
this.setTabBarBadge()
},
methods: {
setTabBarBadge() {
const chatStore = useChatStore()
const badgeNum = chatStore.getBadgeNum || 0
if (badgeNum) {
uni.setTabBarBadge({
index: 2,
text: badgeNum > 99 ? '99+' : badgeNum.toString()
});
} else {
uni.removeTabBarBadge({
index: 2
});
}
}
}
}