fix service worker

This commit is contained in:
jxxghp
2024-06-05 22:21:27 +08:00
parent e649be58a2
commit d559e1717c
2 changed files with 14 additions and 6 deletions

View File

@@ -119,10 +119,10 @@ async function subscribeForPushNotifications() {
async function afterLogin() {
// 生效主题配置
await setTheme()
// 订阅推送通知
await subscribeForPushNotifications()
// 跳转到首页或回原始页面
router.push(store.state.auth.originalPath ?? '/')
// 订阅推送通知
await subscribeForPushNotifications()
}
// 登录获取token事件