App.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <script>
  2. export default {
  3. onLaunch: function () {
  4. //应用初始化完成触发(只触发一次)
  5. // const token = uni.getStorageSync('UserKey'); //获取token
  6. // if (token) {
  7. // //存在则关闭启动页进入首页
  8. // plus.navigator.closeSplashscreen();
  9. // } else {
  10. // //不存在则跳转至登录页
  11. // uni.reLaunch({
  12. // url: '/pages/login/index',
  13. // success: () => {
  14. // plus.navigator.closeSplashscreen();
  15. // }
  16. // });
  17. // }
  18. },
  19. onShow: function () {
  20. console.log('App Show');
  21. },
  22. onHide: function () {
  23. console.log('App Hide');
  24. }
  25. };
  26. </script>
  27. <style lang="scss">
  28. /* #ifndef APP-PLUS-NVUE */
  29. /* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
  30. @import './common/uni.css';
  31. @import '@/static/customicons.css';
  32. /* H5 兼容 pc 所需 */
  33. /* #ifdef H5 */
  34. @media screen and (min-width: 768px) {
  35. body {
  36. overflow-y: scroll;
  37. }
  38. }
  39. /* 顶栏通栏样式 */
  40. /* .uni-top-window {
  41. left: 0;
  42. right: 0;
  43. } */
  44. uni-page-body {
  45. background-color: #F5F5F5 !important;
  46. min-height: 100% !important;
  47. height: auto !important;
  48. }
  49. .uni-top-window uni-tabbar .uni-tabbar {
  50. background-color: #fff !important;
  51. }
  52. .uni-app--showleftwindow .hideOnPc {
  53. display: none !important;
  54. }
  55. /* #endif */
  56. /* 以下样式用于 hello uni-app 演示所需 */
  57. page {
  58. background-color: #efeff4;
  59. height: 100%;
  60. font-size: 28rpx;
  61. /* line-height: 1.8; */
  62. }
  63. .fix-pc-padding {
  64. padding: 0 50px;
  65. }
  66. .uni-header-logo {
  67. padding: 30rpx;
  68. flex-direction: column;
  69. justify-content: center;
  70. align-items: center;
  71. margin-top: 10rpx;
  72. }
  73. .uni-header-image {
  74. width: 100px;
  75. height: 100px;
  76. }
  77. .uni-hello-text {
  78. color: #7A7E83;
  79. }
  80. .uni-hello-addfile {
  81. text-align: center;
  82. line-height: 300rpx;
  83. background: #FFF;
  84. padding: 50rpx;
  85. margin-top: 10px;
  86. font-size: 38rpx;
  87. color: #808080;
  88. }
  89. /* #endif*/
  90. @import "colorui/main.css";
  91. @import "colorui/icon.css";
  92. </style>