fix
This commit is contained in:
parent
ac76d704cb
commit
2409e0ea0e
1 changed files with 6 additions and 6 deletions
12
src/App.vue
12
src/App.vue
|
@ -20,23 +20,23 @@ export default {
|
||||||
Footer,
|
Footer,
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const jwt = localStorage.getItem("token");
|
const jwt = JSON.parse(localStorage.getItem("token"));
|
||||||
const wind = localStorage.getItem("wind404");
|
const wind = JSON.parse(localStorage.getItem("wind404"));
|
||||||
|
|
||||||
if (jwt) {
|
if (jwt) {
|
||||||
this.$store.commit("setToken", jwt);
|
this.$store.commit("setToken", jwt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Object.assign(axios.defaults, {
|
||||||
|
headers: { Authorization: this.$store.state.user.token },
|
||||||
|
});
|
||||||
|
|
||||||
if (wind) {
|
if (wind) {
|
||||||
this.$store.commit("setWind", wind);
|
this.$store.commit("setWind", wind);
|
||||||
} else {
|
} else {
|
||||||
this.$store.commit("setWind", wind);
|
this.$store.commit("setWind", wind);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(axios.defaults, {
|
|
||||||
headers: { Authorization: this.$store.state.user.token },
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.$store.state.debug) {
|
if (this.$store.state.debug) {
|
||||||
this.$buefy.snackbar.open({
|
this.$buefy.snackbar.open({
|
||||||
message: this.$t("errors.devBuild"),
|
message: this.$t("errors.devBuild"),
|
||||||
|
|
Loading…
Reference in a new issue