App.vue 2.5 KB

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