user_spread_money.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <view>
  3. <view class='commission-details'>
  4. <view class='promoterHeader bg-color'>
  5. <view class='headerCon acea-row row-between-wrapper'>
  6. <view>
  7. <view class='name'>{{name}}</view>
  8. <view class='money'>¥<text class='num'>{{recordCount}}</text></view>
  9. </view>
  10. <view class='iconfont icon-jinbi1'><image src='../../static/img/yj.png' mode=""></image> </view>
  11. </view>
  12. </view>
  13. <view class='sign-record'>
  14. <block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
  15. <view class="time">{{item.time}}</view>
  16. <block >
  17. <view class='list' v-for="(t,i) in item.list">
  18. <view class='item'>
  19. <view class='listn'>
  20. <view class='itemn acea-row row-between-wrapper'>
  21. <view>
  22. <view class='name line1'>{{t.title}}</view>
  23. <view class="time">{{t.add_time}}</view>
  24. </view>
  25. <view class='num' v-if="t.pm==0">-{{t.number}}</view>
  26. <view class='num font-color' v-else>+{{t.number}}</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </block>
  32. </block>
  33. <view v-if="recordList.length == 0">
  34. <emptyPage title='暂无记录~'></emptyPage>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import {
  42. getCommissionInfo,
  43. spreadCount,
  44. getSpreadInfo,
  45. extractLst,
  46. spreadInfo
  47. } from '@/api/user.js';
  48. import { cashList, userBalance,spreadCommission} from '@/api/wallet.js';
  49. import {
  50. toLogin
  51. } from '@/libs/login.js';
  52. // #ifdef MP
  53. import authorize from '@/components/Authorize';
  54. // #endif
  55. import emptyPage from '@/components/emptyPage.vue'
  56. export default {
  57. components: {
  58. // #ifdef MP
  59. authorize,
  60. // #endif
  61. emptyPage
  62. },
  63. data() {
  64. return {
  65. name: '佣金列表',
  66. type: 0,
  67. page: 1,
  68. limit: 12,
  69. recordList: [],
  70. recordType: 0,
  71. recordCount: 0,
  72. status: false,
  73. extractCount: 0,
  74. };
  75. },
  76. onLoad(options) {
  77. },
  78. onShow: function() {
  79. let type = this.type;
  80. uni.setNavigationBarTitle({
  81. title: "佣金列表"
  82. });
  83. this.recordType = 2;
  84. this.spreadInfo();
  85. this.getRecordList();
  86. },
  87. methods: {
  88. spreadInfo(){
  89. let that=this;
  90. spreadInfo().then(res => {
  91. that.recordCount = res.data.commissionCount;
  92. that.extractCount = res.data.extractCount;
  93. });
  94. },
  95. getRecordList: function() {
  96. console.log("0000")
  97. let that = this;
  98. let page = that.page;
  99. let limit = that.limit;
  100. let status = that.status;
  101. let recordType = that.recordType;
  102. let recordList = that.recordList;
  103. let recordListNew = [];
  104. spreadCommission({
  105. page: page,
  106. limit: limit
  107. },3)
  108. .then(res => {
  109. let ln=res.data.length;
  110. console.log(ln)
  111. let recordListData =res.data;
  112. recordListNew = recordList.concat(recordListData);
  113. that.page+=1;
  114. that.$set(that, 'recordList', recordListNew);
  115. });
  116. console.log(recordList.length)
  117. },
  118. },
  119. }
  120. </script>
  121. <style scoped lang="scss">
  122. .sign-record .num{
  123. color: red;
  124. }
  125. .time{
  126. margin: 10rpx;
  127. font-size: 24rpx;
  128. color: #606266;
  129. }
  130. .list{
  131. border-radius: 10rpx;
  132. background-color: #fff;
  133. padding: 10rpx;
  134. width: 98%;
  135. margin: 1%;
  136. }
  137. .icon-jinbi1 image{
  138. opacity: 0.6;
  139. margin: 40rpx;
  140. width: 120rpx;
  141. height: 120rpx;
  142. }
  143. .bg-color{
  144. color: #fff;
  145. border-bottom-left-radius: 20rpx;
  146. border-bottom-right-radius: 20rpx;
  147. height: 220rpx;
  148. background-color: #303030 !important;
  149. }
  150. .commission-details .promoterHeader .headerCon .money {
  151. margin: 10rpx;
  152. font-size: 36rpx;
  153. }
  154. .commission-details .promoterHeader .headerCon .money .num {
  155. font-family: 'Guildford Pro';
  156. }
  157. .message{
  158. font-size: 18rpx;
  159. color: #fc4141;
  160. }
  161. .name {
  162. margin:20rpx;
  163. }
  164. </style>