App.vue 837 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <script>
  2. // import routingIntercept from '@/common/permission.js'
  3. import {
  4. getToken
  5. } from '@/common/auth.js'
  6. export default {
  7. onLoad(e) {
  8. console.log("wwwww",e);
  9. },
  10. onLaunch: function() {
  11. if (getToken()) {
  12. // uni.reLaunch({
  13. // url: '/pages/index/index'
  14. // })
  15. } else {
  16. uni.reLaunch({
  17. url: '/pages/login/index'
  18. })
  19. }
  20. // routingIntercept()
  21. console.log('App Launch')
  22. },
  23. onShow: function() {
  24. console.log('App Show')
  25. },
  26. onHide: function() {
  27. console.log('App Hide')
  28. }
  29. }
  30. </script>
  31. <style>
  32. /*每个页面公共css */
  33. @font-face {
  34. /* font-family: 'puhui';
  35. src: url('./static/fonts/AlibabaPuHuiTi-3-65-Medium.ttf'); */
  36. }
  37. .global-font {
  38. /* font-family: 'puhui';
  39. font-size: 16px;
  40. color: #333; */
  41. }
  42. uni-page-body,
  43. html,
  44. body {
  45. height: 100%;
  46. }
  47. </style>