App.vue 426 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <view class="app-container">
  3. <slot />
  4. </view>
  5. </template>
  6. <script setup>
  7. import { onLaunch } from '@dcloudio/uni-app'
  8. import { useUserStore } from '@/stores/user'
  9. const userStore = useUserStore()
  10. onLaunch(() => {
  11. if (userStore.isLoggedIn) {
  12. userStore.fetchProfile().catch(() => {})
  13. }
  14. })
  15. </script>
  16. <style>
  17. .app-container {
  18. min-height: 100vh;
  19. background: #0c0a1a;
  20. color: #ffffff;
  21. }
  22. </style>