App.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <style lang="scss">
  2. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  3. @import "@/uni_modules/uview-ui/index.scss";
  4. @font-face {
  5. font-family: "AktivBold"; // 引入字体包,自己起的名字
  6. src: url('https://yys.opencool.top/AktivGroteskXBold.ttf') format('truetype');; // 字体包本地路径
  7. }
  8. *{
  9. font-family: AktivBold;
  10. }
  11. </style>
  12. <script>
  13. import config from './config'
  14. import store from '@/store'
  15. import { getToken } from '@/utils/auth'
  16. export default {
  17. onLaunch: function() {
  18. this.initApp()
  19. },
  20. methods: {
  21. // 初始化应用
  22. initApp() {
  23. // 初始化应用配置
  24. this.initConfig()
  25. // 检查用户登录状态
  26. //#ifdef H5
  27. this.checkLogin()
  28. //#endif
  29. },
  30. initConfig() {
  31. this.globalData.config = config
  32. },
  33. checkLogin() {
  34. // if (!getToken()) {
  35. // this.$tab.reLaunch('/pages/login')
  36. // }
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss">
  42. @import '@/static/scss/index.scss'
  43. </style>