|
@@ -13,36 +13,36 @@ const { proxy } = getCurrentInstance() as any;
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
const data = reactive<any>({
|
|
const data = reactive<any>({
|
|
- timer: null,
|
|
|
|
-
|
|
|
|
|
|
+ timer: null
|
|
});
|
|
});
|
|
const { timer } = toRefs(data);
|
|
const { timer } = toRefs(data);
|
|
|
|
|
|
-
|
|
|
|
const handClick = () => {
|
|
const handClick = () => {
|
|
- getClearTimer()
|
|
|
|
|
|
+ getClearTimer();
|
|
getCountDown();
|
|
getCountDown();
|
|
};
|
|
};
|
|
|
|
|
|
const getCountDown = () => {
|
|
const getCountDown = () => {
|
|
timer.value = setTimeout(() => {
|
|
timer.value = setTimeout(() => {
|
|
- if (!['/ranking', '/login/mobile', '/sunshineRun'].includes(router.currentRoute.value.fullPath)) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ !['/ranking', '/login', '/login/qrcode', '/login/mobile', '/login/sunshineRun', '/sunshineRun'].includes(router.currentRoute.value.fullPath)
|
|
|
|
+ ) {
|
|
router.push({ path: '/ranking' });
|
|
router.push({ path: '/ranking' });
|
|
}
|
|
}
|
|
- }, 1000 * 60 * 10)
|
|
|
|
|
|
+ }, 1000 * 60 * 10);
|
|
};
|
|
};
|
|
|
|
|
|
const getClearTimer = () => {
|
|
const getClearTimer = () => {
|
|
- clearTimeout(timer.value)
|
|
|
|
|
|
+ clearTimeout(timer.value);
|
|
};
|
|
};
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- getCountDown()
|
|
|
|
-})
|
|
|
|
|
|
+ getCountDown();
|
|
|
|
+});
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
- getClearTimer()
|
|
|
|
-})
|
|
|
|
|
|
+ getClearTimer();
|
|
|
|
+});
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.app-main {
|
|
.app-main {
|
|
@@ -64,4 +64,5 @@ onBeforeUnmount(() => {
|
|
// ::-webkit-scrollbar-thumb {
|
|
// ::-webkit-scrollbar-thumb {
|
|
// background-color: #c0c0c0;
|
|
// background-color: #c0c0c0;
|
|
// border-radius: 3px;
|
|
// border-radius: 3px;
|
|
-// }</style>
|
|
|
|
|
|
+// }
|
|
|
|
+</style>
|