userTuiMoneyList.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view class="promoter-list" >
  3. <view class="header">
  4. <view class="promoterHeader">
  5. <image class="bg" src="/static/images/transparent.png" />
  6. <view class="headerCon acea-row row-between-wrapper">
  7. <view>
  8. <view class="name">佣金明细</view>
  9. <view>
  10. <text class="num">{{brokeragePrice}}</text>
  11. <text>元</text>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="list">
  18. <view>
  19. <view class="item" v-for="(item,index) in list">
  20. <view class="title">
  21. <view class="label" >推广佣金</view>
  22. <view class="price add" >{{item.billType==0?'-':'+'}}¥{{item.number.toFixed(2)}}</view>
  23. </view>
  24. <view class="time">{{item.createTime}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. <Loading :loaded="loaded" :loading="loading"></Loading>
  29. </view>
  30. </template>
  31. <script>
  32. import {getTuiMoneyLogs,getTuiMoney} from '@/api/user'
  33. import Loading from "@/components/Loading";
  34. export default {
  35. name: "tuiList",
  36. components: {
  37. Loading
  38. },
  39. props: {},
  40. data: function () {
  41. return {
  42. brokeragePrice:0,
  43. page: {
  44. page: 1,
  45. pageSize: 10,
  46. logsType:5
  47. },
  48. list: [],
  49. loaded: false,
  50. loading: false
  51. };
  52. },
  53. mounted: function () {
  54. this.getTuiMoneyLogs();
  55. this.getTuiMoney();
  56. },
  57. onReachBottom() {
  58. !this.loading && this.getTuiMoneyLogs();
  59. },
  60. methods: {
  61. getTuiMoneyLogs: function () {
  62. let that = this;
  63. if (that.loaded || that.loading) return;
  64. that.loading = true;
  65. getTuiMoneyLogs(this.page).then(
  66. res => {
  67. that.list.push.apply(that.list, res.data.list);
  68. that.loading = false;
  69. that.loaded = !res.data.hasNextPage;
  70. that.page.page = that.page.page + 1;
  71. uni.hideLoading()
  72. },
  73. err => {
  74. uni.showToast({
  75. title: err.msg,
  76. icon: "none",
  77. duration: 2000
  78. });
  79. },
  80. 300
  81. );
  82. },
  83. getTuiMoney: function () {
  84. let that = this;
  85. getTuiMoney().then(
  86. res => {
  87. that.brokeragePrice=res.brokeragePrice;
  88. },
  89. err => {
  90. uni.showToast({
  91. title: err.msg,
  92. icon: "none",
  93. duration: 2000
  94. });
  95. },
  96. 300
  97. );
  98. },
  99. }
  100. };
  101. </script>
  102. <style lang="less">
  103. /*所有推广头部样式*/
  104. .promoterHeader {
  105. width: 100%;
  106. height: 2.2 * 100rpx;
  107. background-color: #018C39;
  108. position: relative;
  109. .bg{
  110. width: 100%;
  111. height: 100%;
  112. position: absolute;
  113. top: 0;
  114. left: 0;
  115. }
  116. }
  117. .promoterHeader .headerCon {
  118. height: 100%;
  119. padding: 0 0.88 * 100rpx 0 0.55 * 100rpx;
  120. font-size: 0.28 * 100rpx;
  121. color: #fff;
  122. background-repeat: no-repeat;
  123. background-size: 100% 100%;
  124. }
  125. .promoterHeader .headerCon .name {
  126. margin-bottom: 0.02 * 100rpx;
  127. }
  128. .promoterHeader .headerCon .num {
  129. font-size: 0.5 * 100rpx;
  130. }
  131. .promoterHeader .headerCon .iconfont {
  132. font-size: 1.25 * 100rpx;
  133. }
  134. .promoter-list{
  135. width: 100%;
  136. }
  137. /*推广人列表*/
  138. .promoter-list .header {
  139. padding-bottom: 0.12 * 100rpx;
  140. }
  141. .promoter-list .nav {
  142. background-color: #fff;
  143. height: 0.86 * 100rpx;
  144. line-height: 0.86 * 100rpx;
  145. font-size: 0.28 * 100rpx;
  146. color: #282828;
  147. border-bottom: 1px solid #eee;
  148. }
  149. .promoter-list .nav .item {
  150. height: 100%;
  151. }
  152. .promoter-list .nav .item.on {
  153. color: #eb3729;
  154. border-bottom: 0.05 * 100rpx solid #eb3729;
  155. }
  156. .item{
  157. background: #FFFFFF;
  158. padding: 30upx;
  159. border-bottom: 1px solid #eee;
  160. .title{
  161. display: flex;
  162. align-items: center;
  163. justify-content: space-between;
  164. .label{
  165. font-size: 30upx;
  166. font-family: PingFang SC;
  167. font-weight: 400;
  168. color: #0F1826;
  169. }
  170. .price{
  171. font-size: 30upx;
  172. font-family: PingFang SC;
  173. font-weight: bold;
  174. &.add{
  175. color: #00BBB9;
  176. }
  177. &.less{
  178. color: #FF0000;
  179. }
  180. }
  181. }
  182. .time{
  183. margin-top: 20upx;
  184. font-size: 24upx;
  185. font-family: PingFang SC;
  186. font-weight: 400;
  187. color: #6E7580;
  188. }
  189. }
  190. </style>