This commit is contained in:
2025-06-25 20:25:40 +08:00
parent 90d974d739
commit 8e6df5b498
14 changed files with 357 additions and 31 deletions

View File

@@ -1,17 +1,23 @@
<script setup>
import {onMounted} from "vue";
import {useSystemStore} from "./pinia/SystemStore/index.js";
import {useRoute} from "vue-router";
import {toPath} from "./utils/index.js";
const SystemStore = useSystemStore();
const route = useRoute();
onMounted(() => {
const isRoot = SystemStore.isRoot;
SystemStore.clearRouter().then(() => {
SystemStore.setRouter(isRoot).then(() => {
toPath(SystemStore.NOW_ROUTER, SystemStore.NOW_ROUTER_QUERY);
if (window.location.href.indexOf('/manage-materials') < 0) {
SystemStore.clearRouter().then(() => {
SystemStore.setRouter(isRoot).then(() => {
toPath(SystemStore.NOW_ROUTER, SystemStore.NOW_ROUTER_QUERY);
});
});
});
} else {
toPath('/manage-materials', SystemStore.NOW_ROUTER_QUERY, true);
}
});
</script>