gift-wall.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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" @click="to(1)">波点兑换</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. to(type,item){
  63. if(type === 1){
  64. uni.navigateTo({
  65. url:'/pages/wallet/wave-point'
  66. })
  67. }
  68. },
  69. }
  70. }
  71. </script>
  72. <style scoped lang="scss">
  73. .gift-wall-box{
  74. .info-box{
  75. flex: 1;
  76. overflow: auto;
  77. padding: 32rpx;
  78. display: flex;
  79. flex-direction: column;
  80. .box-head{
  81. display: flex;
  82. justify-content: space-between;
  83. align-items: center;
  84. .head-left{
  85. display: flex;
  86. align-items: center;
  87. image{
  88. width: 168rpx;
  89. height: 168rpx;
  90. border-radius: 50%;
  91. margin-right: 34rpx;
  92. }
  93. .head-name{
  94. width: 252rpx;
  95. margin-bottom: 10rpx;
  96. }
  97. }
  98. .head-right{
  99. width: 142rpx;
  100. height: 52rpx;
  101. line-height: 52rpx;
  102. text-align: center;
  103. }
  104. }
  105. .box-nav{
  106. margin-top: 44rpx;
  107. display: flex;
  108. position: relative;
  109. .xian{
  110. position: absolute;
  111. width: 48rpx;
  112. height: 4rpx;
  113. background-color: #fff;
  114. bottom: 0;
  115. }
  116. .left-1{
  117. left: 40rpx;
  118. transition: all 0.5s;
  119. }
  120. .left-2{
  121. left: 210rpx;
  122. transition: all 0.5s;
  123. }
  124. .nav-name{
  125. margin-right: 40rpx;
  126. padding-bottom: 20rpx;
  127. }
  128. .s-view{
  129. color: #fff;
  130. }
  131. .n-view{
  132. color: #707070;
  133. }
  134. }
  135. .list-scroll{
  136. height: 100%;
  137. overflow: auto;
  138. padding-top: 20rpx;
  139. .list-home{
  140. display: flex;
  141. justify-content: space-between;
  142. flex-flow: row wrap;
  143. }
  144. .list-box{
  145. width: 212rpx;
  146. height: 292rpx;
  147. background: #3D3D3D;
  148. border-radius: 20rpx;
  149. margin-bottom: 34rpx;
  150. text-align: center;
  151. padding-top: 32rpx;
  152. image{
  153. width: 120rpx;
  154. height: 120rpx;
  155. margin-bottom: 20rpx;
  156. }
  157. .c-view{
  158. filter: grayscale(100%);
  159. }
  160. }
  161. .list-only{
  162. width: 212rpx;
  163. height: 292rpx;
  164. }
  165. }
  166. }
  167. }
  168. </style>