wave-point.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view class="wave-point flex-common-css box-sizing-border iPhone-bottom">
  3. <Nav class='nav-view' :title="isScroll?'波点兑换中心':''" :titleColor="isScroll?'#333':'#fff'"
  4. :bgckgroundBox="isScroll?'#fff':'transparent'" :rightShow='true' :rightType='2'>
  5. <template v-slot:right>
  6. <view class="nav-right-box sys-size-24" :class="isScroll?'view-n':'view-s'">兑换记录</view>
  7. </template>
  8. </Nav>
  9. <image class="bg-img" src="@/static/img/wallet/bd-bg.png" mode="aspectFill"></image>
  10. <view class="nav-box">
  11. <view :class="navId === item.id?'text-s':'text-n'"
  12. v-for="(item,i) in navList" :key="i" @click="select(item,i)">
  13. {{item.name}}
  14. </view>
  15. <view class="nav-only" :style="{left:navLeft+'rpx',}"></view>
  16. </view>
  17. <scroll-view scroll-y="true" class="list-scroll" @scrolltolower="scrolltolower">
  18. <view class="list-home">
  19. <view class="list-box" v-for="(item,i) in 10" :key="i">
  20. <view class="box-top">
  21. <view class="box-1 sys-size-24">剩余0</view>
  22. <image class="type-3" src="@/static/img/circle/1.png" mode="scaleToFill"></image>
  23. </view>
  24. </view>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data(){
  32. return{
  33. isScroll:false,
  34. navId:1,
  35. navIndex:0,
  36. navLeft:110, //差值250 起点110
  37. navList:[{name:'特权',id:1},{name:'道具',id:2},{name:'其他',id:3},],
  38. }
  39. },
  40. methods:{
  41. scrolltolower(){
  42. console.log('触底');
  43. },
  44. select(item,i){
  45. if(this.navId!=item.id){
  46. this.navId =item.id;
  47. this.navIndex = i;
  48. this.navLeft = i * 250 + 110;
  49. }
  50. },
  51. },
  52. }
  53. </script>
  54. <style scoped lang="scss">
  55. .wave-point{
  56. position: relative;
  57. .bg-img{
  58. width: 100%;
  59. height: 690rpx;
  60. }
  61. .nav-view{
  62. position: absolute;
  63. top: 0;
  64. left: 0;
  65. .nav-right-box{
  66. width: 120rpx;
  67. height: 34rpx;
  68. background: rgba(235,235,235,0.14);
  69. border-radius: 200rpx;
  70. line-height: 34rpx;
  71. text-align: center;
  72. }
  73. .view-s{
  74. border: 1rpx solid #F9F9F9;
  75. color: #fff;
  76. }
  77. .view-n{
  78. border: 1rpx solid #333;
  79. color: #333;
  80. }
  81. }
  82. .nav-box{
  83. background-color: #081432;
  84. width: 100%;
  85. height: 116rpx;
  86. display: flex;
  87. align-items: center;
  88. position: relative;
  89. .nav-only{
  90. width: 36rpx;
  91. height: 4rpx;
  92. background-color: #fff;
  93. position: absolute;
  94. bottom: 20rpx;
  95. transition: left 0.5s;
  96. }
  97. view{
  98. flex: 1;
  99. text-align: center;
  100. line-height: 116rpx;
  101. }
  102. .text-s{
  103. color: #fff;
  104. font-weight: 600;
  105. font-size: 36rpx;
  106. transition: all 0.5;
  107. }
  108. .text-n{
  109. color: #525A6E;
  110. font-size: 32rpx;
  111. transition: all 0.5;
  112. }
  113. }
  114. .list-scroll{
  115. background-color: #081432;
  116. flex: 1;
  117. overflow: auto;
  118. .list-home{
  119. display: flex;
  120. justify-content: space-between;
  121. flex-flow: row wrap;
  122. box-sizing: border-box;
  123. padding: 0 32rpx;
  124. .list-box{
  125. width: 333rpx;
  126. height: 444rpx;
  127. background: url('@/static/img/wallet/shop-bg.png') no-repeat;
  128. background-size: 100% 100%;
  129. margin-bottom: 28rpx;
  130. .box-top{
  131. width: 313rpx;
  132. height: 264rpx;
  133. margin:2rpx 8rpx 10rpx 10rpx;
  134. position: relative;
  135. .type-3{
  136. width: 100%;
  137. height: 100%;
  138. }
  139. .box-1{
  140. z-index: 100 !important;
  141. position: absolute;
  142. bottom: -2rpx;
  143. right: -2rpx;
  144. width: 84rpx;
  145. height: 36rpx;
  146. line-height: 36rpx;
  147. text-align: center;
  148. border-radius: 10rpx 0rpx 0rpx 0rpx;
  149. border: 2rpx solid #1F3F7B;
  150. color: #5D6473;
  151. background: #182137;
  152. }
  153. }
  154. }
  155. }
  156. }
  157. }
  158. </style>