auth.vue 899 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. </template>
  3. <script lang="ts">
  4. import {
  5. defineComponent,
  6. computed,
  7. onMounted,
  8. ref,
  9. reactive,
  10. watch,
  11. getCurrentInstance,
  12. ComponentInternalInstance,
  13. toRefs,
  14. nextTick
  15. } from 'vue'
  16. import {useStore} from 'vuex'
  17. import {useRouter, useRoute} from 'vue-router'
  18. import * as source from "ol/source";
  19. import * as layer from "ol/layer";
  20. import * as format from "ol/format";
  21. export default defineComponent({
  22. name: '',
  23. components: {},
  24. setup() {
  25. const store = useStore();
  26. const router = useRouter();
  27. const route = useRoute();
  28. const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
  29. const state = reactive({
  30. })
  31. onMounted(() => {
  32. localStorage.setItem('auth', 'emmmmmm')
  33. router.push('/')
  34. })
  35. return {
  36. ...toRefs(state),
  37. }
  38. },
  39. })
  40. </script>
  41. <style scoped lang="scss">
  42. </style>