[status page] improve the entry

This commit is contained in:
LouisLam
2021-09-23 13:57:24 +08:00
parent 5f533b9091
commit 439f45d91e
5 changed files with 50 additions and 19 deletions

View File

@@ -111,28 +111,15 @@ export default {
},
watch: {
$route(to, from) {
this.init();
},
},
mounted() {
this.init();
},
methods: {
async init() {
if (this.$route.name === "root") {
let entryPage = (await axios.get("/api/entry-page")).data;
if (entryPage === "statusPage") {
this.$router.push("/status-page");
} else {
this.$router.push("/dashboard");
}
}
},
},
};