App.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <script>
  2. export default {
  3. globalData: {
  4. navHeight: "",
  5. },
  6. onLaunch: function() {
  7. console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
  8. console.log('App Launch')
  9. wx.getSystemInfo({
  10. success: res => {
  11. this.globalData.navHeight = res.statusBarHeight + 52 + "px"; // 赋值导航高度
  12. },
  13. fail(err) {
  14. console.log(err);
  15. }
  16. })
  17. },
  18. onShow: function() {
  19. console.log('App Show')
  20. },
  21. onHide: function() {
  22. console.log('App Hide')
  23. }
  24. }
  25. </script>
  26. <style>
  27. /*每个页面公共css */
  28. /* 解决头条小程序组件内引入字体不生效的问题 */
  29. /* #ifdef MP-TOUTIAO */
  30. @font-face {
  31. font-family: uniicons;
  32. src: url("/static/uni.ttf");
  33. }
  34. /* #endif */
  35. .home {
  36. width: 97%;
  37. margin: 0 auto;
  38. /* padding-top: 23%; */
  39. }
  40. /deep/.uni-forms-item__inner {
  41. padding-bottom: 0rpx !important;
  42. margin-bottom: 30rpx !important;
  43. border-bottom: 0.5rpx solid #CCCCCC !important;
  44. }
  45. /* /deep/ .share .uni-popup .uni-popup__wrapper{
  46. width: 70% !important;
  47. border-radius: 15rpx !important;
  48. }
  49. /deep/ .share1 .uni-popup .uni-popup__wrapper{
  50. width: 85% !important;
  51. } */
  52. </style>