feat: 调整布局
This commit is contained in:
@@ -27,7 +27,9 @@ import { useRouter } from "vue-router";
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const currentId = ref(1)
|
const currentId = ref(1)
|
||||||
|
|
||||||
const handleClick = async (item: any) => {
|
const handleClick = async (item: any) => {
|
||||||
|
console.log("🚀 ~ handleClick ~ item:", item)
|
||||||
currentId.value = item.id
|
currentId.value = item.id
|
||||||
router.push(item.url);
|
router.push(item.url);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,12 @@ router.beforeEach((to: any, from: any, next: any) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (token && to.path !== "/home") {
|
if (token && to.path === "/login") {
|
||||||
|
next({ path: "/home" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token && to.path === "/") {
|
||||||
next({ path: "/home" });
|
next({ path: "/home" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<Layout>
|
|
||||||
<div class="bg-white box-border w-full h-full rounded-[16px] p-[20px]">
|
<div class="bg-white box-border w-full h-full rounded-[16px] p-[20px]">
|
||||||
<RateTitleSection />
|
<RateTitleSection />
|
||||||
<RatePanelSection />
|
<RatePanelSection />
|
||||||
<RateContentSection />
|
<RateContentSection />
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="Rate">
|
<script setup lang="ts" name="Rate">
|
||||||
|
|||||||
Reference in New Issue
Block a user