App.vue 832 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <script>
  2. import config from './config'
  3. import store from '@/store'
  4. import { getToken } from '@/utils/auth'
  5. export default {
  6. onLaunch: function() {
  7. this.initApp()
  8. },
  9. methods: {
  10. // 初始化应用
  11. initApp() {
  12. // 初始化应用配置
  13. this.initConfig()
  14. // 检查用户登录状态
  15. //#ifdef H5
  16. this.checkLogin()
  17. //#endif
  18. },
  19. initConfig() {
  20. this.globalData.config = config
  21. },
  22. checkLogin() {
  23. if (!getToken()) {
  24. this.$tab.reLaunch('/pages/login')
  25. // this.$tab.reLaunch('/pages/me/me.vue')
  26. }
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. @import '@/static/scss/index.scss';
  33. @import './static/font/iconfont.css';
  34. .uni-list-cell-db{
  35. max-width: 75% !important;
  36. }
  37. </style>