App.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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: 15px;
  86. font-weight: 600;
  87. width: 30%;
  88. color: #979797;
  89. text-align: left;
  90. }
  91. .column-right {
  92. float: left;
  93. font-size: 15px;
  94. font-weight: 600;
  95. width: 70%;
  96. color: #979797;
  97. text-align: right;
  98. }
  99. .section-title{
  100. font-size: 20px;
  101. font-weight: 600;
  102. }
  103. /* 底部导航 */
  104. .tabBar{ width:100%;height: 98rpx;background: #fff;border-top:1px solid #E5E5E5;position: fixed;bottom:0px;left:0px;right:0px;display: flex;align-items: center;justify-content: center;
  105. .tabBar_list{ width:98%;display: flex;justify-content: space-between;
  106. image{ width:48rpx;height: 48rpx;margin-bottom:2rpx}
  107. .tabBar_item{ width:25%;display: flex;justify-content: center;align-items: center;flex-direction: column;font-size: 20rpx;color: #969BA3;}
  108. .tabBar_item2{
  109. width:25%;height:100%;display: flex;justify-content: center;align-items: center;flex-direction: column;font-size: 20rpx;color: #969BA3;margin-top:-20rpx;position: relative;z-index: 101;
  110. image{ width:68rpx;height: 68rpx;}
  111. }
  112. }
  113. }
  114. .border_box{
  115. // pointer-events: none; 事件穿透解决z-index层级问题
  116. width:100%;height: 100rpx;display: flex;justify-content: center;align-items: center;position: fixed;left:0px;bottom:50rpx;z-index: 100;pointer-events: none;
  117. .tabBar_miden_border{ width:100rpx;height:50rpx;border-top:2rpx solid #E5E5E5;border-radius:50rpx 50rpx 0 0; /* 左上、右上、右下、左下 */background: #fff;}
  118. }
  119. .nav_active{color: #007AFF;}
  120. </style>