酷炫直播运营系统小程序版本

todayPerformance.vue 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="acc_performance">
  3. <view class="splitLine"></view>
  4. <view class="bigTitle flex">
  5. 账号今日表现
  6. </view>
  7. <view class="unit_pad">
  8. <view class="acc_thead flex">
  9. <view class="accInfo">账号信息</view>
  10. <view class="order">订单数</view>
  11. <view class="sale">销售额</view>
  12. </view>
  13. <view class="acc_tbody">
  14. <view v-if="accountRankList&&accountRankList.length>0">
  15. <view v-for="(acc,idx) in accountRankList" :key="acc.user_id" class="acc_tbody_item flex" :class="idx == accountRankList.length-1 ? '' : 'acc_tbody_item_border'">
  16. <view class="accInfo">
  17. <view class="imgPos">
  18. <img :src="acc.user.head" alt="" class="headImg">
  19. <img src="../../static/colorImg/rank1.png" alt="" class="rankImg" v-if="idx == 0">
  20. <img src="../../static/colorImg/rank2.png" alt="" class="rankImg" v-if="idx == 1">
  21. <img src="../../static/colorImg/rank3.png" alt="" class="rankImg" v-if="idx == 2">
  22. </view>
  23. <image class="platImg" v-if="acc.platform_type == '1'" src="../../static/kuai.png" mode="widthFix"></image>
  24. <image class="platImg" v-if="acc.platform_type == '2'" src="../../static/dou.png" mode="widthFix"></image>
  25. <text>{{acc.user.name}}</text>
  26. </view>
  27. <view class="order fWeight600">{{$formatNum(acc.order_count_sum)}}</view>
  28. <view class="sale fWeight600">{{$formatNum(acc.sell_money_sum)}}</view>
  29. </view>
  30. </view>
  31. <no-data v-else></no-data>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data(){
  39. return{
  40. accountRankList: [],
  41. }
  42. },
  43. methods:{
  44. init_uType_less2(){
  45. // this.get_todayAccountRank()//账号今日表现
  46. let pro1 = new Promise((resolve, reject)=>{
  47. this.get_todayAccountRank(()=>{
  48. resolve()
  49. })
  50. })
  51. Promise.all([pro1]).then(()=>{
  52. this.$hide_init_loading()
  53. uni.stopPullDownRefresh()
  54. this.$emit('todayTimerEdit',
  55. setTimeout(()=>{
  56. this.init_uType_less2()
  57. },10*1000)
  58. )
  59. })
  60. },
  61. get_todayAccountRank (cb) {
  62. this.$req(this.$api.todayAccountRank, 'get', {}, (res) => {
  63. cb ? cb() : ''
  64. if (res && res.errno == 0) {
  65. this.accountRankList = res.rst.data
  66. }
  67. },(err)=>{
  68. cb ? cb() : ''
  69. })
  70. },
  71. }
  72. }
  73. </script>
  74. <style scoped lang="scss">
  75. .acc_performance {
  76. background: #373E4E;
  77. .splitLine {
  78. height: 16rpx;
  79. background-color: #262C38;
  80. }
  81. .unit_pad {
  82. padding: 20rpx 32rpx;
  83. }
  84. .accInfo {
  85. display: flex;
  86. align-items: center;
  87. width: 50%;
  88. .imgPos {
  89. position: relative;
  90. .headImg {
  91. width: 90rpx;
  92. height: 90rpx;
  93. border-radius: 50%;
  94. margin-right: 8rpx;
  95. }
  96. .rankImg {
  97. position: absolute;
  98. top: -6rpx;
  99. right: -6rpx;
  100. width: 40rpx;
  101. height: 40rpx;
  102. }
  103. }
  104. .platImg {
  105. width: 30rpx;
  106. height: 30rpx;
  107. margin: 8rpx;
  108. flex-shrink: 0;
  109. }
  110. }
  111. .order {
  112. display: inline-block;
  113. width: 25%;
  114. text-align: center;
  115. }
  116. .sale {
  117. display: inline-block;
  118. width: 25%;
  119. text-align: right;
  120. }
  121. .acc_thead {
  122. font-size: 26rpx;
  123. color: #b8b8b8;
  124. }
  125. .acc_tbody {
  126. font-size: 28rpx;
  127. .acc_tbody_item {
  128. padding: 26rpx 0;
  129. }
  130. .acc_tbody_item_border {
  131. border-bottom: 1px solid #303643;
  132. }
  133. }
  134. }
  135. .bigTitle {
  136. font-size: 32rpx;
  137. border-bottom: 2rpx solid #585c69;
  138. padding: 20rpx 32rpx;
  139. font-weight: 600;
  140. background: url("../../static/colorImg/bigTitleImg.png") no-repeat;
  141. background-size: 7%;
  142. background-position: 20rpx 10rpx;
  143. }
  144. .smallTitle {
  145. font-size: 28rpx;
  146. font-weight: 600;
  147. }
  148. </style>