App.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <script>
  2. import {
  3. getToken
  4. } from "@/common/auth.js";
  5. //应用生命周期仅可在App.vue中监听,在其它页面监听无效
  6. export default {
  7. onLaunch: function() {
  8. console.log('App Launch');
  9. },
  10. onShow: function() {
  11. console.log('App Show');
  12. //console.info(globalData.isLogin);
  13. },
  14. onHide: function() {
  15. console.log('App Hide');
  16. },
  17. //js中操作globalData的方式如下: getApp().globalData.text = 'test'
  18. globalData: {
  19. //isLogin: getLogin() //api接口统一配置
  20. },
  21. };
  22. </script>
  23. <style lang="scss">
  24. /*全局样式*/
  25. /* #ifndef APP-PLUS-NVUE */
  26. @import './common/uni.css';
  27. @import 'common/font-awesome-4.7.0/css/font-awesome.css';
  28. /* #endif*/
  29. /* 解决头条小程序组件内引入字体不生效的问题 */
  30. /* #ifdef MP-TOUTIAO */
  31. @font-face {
  32. font-family: uniicons;
  33. src: url('/static/uni.ttf');
  34. }
  35. /* #endif */
  36. /* 以下样式用于 hello uni-app 演示所需 */
  37. page {
  38. background-color: #fff;
  39. height: 100%;
  40. font-size: 13px;
  41. line-height: 1.8;
  42. }
  43. .pointer {
  44. cursor: pointer;
  45. }
  46. .uni-header-logo {
  47. padding: 30rpx;
  48. flex-direction: column;
  49. justify-content: center;
  50. align-items: center;
  51. margin-top: 10rpx;
  52. }
  53. .uni-header-image {
  54. width: 100px;
  55. height: 100px;
  56. }
  57. .uni-hello-text {
  58. color: #7A7E83;
  59. }
  60. .uni-hello-addfile {
  61. text-align: center;
  62. line-height: 300rpx;
  63. background: #FFF;
  64. padding: 50rpx;
  65. margin-top: 10px;
  66. font-size: 38rpx;
  67. color: #808080;
  68. }
  69. .font13{
  70. font-size:13rpx;
  71. }
  72. .font15{
  73. font-size:15rpx;
  74. }
  75. .slot-box {
  76. width: 100%;
  77. padding: 5px;
  78. }
  79. .row {
  80. width: 100%;
  81. clear:both;
  82. }
  83. .column-left {
  84. float: left;
  85. font-size: 13px;
  86. width: 30%;
  87. line-height: 30px;
  88. color: #979797;
  89. font-weight: 600;
  90. text-align: left;
  91. }
  92. .column-right {
  93. float: left;
  94. font-size: 13px;
  95. width: 70%;
  96. line-height: 30px;
  97. color: #979797;
  98. font-weight: 600;
  99. text-align: left;
  100. }
  101. .section-title{
  102. font-size: 15px;
  103. font-weight: 900;
  104. color: #666666;
  105. }
  106. </style>