revenueRankingPage.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. created() {
  87. },
  88. mounted() {
  89. this.color1 = app.globalData.color1;
  90. this.color2 = app.globalData.color2;
  91. },
  92. methods:{
  93. tab(index){
  94. this.currentTab = index;
  95. },
  96. backHome(){
  97. uni.navigateBack({
  98. delta:1,
  99. })
  100. }
  101. }
  102. }
  103. </script>
  104. <style lang="scss">
  105. .ranking_body{
  106. margin-left: 20rpx;
  107. margin-right: 20rpx;
  108. background: #ffffff;
  109. border-radius: 16rpx;
  110. padding-top: 20rpx;
  111. margin-top: 20rpx;
  112. .title{
  113. text-align: center;
  114. font-size: 32rpx;
  115. font-family: Verdana, Verdana-Bold;
  116. font-weight: 700;
  117. text-align: center;
  118. color: #262626;
  119. }
  120. .rank_tab{
  121. display: flex;
  122. margin: 0 auto;
  123. margin-top: 40rpx;
  124. width: 450rpx;
  125. height: 60rpx;
  126. background: #ffffff;
  127. border: 2rpx solid #ededed;
  128. border-radius: 8rpx;
  129. .tab_item{
  130. height: 100%;
  131. text-align: center;
  132. flex: auto;
  133. line-height: 60rpx;
  134. font-size: 24rpx;
  135. font-family: Verdana, Verdana-Regular;
  136. font-weight: 400;
  137. color: #b1b1b1;
  138. }
  139. .tab_line{
  140. width: 2rpx;
  141. height: 60rpx;
  142. background: #ededed;
  143. }
  144. .active1{
  145. border-radius: 8rpx 0 0 8rpx;
  146. color: #FFFFFF;
  147. }
  148. .active2{
  149. border-radius: 0;
  150. color: #FFFFFF;
  151. }
  152. .active3{
  153. border-radius: 0 8rpx 8rpx 0 ;
  154. color: #FFFFFF;
  155. }
  156. }
  157. .rank_list{
  158. width: 100%;
  159. .rank_title{
  160. display: flex;
  161. width: 100%;
  162. margin: 0 auto;
  163. margin-top: 40rpx;
  164. .rank_title_name{
  165. font-size: 28rpx;
  166. flex: auto;
  167. font-family: Verdana, Verdana-Bold;
  168. font-weight: 700;
  169. text-align: center;
  170. color: #b1b1b1;
  171. }
  172. }
  173. .rank_item{
  174. display: flex;
  175. align-items: center;
  176. width: 100%;
  177. height: 104rpx;
  178. margin: 0 auto;
  179. position: relative;
  180. .rank_item_name{
  181. font-size: 28rpx;
  182. flex: auto;
  183. font-family: Verdana, Verdana-Bold;
  184. font-weight: 400;
  185. text-align: center;
  186. color: #666666;
  187. .icon{
  188. width: 36rpx;
  189. height: 40rpx;
  190. }
  191. }
  192. .item_line{
  193. position: absolute;
  194. bottom: 0;
  195. left: 50%;
  196. transform: translateX(-50%);
  197. width: 630rpx;
  198. height: 2rpx;
  199. background-color: rgba(0,0,0,0.05);
  200. }
  201. }
  202. }
  203. .back_home{
  204. position: fixed;
  205. bottom: 180rpx;
  206. right: 0;
  207. width: 100rpx;
  208. height: 120rpx;
  209. border-radius: 20rpx 0rpx 0rpx 20rpx;
  210. box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(119,55,12,0.20);
  211. display: flex;
  212. flex-direction: column;
  213. justify-content: center;
  214. align-items: center;
  215. .back_home_icon{
  216. width: 30rpx;
  217. height: 28rpx;
  218. margin-bottom: 9rpx;
  219. }
  220. font-size: 20rpx;
  221. font-family: PingFang SC, PingFang SC-Semibold;
  222. font-weight: 600;
  223. text-align: center;
  224. color: #ffffff;
  225. }
  226. }
  227. </style>