mirror of
https://github.com/TangSengDaoDao/TangSengDaoDaoWeb
synced 2025-06-06 17:57:13 +00:00
commit
26b68cae01
@ -256,6 +256,12 @@ export default class WKApp extends ProviderListener {
|
|||||||
WKApp.loginInfo.load(); // 加载登录信息
|
WKApp.loginInfo.load(); // 加载登录信息
|
||||||
|
|
||||||
const themeMode = StorageService.shared.getItem("theme-mode");
|
const themeMode = StorageService.shared.getItem("theme-mode");
|
||||||
|
const currentSystemThemeModeIsDark = window.matchMedia(
|
||||||
|
"(prefers-color-scheme: dark)"
|
||||||
|
).matches;
|
||||||
|
if (!themeMode && currentSystemThemeModeIsDark) {
|
||||||
|
WKApp.config.themeMode = ThemeMode.dark;
|
||||||
|
}
|
||||||
if (themeMode === "1") {
|
if (themeMode === "1") {
|
||||||
WKApp.config.themeMode = ThemeMode.dark;
|
WKApp.config.themeMode = ThemeMode.dark;
|
||||||
}
|
}
|
||||||
@ -381,7 +387,9 @@ export default class WKApp extends ProviderListener {
|
|||||||
|
|
||||||
// 我的用户头像发送改变
|
// 我的用户头像发送改变
|
||||||
myUserAvatarChange() {
|
myUserAvatarChange() {
|
||||||
this.changeChannelAvatarTag(new Channel(WKApp.loginInfo.uid||"", ChannelTypePerson));
|
this.changeChannelAvatarTag(
|
||||||
|
new Channel(WKApp.loginInfo.uid || "", ChannelTypePerson)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
changeChannelAvatarTag(channel: Channel) {
|
changeChannelAvatarTag(channel: Channel) {
|
||||||
@ -389,7 +397,7 @@ export default class WKApp extends ProviderListener {
|
|||||||
if (channel) {
|
if (channel) {
|
||||||
myAvatarTag = `channelAvatarTag:${channel.channelType}${channel.channelID}`;
|
myAvatarTag = `channelAvatarTag:${channel.channelType}${channel.channelID}`;
|
||||||
}
|
}
|
||||||
console.log('changeChannelAvatarTag0----->')
|
console.log("changeChannelAvatarTag0----->");
|
||||||
const t = new Date().getTime();
|
const t = new Date().getTime();
|
||||||
WKApp.loginInfo.setStorageItem(myAvatarTag, `${t}`);
|
WKApp.loginInfo.setStorageItem(myAvatarTag, `${t}`);
|
||||||
}
|
}
|
||||||
@ -532,11 +540,14 @@ export default class WKApp extends ProviderListener {
|
|||||||
|
|
||||||
public setFriendApplysUnreadCount() {
|
public setFriendApplysUnreadCount() {
|
||||||
if (WKApp.loginInfo.isLogined()) {
|
if (WKApp.loginInfo.isLogined()) {
|
||||||
WKApp.apiClient.get(`/user/reddot/friendApply`).then(res=>{
|
WKApp.apiClient.get(`/user/reddot/friendApply`).then((res) => {
|
||||||
WKApp.mittBus.emit('friend-applys-unread-count', res.count)
|
WKApp.mittBus.emit("friend-applys-unread-count", res.count);
|
||||||
WKApp.loginInfo.setStorageItem(`${WKApp.loginInfo.uid}-friend-applys-unread-count`, res.count);
|
WKApp.loginInfo.setStorageItem(
|
||||||
|
`${WKApp.loginInfo.uid}-friend-applys-unread-count`,
|
||||||
|
res.count
|
||||||
|
);
|
||||||
WKApp.menus.refresh();
|
WKApp.menus.refresh();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -551,7 +562,9 @@ export default class WKApp extends ProviderListener {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if (WKApp.loginInfo.isLogined()) {
|
if (WKApp.loginInfo.isLogined()) {
|
||||||
const num = WKApp.loginInfo.getStorageItem(`${WKApp.loginInfo.uid}-friend-applys-unread-count`)
|
const num = WKApp.loginInfo.getStorageItem(
|
||||||
|
`${WKApp.loginInfo.uid}-friend-applys-unread-count`
|
||||||
|
);
|
||||||
unreadCount = Number(num);
|
unreadCount = Number(num);
|
||||||
}
|
}
|
||||||
return unreadCount;
|
return unreadCount;
|
||||||
@ -577,7 +590,10 @@ export default class WKApp extends ProviderListener {
|
|||||||
// WKApp.endpointManager.invokes(EndpointCategory.friendApplyDataChange);
|
// WKApp.endpointManager.invokes(EndpointCategory.friendApplyDataChange);
|
||||||
// }
|
// }
|
||||||
if (WKApp.loginInfo.isLogined()) {
|
if (WKApp.loginInfo.isLogined()) {
|
||||||
WKApp.loginInfo.setStorageItem(`${WKApp.loginInfo.uid}-friend-applys-unread-count`, '0')
|
WKApp.loginInfo.setStorageItem(
|
||||||
|
`${WKApp.loginInfo.uid}-friend-applys-unread-count`,
|
||||||
|
"0"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
await WKApp.apiClient.delete(`/user/reddot/friendApply`);
|
await WKApp.apiClient.delete(`/user/reddot/friendApply`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user