load.vue 547 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <view></view>
  3. </template>
  4. <script setup>
  5. import {onLoad} from '@dcloudio/uni-app'
  6. import {getStorage} from "@/utils/storage";
  7. onLoad(() => {
  8. uni.showLoading({
  9. title: '加载中...',
  10. mask: true
  11. });
  12. const isAppGuide = getStorage('app_guide') ?? false
  13. uni.hideLoading();
  14. if (isAppGuide) {
  15. uni.redirectTo({
  16. url: '/pages/login/login'
  17. });
  18. } else {
  19. //前往引导页
  20. uni.redirectTo({
  21. url: '/pages/guide/guide'
  22. });
  23. }
  24. })
  25. </script>