|
@@ -22,21 +22,11 @@ const { timer } = toRefs(data);
|
|
|
|
|
|
const handClick = () => {
|
|
|
//getClearTimer();
|
|
|
- //getCountDown();
|
|
|
if (!rankingWindowRef.value.rankingState) {
|
|
|
openRanking();
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const getCountDown = () => {
|
|
|
- timer.value = setTimeout(() => {
|
|
|
- if (
|
|
|
- !['/ranking', '/login', '/login/qrcode', '/login/mobile', '/login/sunshineRun', '/sunshineRun'].includes(router.currentRoute.value.fullPath)
|
|
|
- ) {
|
|
|
- router.push({ path: '/ranking' });
|
|
|
- }
|
|
|
- }, 1000 * 60 * 10);
|
|
|
-};
|
|
|
|
|
|
/**
|
|
|
* 定时打开排行榜
|
|
@@ -68,8 +58,14 @@ const getClearTimer = () => {
|
|
|
clearTimeout(timer.value);
|
|
|
};
|
|
|
|
|
|
+onBeforeMount(() => {
|
|
|
+ let state1 = localStorage.getItem('rankingSwitch1');
|
|
|
+ if (state1 == undefined) {
|
|
|
+ localStorage.setItem('rankingSwitch1', "1");
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
- //getCountDown();
|
|
|
openRanking();
|
|
|
const vConsole = new VConsole({ theme: 'dark' });
|
|
|
const vConsoleIcon: any = document.querySelector('.vc-switch');
|