revenueRankingPage.vue 5.2 KB

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