This commit is contained in:
이진석
2020-02-05 16:49:56 +09:00
parent 8ac66c6e5a
commit 86d321737c

View File

@@ -22,31 +22,27 @@
<script> <script>
import authApi from "../../api/authApi"; import authApi from "../../api/authApi";
export default { export default {
name: "Info", name: "Info",
data() { data() {
return { return {
user: null, user: null,
init: false init: false
} }
}, },
async beforeCreate() { async beforeCreate() {
authApi.bind(this); authApi.bind(this);
try { try {
const { data } = await authApi.session(); const { data } = await authApi.session();
this.user = data; this.user = data;
} catch (err) { } catch (err) {
console.log(err); await this.$router.replace('/auth/login');
await this.$router.replace('/auth/login'); }
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.row {
display: flex;
justify-content: space-between;
}
</style> </style>