北斗应用技术培训考试题库
This commit is contained in:
45
src/views/Main.vue
Normal file
45
src/views/Main.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="common-layout w-h-full">
|
||||
<el-container class="w-h-full">
|
||||
<el-main style="padding: 0">
|
||||
<Main />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from "vue";
|
||||
|
||||
import $http from "../api/index";
|
||||
import $url from "../api/url";
|
||||
|
||||
import Main from "../components/page/main.vue";
|
||||
|
||||
onMounted(() => {
|
||||
if (
|
||||
localStorage.data &&
|
||||
localStorage.data !== "" &&
|
||||
localStorage.data !== null &&
|
||||
localStorage.data !== undefined &&
|
||||
localStorage.data !== NaN
|
||||
) {
|
||||
const data = {
|
||||
data: localStorage.data,
|
||||
};
|
||||
$http.post($url.loginStatus, data).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
return;
|
||||
} else {
|
||||
localStorage.clear();
|
||||
window.location.href = window.location.href.replace("/main", "/initialService");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
localStorage.clear();
|
||||
window.location.href = window.location.href.replace("/main", "/initialService");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user