|
@@ -8,7 +8,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {defineAsyncComponent} from "vue";
|
|
|
+import { defineAsyncComponent } from "vue";
|
|
|
import Router from "@/router";
|
|
|
|
|
|
export default {
|
|
@@ -20,9 +20,14 @@ export default {
|
|
|
Bottom: defineAsyncComponent(() => import('@/components/main/Bottom.vue')),
|
|
|
},
|
|
|
mounted() {
|
|
|
- if ( (this.$store.state.token && this.$store.state.token=='') || localStorage.getItem('user-token') ) {
|
|
|
+ if ((this.$store.state.token && this.$store.state.token == '') || localStorage.getItem('user-token')) {
|
|
|
} else {
|
|
|
+ if (location.search.indexOf("?token=") > -1) {
|
|
|
+ localStorage.setItem('user-token', location.search.replace("?token=", ""))
|
|
|
+ window.location.href = location.origin
|
|
|
+ } else {
|
|
|
window.location.href = '/login'
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|