46 lines
1.0 KiB
Vue
46 lines
1.0 KiB
Vue
|
|
<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>
|