common-buttom.vue 3.0 KB

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