App.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. console.log('App Launch')
  5. this.$store.commit('getCity', '')
  6. const res = wx.getSystemInfoSync()
  7. var statusbarH = res.statusBarHeight
  8. this.$store.commit('getHeight',statusbarH)
  9. let tabList =[]
  10. this.$http('/addons/ddrive/banner/market_setting').then(data=>{
  11. if(data.dj_status==1){
  12. tabList.push({
  13. name: '代驾',
  14. id:0
  15. })
  16. }
  17. if(data.sf_status==1){
  18. tabList.push({
  19. name: '顺风车',
  20. id:1
  21. })
  22. }
  23. if(data.dc_status==1){
  24. tabList.push({
  25. name: '货运',
  26. id:2
  27. })
  28. }
  29. this.$store.commit('getTab',tabList)
  30. })
  31. },
  32. onShow: function() {
  33. console.log('App Show')
  34. },
  35. onHide: function() {
  36. console.log('App Hide')
  37. }
  38. }
  39. </script>
  40. <style lang="scss">
  41. uni-page-body {
  42. color: $gray !important;
  43. font-size: 30rpx !important;
  44. }
  45. // 自定义头部,状态栏盒子样式
  46. /* #ifdef APP-PLUS */
  47. .status_bar {
  48. height: var(--status-bar-height);
  49. width: 100%;
  50. }
  51. /* #endif */
  52. // tab切换选中加下边框
  53. .active-bb {
  54. &::after {
  55. content: '';
  56. position: absolute;
  57. width: 90%;
  58. height: 5rpx;
  59. background-color: $blue;
  60. left: 5%;
  61. bottom: -25rpx;
  62. }
  63. }
  64. // filed
  65. .u-field {
  66. padding: 26rpx 34rpx !important;
  67. .u-label-text {
  68. font-weight: 700 !important;
  69. }
  70. }
  71. // 提交按钮
  72. .u-btn--primary {
  73. background: linear-gradient(to right,#00b6b4,#00d496) !important;
  74. border-radius: 0rpx !important;
  75. margin: 0rpx !important;
  76. width: 100% !important;
  77. }
  78. .u-size-default {
  79. height: 90rpx !important;
  80. font-weight: 700 !important;
  81. }
  82. // cell组件右边箭头对其文字
  83. .u-cell_title {
  84. // font-weight: 700 !important;
  85. color: #333 !important;
  86. }
  87. .u-cell__right-icon-wrap {
  88. height: 55rpx !important;
  89. }
  90. /*每个页面公共css */
  91. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  92. @import "uview-ui/index.scss";
  93. @import './common/common.scss'
  94. </style>