commissionHistory.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <view class="box">
  3. <!-- 统计 -->
  4. <view class="sumBg">
  5. <view class="viewBg">
  6. <view class="money" style="color: #FF4F00;">¥{{detailData.totalMoney}}</view>
  7. <view class="moneyTitle">累计佣金
  8. </view>
  9. </view>
  10. <view class="line"></view>
  11. <view class="viewBg">
  12. <view class="money">¥{{detailData.withdrawalMoney}}</view>
  13. <view class="moneyTitle">累计提现
  14. </view>
  15. </view>
  16. <view class="line"></view>
  17. <view class="viewBg">
  18. <view class="money">¥{{detailData.cantidatMoney}}</view>
  19. <view class="moneyTitle">可提现
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 明细 -->
  24. <view class="mingxiBg" v-if="arr.length > 0">
  25. <view v-for="(item,index) in arr" :key="index">
  26. <view class="itemBg">
  27. <image :src='item.MemberHeadImg' mode="" style="width: 72rpx; height: 72rpx; border-radius: 36rpx;">
  28. </image>
  29. <view class="nickName" v-if="item.MemberNickName">{{item.MemberNickName}}</view>
  30. <view class="time">{{item.CreateTime.slice(0,item.CreateTime.length-8)}}</view>
  31. <view class="jine">+{{item.Money}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 上拉 加载更多 -->
  36. <view class="noMore" v-if="noMoreShow">没有更多数据</view>
  37. <view class="emptyView"></view>
  38. <view class="bottomView">
  39. <view class="goExtract" @click="gonavigateTo('extract')">去提现</view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. page: 1,
  48. detailData: {},
  49. arr: [],
  50. noMoreShow: false,
  51. }
  52. },
  53. onShow() {
  54. this.getDetailData();
  55. this.page = 1;
  56. this.getItemData();
  57. },
  58. methods: {
  59. getDetailData() {
  60. uni.showLoading({
  61. title: '加载中'
  62. })
  63. let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
  64. params = {
  65. }
  66. this.$http(url, params, 'GET').then(res => {
  67. uni.hideLoading();
  68. var data = res.data
  69. // 处理 undefined和null转为空白字符串
  70. for (const key in data) {
  71. data[key] = this.$praseStrEmpty(data[key])
  72. }
  73. this.detailData = data
  74. })
  75. },
  76. getItemData() {
  77. uni.showLoading({
  78. title: '加载中'
  79. })
  80. let url = 'worldKeepCar/worldDistribution/listEarningsPage',
  81. params = {
  82. page: this.page,
  83. limit: 10,
  84. }
  85. this.$http(url, params, 'GET').then(res => {
  86. uni.hideLoading();
  87. var list = res.data.Items
  88. // 处理 undefined和null转为空白字符串
  89. list.forEach((item, index) => {
  90. for (const key in item) {
  91. item[key] = this.$praseStrEmpty(item[key])
  92. }
  93. })
  94. if (this.page == 1) {
  95. this.arr = list
  96. } else {
  97. this.arr = this.arr.concat(list)
  98. }
  99. if (list.length < 10) {
  100. this.noMoreShow = true
  101. } else {
  102. this.noMoreShow = false
  103. }
  104. })
  105. },
  106. gonavigateTo(url) {
  107. uni.navigateTo({
  108. url: url
  109. })
  110. }
  111. },
  112. // 下拉刷新 上拉加载更多
  113. onPullDownRefresh() {
  114. this.page = 1;
  115. this.getItemData()
  116. this.getDetailData()
  117. setTimeout(function() {
  118. uni.stopPullDownRefresh();
  119. }, 1000);
  120. },
  121. onReachBottom() {
  122. this.page++;
  123. this.getItemData()
  124. },
  125. }
  126. </script>
  127. <style scoped>
  128. .box {
  129. min-height: 100vh;
  130. background: #F4F5F7;
  131. padding-top: 20rpx;
  132. }
  133. .sumBg {
  134. display: flex;
  135. justify-content: space-between;
  136. align-items: center;
  137. margin: 0 24rpx 20rpx;
  138. padding: 36rpx 50rpx;
  139. background-color: #FFFFFF;
  140. border-radius: 10rpx;
  141. }
  142. .viewBg {
  143. display: flex;
  144. flex-direction: column;
  145. align-items: center;
  146. background-color: #FFFFFF;
  147. }
  148. .money {
  149. font-size: 38rpx;
  150. color: #000000;
  151. font-weight: bold;
  152. }
  153. .moneyTitle {
  154. font-size: 28rpx;
  155. color: #666666;
  156. }
  157. .line {
  158. width: 1rpx;
  159. height: 73rpx;
  160. background-color: #EEEEEE;
  161. }
  162. .mingxiBg {
  163. margin: 0rpx 24rpx;
  164. background-color: #FFFFFF;
  165. border-radius: 10rpx;
  166. padding: 20rpx;
  167. }
  168. .itemBg {
  169. height: 98rpx;
  170. display: flex;
  171. justify-content: space-between;
  172. align-items: center;
  173. }
  174. .nickName {
  175. font-size: 30rpx;
  176. color: #3C3C3C;
  177. width: 30%;
  178. margin: 0 15rpx;
  179. overflow: hidden;
  180. text-overflow: ellipsis;
  181. white-space: nowrap;
  182. }
  183. .time {
  184. font-size: 30rpx;
  185. color: #999999;
  186. width: 30%;
  187. }
  188. .jine {
  189. font-size: 32rpx;
  190. color: #FF4F00;
  191. font-weight: bold;
  192. margin: 0 15rpx;
  193. width: 20%;
  194. text-align: right;
  195. }
  196. .emptyView {
  197. height: 120rpx;
  198. padding-bottom: constant(safe-area-inset-bottom);
  199. padding-bottom: env(safe-area-inset-bottom);
  200. }
  201. .bottomView {
  202. width: 100%;
  203. height: 120rpx;
  204. position: fixed;
  205. left: 0;
  206. bottom: 0;
  207. background-color: #FFFFFF;
  208. padding-bottom: constant(safe-area-inset-bottom);
  209. padding-bottom: env(safe-area-inset-bottom);
  210. }
  211. .goExtract {
  212. margin: 23rpx 30rpx;
  213. border-radius: 37rpx;
  214. background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
  215. font-size: 30rpx;
  216. color: #FFFFFF;
  217. font-weight: bold;
  218. height: 74rpx;
  219. line-height: 74rpx;
  220. text-align: center;
  221. }
  222. .noMore {
  223. text-align: center;
  224. line-height: 50rpx;
  225. color: #999999;
  226. font-size: 28rpx;
  227. }
  228. </style>