revenueRankingPage.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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>
  51. <view class="back_home" :style="{background:color2}" @click="backHome">
  52. <image class="back_home_icon" src="https://dm.static.elab-plus.com/yezhu/icon_home.png" mode=""></image>
  53. <text>返回\n任务大厅</text>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. let app = getApp();
  60. export default {
  61. data() {
  62. return {
  63. rankingList:[
  64. {
  65. },
  66. {
  67. },
  68. {
  69. },{
  70. },
  71. {
  72. },{
  73. },{
  74. },{
  75. },{
  76. },{
  77. }
  78. ],
  79. color1:"",
  80. color2:"",
  81. currentTab:1,
  82. };
  83. },
  84. mounted() {
  85. this.color1 = app.globalData.color1;
  86. this.color2 = app.globalData.color2;
  87. },
  88. methods:{
  89. tab(index){
  90. this.currentTab = index;
  91. },
  92. backHome(){
  93. uni.navigateBack({
  94. delta:1,
  95. })
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="scss">
  101. .ranking_body{
  102. margin-left: 20rpx;
  103. margin-right: 20rpx;
  104. background: #ffffff;
  105. border-radius: 16rpx;
  106. padding-top: 20rpx;
  107. margin-top: 20rpx;
  108. .title{
  109. text-align: center;
  110. font-size: 32rpx;
  111. font-family: Verdana, Verdana-Bold;
  112. font-weight: 700;
  113. text-align: center;
  114. color: #262626;
  115. }
  116. .rank_tab{
  117. display: flex;
  118. margin: 0 auto;
  119. margin-top: 40rpx;
  120. width: 450rpx;
  121. height: 60rpx;
  122. background: #ffffff;
  123. border: 2rpx solid #ededed;
  124. border-radius: 8rpx;
  125. .tab_item{
  126. height: 100%;
  127. text-align: center;
  128. flex: auto;
  129. line-height: 60rpx;
  130. font-size: 24rpx;
  131. font-family: Verdana, Verdana-Regular;
  132. font-weight: 400;
  133. color: #b1b1b1;
  134. }
  135. .tab_line{
  136. width: 2rpx;
  137. height: 60rpx;
  138. background: #ededed;
  139. }
  140. .active1{
  141. border-radius: 8rpx 0 0 8rpx;
  142. color: #FFFFFF;
  143. }
  144. .active2{
  145. border-radius: 0;
  146. color: #FFFFFF;
  147. }
  148. .active3{
  149. border-radius: 0 8rpx 8rpx 0 ;
  150. color: #FFFFFF;
  151. }
  152. }
  153. .rank_list{
  154. width: 100%;
  155. .rank_title{
  156. display: flex;
  157. width: 100%;
  158. margin: 0 auto;
  159. margin-top: 40rpx;
  160. .rank_title_name{
  161. font-size: 28rpx;
  162. flex: auto;
  163. font-family: Verdana, Verdana-Bold;
  164. font-weight: 700;
  165. text-align: center;
  166. color: #b1b1b1;
  167. }
  168. }
  169. .rank_item{
  170. display: flex;
  171. align-items: center;
  172. width: 100%;
  173. height: 104rpx;
  174. margin: 0 auto;
  175. border-bottom: 2rpx solid rgba(0,0,0,0.05);
  176. .rank_item_name{
  177. font-size: 28rpx;
  178. flex: auto;
  179. font-family: Verdana, Verdana-Bold;
  180. font-weight: 400;
  181. text-align: center;
  182. color: #666666;
  183. .icon{
  184. width: 36rpx;
  185. height: 40rpx;
  186. }
  187. }
  188. }
  189. }
  190. .back_home{
  191. position: fixed;
  192. bottom: 180rpx;
  193. right: 0;
  194. width: 100rpx;
  195. height: 120rpx;
  196. border-radius: 20rpx 0rpx 0rpx 20rpx;
  197. box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(119,55,12,0.20);
  198. display: flex;
  199. flex-direction: column;
  200. justify-content: center;
  201. align-items: center;
  202. .back_home_icon{
  203. width: 30rpx;
  204. height: 28rpx;
  205. margin-bottom: 9rpx;
  206. }
  207. font-size: 20rpx;
  208. font-family: PingFang SC, PingFang SC-Semibold;
  209. font-weight: 600;
  210. text-align: center;
  211. color: #ffffff;
  212. }
  213. }
  214. </style>