|
@@ -6,10 +6,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { getInfo } from '@/api/login'
|
|
|
import ReRecord from './components/ReRecord.vue'
|
|
|
import Login from './components/Login.vue'
|
|
|
import useUserStore from "@/store/user";
|
|
|
+import { onMounted } from 'vue';
|
|
|
const userStore = useUserStore();
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getInfo().then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ userStore.setLogin(true);
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ userStore.setLogin(false);
|
|
|
+ });
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped></style>
|