common-buttom.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view>
  3. <view class="safe-area-inset-bottom">
  4. <view class="u-bottom-height" ></view>
  5. </view>
  6. <view class="safe-area-inset-bottom u-bottom-fixed">
  7. <view class='lottery-bottom dir-left-nowrap cross-center'>
  8. <view @click="nav(`/plugins/lottery/index/index`)" class="box-grow-1 dir-left-nowrap main-center cross-center">
  9. <icon class="icon" :class="status==='index' ? 'icon-ht': 'icon-hf'" type></icon>
  10. <view :class="status==='index' ? 'red': 'gray'">抽奖会场</view>
  11. </view>
  12. <view class="line"></view>
  13. <view @click="nav(`/plugins/lottery/prize/prize`)" class="box-grow-1 dir-left-nowrap main-center cross-center">
  14. <icon class="icon" :class="status==='index' ? 'icon-jf': 'icon-jt'" type></icon>
  15. <view :class="status==='index' ? 'gray': 'red'">抽奖记录</view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import {mapState} from 'vuex';
  23. export default {
  24. name: 'common-buttom',
  25. computed: {
  26. ...mapState('gConfig', {
  27. iphone: (data) => {
  28. return data.iphone;
  29. },
  30. iphoneHeight: (state) => {
  31. return state.iphoneHeight;
  32. },
  33. })
  34. },
  35. props: {
  36. status: {
  37. type: String,
  38. default: 'index'
  39. },
  40. },
  41. methods: {
  42. nav(url) {
  43. uni.redirectTo({url});
  44. },
  45. }
  46. }
  47. </script>
  48. <style scoped lang="scss">
  49. .lottery-bottom {
  50. width: 100%;
  51. height: #{96rpx};
  52. border-top: #{1rpx} solid #e2e2e2;
  53. color: #999;
  54. .line {
  55. height: #{48rpx};
  56. width: #{1rpx};
  57. background: #e2e2e2;
  58. }
  59. .icon {
  60. width: #{34rpx};
  61. height: #{33rpx};
  62. background-repeat: no-repeat;
  63. background-size: 100% 100%;
  64. margin: 0 #{16rpx};
  65. }
  66. .icon.icon-ht {
  67. background-image: url('./image/lottery-hc-t.png');
  68. }
  69. .icon.icon-hf {
  70. background-image: url('./image/lottery-hc-f.png');
  71. }
  72. .icon.icon-jt {
  73. background-image: url('./image/lottery-jl-t.png');
  74. }
  75. .icon.icon-jf {
  76. background-image: url('./image/lottery-jl-f.png');
  77. }
  78. .gray {
  79. color: #999999;
  80. }
  81. .red {
  82. color: #ff4544;
  83. }
  84. }
  85. .navbar + .body {
  86. padding-bottom: #{115rpx};
  87. }
  88. .navbar + .body .lottery-bottom {
  89. bottom: #{115rpx};
  90. }
  91. .u-bottom-fixed {
  92. position: fixed;
  93. bottom: 0;
  94. left: 0;
  95. width: 100%;
  96. z-index: 1500;
  97. background-color: #ffffff;
  98. box-shadow: 0 -1rpx 20rpx -15rpx #353535;
  99. }
  100. .u-bottom-height {
  101. height: 96upx;
  102. }
  103. </style>