index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view>
  3. <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="我的盲票包"></u-navbar>
  4. <!-- 卡券筛选 -->
  5. <view class="prize-state">
  6. <u-tabs @change="changeTab" :scrollable="false" :list="stateArr" lineWidth="40" lineHeight="1"
  7. lineColor="#D70909" :activeStyle="{
  8. color: '#D70909',
  9. transform: 'scale(1)'
  10. }" :inactiveStyle="{
  11. color: '#333',
  12. transform: 'scale(1)'
  13. }" itemStyle="padding-left: 25px; padding-right: 25px; height: 44px;">
  14. </u-tabs>
  15. </view>
  16. <!-- 兑奖列表 -->
  17. <view class="prize-coupon">
  18. <view class="prize-coupon-list">
  19. <view class="flex prize-coupon-list-item">
  20. <image src="../../static/logo.png" mode=""></image>
  21. <view class="flex info">
  22. <view class="flex desc">
  23. <view class="title">零跑汽车盲票</view>
  24. <view class="txt">面值:10元</view>
  25. <view class="txt">序列号:1212121212121212</view>
  26. </view>
  27. <view class="flex btn">
  28. <view class="action">立即开刮</view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. stateArr: [{
  41. name: '待兑奖'
  42. }, {
  43. name: '已兑奖',
  44. }],
  45. state: 0,
  46. };
  47. },
  48. methods: {
  49. changeTab(e) {
  50. if (e.index == 0) {
  51. this.state = 0
  52. } else if (e.index == 1) {
  53. this.state = 1
  54. }
  55. },
  56. changeChecked() {
  57. },
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .prize-state {
  63. position: fixed;
  64. background-color: #FFFFFF;
  65. width: 100%;
  66. padding-bottom: 16rpx;
  67. z-index: 10;
  68. }
  69. .prize-coupon {
  70. margin-top: 104rpx;
  71. padding: 40rpx 30rpx 100rpx;
  72. &-list {
  73. &-item {
  74. justify-content: space-between;
  75. background-color: #FFFFFF;
  76. padding: 40rpx 20rpx;
  77. border-radius: 10rpx;
  78. margin-bottom: 40rpx;
  79. image {
  80. width: 124rpx;
  81. height: 174rpx;
  82. }
  83. .info {
  84. position: relative;
  85. justify-content: space-between;
  86. flex: 1;
  87. }
  88. .desc {
  89. height: 174rpx;
  90. flex-direction: column;
  91. justify-content: space-between;
  92. align-items: flex-start;
  93. padding-left: 20rpx;
  94. }
  95. .txt {
  96. font-size: 24rpx;
  97. }
  98. .btn {
  99. flex-direction: column;
  100. }
  101. .amt {
  102. font-size: 48rpx;
  103. font-weight: bold;
  104. line-height: 72rpx;
  105. }
  106. text {
  107. font-size: 24rpx;
  108. }
  109. .action{
  110. width: 124rpx;
  111. height: 40rpx;
  112. line-height: 40rpx;
  113. border-radius: 20rpx;
  114. background-color: rgba(215, 9, 9, 100);
  115. color: rgba(255, 255, 255, 100);
  116. font-size: 24rpx;
  117. text-align: center
  118. }
  119. }
  120. &-item:last-child {
  121. margin-bottom: 0;
  122. }
  123. }
  124. }
  125. </style>