11
This commit is contained in:
13
src/main.js
13
src/main.js
@@ -88,12 +88,19 @@ function setupHeartbeatLogoutListener() {
|
||||
if (!authStore.isAuthenticated) {
|
||||
return;
|
||||
}
|
||||
authStore.currentUser.vip_end_time="2022-06-28T16:01:13";
|
||||
await router.replace({ name: "card-activate" });
|
||||
|
||||
authStore.redirectToCardActivate(router);
|
||||
});
|
||||
}
|
||||
|
||||
function setupVipWatch() {
|
||||
authStore.$subscribe(() => {
|
||||
if (!authStore.needsVipActivation) return;
|
||||
if (router.currentRoute.value.name === "card-activate") return;
|
||||
authStore.redirectToCardActivate(router);
|
||||
});
|
||||
}
|
||||
|
||||
setupHeartbeatLogoutListener();
|
||||
setupVipWatch();
|
||||
|
||||
app.mount("#app");
|
||||
|
||||
Reference in New Issue
Block a user