reindent
This commit is contained in:
@@ -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>
|
||||||
Reference in New Issue
Block a user