App.tsx 600 B

123456789101112131415161718192021
  1. import { defineComponent, KeepAlive } from 'vue'
  2. import { close } from '/src/helpers/loading'
  3. import qs from 'query-string'
  4. import './vue-tsx-shim.d'
  5. import './app.d'
  6. // 关闭默认加载loading
  7. close()
  8. export default defineComponent({
  9. mounted() {
  10. const parseSearch: any = qs.parse(location.search)
  11. const hashSearch = qs.parse(location.href.split('#/')[1])
  12. const Authorization: string = parseSearch.Authorization || hashSearch.Authorization || ''
  13. sessionStorage.setItem('Authorization', Authorization)
  14. },
  15. render() {
  16. return (
  17. <router-view></router-view>
  18. )
  19. }
  20. })