index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view>
  3. <!-- 非H5撑高元素 -->
  4. <view class="status_bar"></view>
  5. <view class="box">
  6. <view class="box-top">
  7. <view class="box-top-action">
  8. <view class="box-top-action-item">
  9. <view class="flex box-top-action-item-cir">
  10. <u-icon name="scan" color="#fff" size="45"></u-icon>
  11. </view>
  12. <view class="box-top-action-item-txt">扫一扫</view>
  13. </view>
  14. <view class="box-top-action-item">
  15. <view class="flex box-top-action-item-cir">
  16. <u-icon name="gift" color="#fff" size="45"></u-icon>
  17. </view>
  18. <view class="box-top-action-item-txt">奖品库</view>
  19. </view>
  20. </view>
  21. <view class="box-top-tip">
  22. <view class="flex box-top-tip-txt">
  23. <u-icon name="file-text" color="#fff" size="20"></u-icon>
  24. <text>规则说明</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="box-ticket">
  29. <carousel :img-list="imgList" url-key="url" @selected="selectedBanner"/>
  30. </view>
  31. </view>
  32. <custom-tab-bar :activeValue="'index'" />
  33. </view>
  34. </template>
  35. <script>
  36. import env from '../../config/env.js'
  37. import $http from '@/utils/request.js'
  38. import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
  39. import carousel from '@/components/vear-carousel/vear-carousel'
  40. export default {
  41. components: {
  42. CustomTabBar,
  43. carousel
  44. },
  45. data() {
  46. return {
  47. imgList: [{
  48. url: 'https://z3.ax1x.com/2021/03/05/6ehghR.jpg',
  49. id: 1
  50. }, {
  51. url: 'https://z3.ax1x.com/2021/03/05/6ehnfI.jpg',
  52. id: 2
  53. }, {
  54. url: 'https://z3.ax1x.com/2021/03/05/6ehfc6.jpg',
  55. id: 3
  56. }, {
  57. url: 'https://z3.ax1x.com/2021/03/05/6efCqg.jpg',
  58. id: 4
  59. }, ]
  60. };
  61. },
  62. methods: {
  63. selectedBanner(item, index) {
  64. console.log('馃', item, index)
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .status_bar {
  71. width: 100%;
  72. height: var(--status-bar-height);
  73. }
  74. /deep/ .u-tabbar__placeholder {
  75. display: none;
  76. }
  77. </style>
  78. <style lang="scss" scoped>
  79. .box {
  80. width: 100%;
  81. height: calc(100vh - 50px);
  82. background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
  83. &-top {
  84. display: flex;
  85. justify-content: space-between;
  86. padding: 80rpx 40rpx 0;
  87. &-action {
  88. display: flex;
  89. &-item {
  90. margin-right: 76rpx;
  91. &-cir {
  92. width: 104rpx;
  93. height: 104rpx;
  94. background-color: #FCB824;
  95. border-radius: 50%;
  96. margin-bottom: 14rpx;
  97. }
  98. &-txt {
  99. text-align: center;
  100. color: #FFFFFF;
  101. }
  102. }
  103. }
  104. &-tip{
  105. display: flex;
  106. flex-direction: column;
  107. align-items: flex-end;
  108. justify-content: flex-end;
  109. color: #FFFFFF;
  110. }
  111. }
  112. &-ticket{
  113. padding: 200rpx 0;
  114. }
  115. }
  116. </style>