App.vue 848 B

1234567891011121314151617181920212223242526272829303132333435
  1. <script setup lang="ts">
  2. import { onLaunch } from '@dcloudio/uni-app'
  3. import { useAuthStore } from './store/auth'
  4. import { configTheme } from './components/theme/ThemeDefine';
  5. const authStore = useAuthStore();
  6. onLaunch(() => {
  7. console.log('App Launch');
  8. uni.loadFontFace({
  9. global: true,
  10. family: "SongtiSCBlack",
  11. source: 'url("https://mncdn.wenlvti.net/assets/fonts/STSongti-SC-Black.woff")',
  12. })
  13. authStore.loadLoginState();
  14. })
  15. configTheme((theme) => {
  16. theme.colorConfigs.default.primary = '#d9492e';
  17. theme.colorConfigs.pressed.primary = '#882d1d';
  18. theme.colorConfigs.background.primary = '#ffcfc6';
  19. return theme;
  20. });
  21. </script>
  22. <style lang="scss">
  23. @use "@/common/scss/fonts.scss" as *;
  24. @use "@/common/scss/common.scss" as *;
  25. @use "@/common/scss/global/base.scss" as *;
  26. @use "@/components/index.scss" as *;
  27. </style>