gift-wall.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="gift-wall-box flex-common-css box-sizing-border iPhone-bottom sys-background-black">
  3. <Nav title='礼物墙' titleColor='#fff' bgckgroundBox='#141414'></Nav>
  4. <view class="info-box box-sizing-border">
  5. <view class="box-head">
  6. <view class="head-left">
  7. <image src="../../static/img/circle/1.png" mode="scaleToFill"></image>
  8. <view class="">
  9. <view class="sys-size-32 sys-weight-600 sys-color-white sys-webkit-box head-name">1111111111我我我我我我我</view>
  10. <view class="">
  11. <text class="sys-size-24 sys-color-gray-9">礼物收益:</text>
  12. <text class="sys-color-yellow sys-size-24">1波点</text>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="head-right sys-size-28 sys-color-gray-3 sys-radius-200 sys-background-yellow">波点兑换</view>
  17. </view>
  18. <view class="box-nav">
  19. <view class="sys-size-32 nav-name" :class="navId === item.id?'s-view':'n-view'"
  20. v-for="(item,i) in navList" :key="i" @click="selectFun(item,i)">{{item.name}}</view>
  21. <view class="xian" :class="navIndex===0?'left-1':'left-2'"></view>
  22. </view>
  23. <scroll-view scroll-y="true" class="list-scroll" @scrolltolower="scrolltolower">
  24. <view class="list-home">
  25. <view class="list-box box-sizing-border"
  26. v-for="(item,i) in list" :key="i">
  27. <image :src="item.url" mode="aspectFill" :class="item.num>0?'':'c-view'"></image>
  28. <view class="sys-size-28 sys-color-white" :class="item.num>0?'':'c-view'">心动信号</view>
  29. <view class="sys-size-20 sys-color-white" :class="item.num>0?'':'c-view'">x{{item.num}}</view>
  30. </view>
  31. <view class="list-only" v-if="list.length>3&&list.length%3!=0"></view>
  32. </view>
  33. </scroll-view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data(){
  40. return{
  41. info:{},
  42. list:[
  43. {'num':1,'url':'/static/img/temporary/gift1.png'},
  44. {'num':0,'url':'/static/img/temporary/gift2.png'},
  45. {'num':0,'url':'/static/img/temporary/gift3.png'},
  46. ],
  47. total:0,
  48. page:1,
  49. navList:[{name:'心动礼物',id:1,},{name:'排队礼物',id:2,}],
  50. navId:1,
  51. navIndex:0,
  52. }
  53. },
  54. methods:{
  55. scrolltolower(){
  56. console.log('触底');
  57. },
  58. selectFun(item,i){
  59. this.navId = item.id;
  60. this.navIndex = i;
  61. },
  62. }
  63. }
  64. </script>
  65. <style scoped lang="scss">
  66. .gift-wall-box{
  67. .info-box{
  68. flex: 1;
  69. overflow: auto;
  70. padding: 32rpx;
  71. display: flex;
  72. flex-direction: column;
  73. .box-head{
  74. display: flex;
  75. justify-content: space-between;
  76. align-items: center;
  77. .head-left{
  78. display: flex;
  79. align-items: center;
  80. image{
  81. width: 168rpx;
  82. height: 168rpx;
  83. border-radius: 50%;
  84. margin-right: 34rpx;
  85. }
  86. .head-name{
  87. width: 252rpx;
  88. margin-bottom: 10rpx;
  89. }
  90. }
  91. .head-right{
  92. width: 142rpx;
  93. height: 52rpx;
  94. line-height: 52rpx;
  95. text-align: center;
  96. }
  97. }
  98. .box-nav{
  99. margin-top: 44rpx;
  100. display: flex;
  101. position: relative;
  102. .xian{
  103. position: absolute;
  104. width: 48rpx;
  105. height: 4rpx;
  106. background-color: #fff;
  107. bottom: 0;
  108. }
  109. .left-1{
  110. left: 40rpx;
  111. transition: all 0.5s;
  112. }
  113. .left-2{
  114. left: 210rpx;
  115. transition: all 0.5s;
  116. }
  117. .nav-name{
  118. margin-right: 40rpx;
  119. padding-bottom: 20rpx;
  120. }
  121. .s-view{
  122. color: #fff;
  123. }
  124. .n-view{
  125. color: #707070;
  126. }
  127. }
  128. .list-scroll{
  129. height: 100%;
  130. overflow: auto;
  131. padding-top: 20rpx;
  132. .list-home{
  133. display: flex;
  134. justify-content: space-between;
  135. flex-flow: row wrap;
  136. }
  137. .list-box{
  138. width: 212rpx;
  139. height: 292rpx;
  140. background: #3D3D3D;
  141. border-radius: 20rpx;
  142. margin-bottom: 34rpx;
  143. text-align: center;
  144. padding-top: 32rpx;
  145. image{
  146. width: 120rpx;
  147. height: 120rpx;
  148. margin-bottom: 20rpx;
  149. }
  150. .c-view{
  151. filter: grayscale(100%);
  152. }
  153. }
  154. .list-only{
  155. width: 212rpx;
  156. height: 292rpx;
  157. }
  158. }
  159. }
  160. }
  161. </style>