revenueRankingPage.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <view class="ranking_body">
  3. <view class="title">
  4. 收益排行 TOP10
  5. </view>
  6. <view class="rank_tab">
  7. <view class="tab_item" @click="tab(1)" :class="{active1:currentTab==1}" :style="{background:currentTab==1?color1:''}">
  8. 总量
  9. </view>
  10. <view class="tab_line"></view>
  11. <view class="tab_item" @click="tab(2)" :class="{active2:currentTab==2}" :style="{background:currentTab==2?color1:''}">
  12. 本月
  13. </view>
  14. <view class="tab_line"></view>
  15. <view class="tab_item" @click="tab(3)" :class="{active3:currentTab==3}" :style="{background:currentTab==3?color1:''}">
  16. 本日
  17. </view>
  18. </view>
  19. <view class="rank_list">
  20. <view class="rank_title">
  21. <view class="rank_title_name" style="width: 20%;">
  22. 排名
  23. </view>
  24. <view class="rank_title_name" style="width: 30%;">
  25. 用户名
  26. </view>
  27. <view class="rank_title_name" style="width: 20%;">
  28. 用户等级
  29. </view>
  30. <view class="rank_title_name" style="width: 30%;">
  31. 累计收益(元)
  32. </view>
  33. </view>
  34. <view class="rank_item" v-for="(item,index) in rankingList" :key='index'>
  35. <view class="rank_item_name" style="width: 20%;">
  36. <image class="icon" v-if="index==0" src="https://dm.static.elab-plus.com/yezhu/icon_first.png" mode=""></image>
  37. <image class="icon" v-if="index==1" src="https://dm.static.elab-plus.com/yezhu/icon_twice.png" mode=""></image>
  38. <image class="icon" v-if="index==2" src="https://dm.static.elab-plus.com/yezhu/icon_thrid.png" mode=""></image>
  39. <text v-if="index!=0&&index!=1&&index!=2" >{{index+1}}</text>
  40. </view>
  41. <view class="rank_item_name" style="width: 30%;" :style="{color:(index==0||index==1||index==2)?color1:'auto'}">
  42. 淘房**神
  43. </view>
  44. <view class="rank_item_name" style="width: 20%;">
  45. LV10
  46. </view>
  47. <view class="rank_item_name" style="width: 30%;" :style="{color:(index==0||index==1||index==2)?color1:'auto'}">
  48. 8273.00
  49. </view>
  50. <view class="item_line">
  51. </view>
  52. </view>
  53. <view class="back_home" :style="{background:color2}" @click="backHome">
  54. <image class="back_home_icon" src="https://dm.static.elab-plus.com/yezhu/icon_home.png" mode=""></image>
  55. <text>返回\n任务大厅</text>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. let app = getApp();
  62. export default {
  63. data() {
  64. return {
  65. rankingList:[
  66. {
  67. },
  68. {
  69. },
  70. {
  71. },{
  72. },
  73. {
  74. },{
  75. },{
  76. },{
  77. },{
  78. },{
  79. }
  80. ],
  81. color1:"",
  82. color2:"",
  83. currentTab:1,
  84. };
  85. },
  86. mounted() {
  87. this.color1 = app.globalData.color1;
  88. this.color2 = app.globalData.color2;
  89. },
  90. methods:{
  91. tab(index){
  92. this.currentTab = index;
  93. },
  94. backHome(){
  95. uni.navigateBack({
  96. delta:1,
  97. })
  98. }
  99. }
  100. }
  101. </script>
  102. <style lang="scss">
  103. .ranking_body{
  104. margin-left: 20rpx;
  105. margin-right: 20rpx;
  106. background: #ffffff;
  107. border-radius: 16rpx;
  108. padding-top: 20rpx;
  109. margin-top: 20rpx;
  110. .title{
  111. text-align: center;
  112. font-size: 32rpx;
  113. font-family: Verdana, Verdana-Bold;
  114. font-weight: 700;
  115. text-align: center;
  116. color: #262626;
  117. }
  118. .rank_tab{
  119. display: flex;
  120. margin: 0 auto;
  121. margin-top: 40rpx;
  122. width: 450rpx;
  123. height: 60rpx;
  124. background: #ffffff;
  125. border: 2rpx solid #ededed;
  126. border-radius: 8rpx;
  127. .tab_item{
  128. height: 100%;
  129. text-align: center;
  130. flex: auto;
  131. line-height: 60rpx;
  132. font-size: 24rpx;
  133. font-family: Verdana, Verdana-Regular;
  134. font-weight: 400;
  135. color: #b1b1b1;
  136. }
  137. .tab_line{
  138. width: 2rpx;
  139. height: 60rpx;
  140. background: #ededed;
  141. }
  142. .active1{
  143. border-radius: 8rpx 0 0 8rpx;
  144. color: #FFFFFF;
  145. }
  146. .active2{
  147. border-radius: 0;
  148. color: #FFFFFF;
  149. }
  150. .active3{
  151. border-radius: 0 8rpx 8rpx 0 ;
  152. color: #FFFFFF;
  153. }
  154. }
  155. .rank_list{
  156. width: 100%;
  157. .rank_title{
  158. display: flex;
  159. width: 100%;
  160. margin: 0 auto;
  161. margin-top: 40rpx;
  162. .rank_title_name{
  163. font-size: 28rpx;
  164. flex: auto;
  165. font-family: Verdana, Verdana-Bold;
  166. font-weight: 700;
  167. text-align: center;
  168. color: #b1b1b1;
  169. }
  170. }
  171. .rank_item{
  172. display: flex;
  173. align-items: center;
  174. width: 100%;
  175. height: 104rpx;
  176. margin: 0 auto;
  177. position: relative;
  178. .rank_item_name{
  179. font-size: 28rpx;
  180. flex: auto;
  181. font-family: Verdana, Verdana-Bold;
  182. font-weight: 400;
  183. text-align: center;
  184. color: #666666;
  185. .icon{
  186. width: 36rpx;
  187. height: 40rpx;
  188. }
  189. }
  190. .item_line{
  191. position: absolute;
  192. bottom: 0;
  193. left: 50%;
  194. transform: translateX(-50%);
  195. width: 630rpx;
  196. height: 2rpx;
  197. background-color: rgba(0,0,0,0.05);
  198. }
  199. }
  200. }
  201. .back_home{
  202. position: fixed;
  203. bottom: 180rpx;
  204. right: 0;
  205. width: 100rpx;
  206. height: 120rpx;
  207. border-radius: 20rpx 0rpx 0rpx 20rpx;
  208. box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(119,55,12,0.20);
  209. display: flex;
  210. flex-direction: column;
  211. justify-content: center;
  212. align-items: center;
  213. .back_home_icon{
  214. width: 30rpx;
  215. height: 28rpx;
  216. margin-bottom: 9rpx;
  217. }
  218. font-size: 20rpx;
  219. font-family: PingFang SC, PingFang SC-Semibold;
  220. font-weight: 600;
  221. text-align: center;
  222. color: #ffffff;
  223. }
  224. }
  225. </style>