accountInfo.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="main">
  3. <view v-if="listItem.length>0" class="u-margin-top-30 text-center u-font-30 text-bold">
  4. 总收入:{{total_commission/100}}元
  5. </view>
  6. <view class="list_item u-margin-top-30 margin-lr-sm" v-for="(item,index) in listItem" :key="index">
  7. <view class="order-num flex justify-between align-center u-font-28 u-padding-bottom-10 u-border-bottom"
  8. style="color:#909399;">
  9. <text class="u-font-24">订单号:{{item.orders.order_sn}}</text>
  10. <text class="u-font-24">联系电话:{{item.users.phone}}</text>
  11. </view>
  12. <view class="order-num u-margin-top-15 flex align-center u-padding-bottom-10">
  13. <u-avatar :src="item.users.avatar" size="100"></u-avatar>
  14. <view class="u-margin-left-20 flex-sub" style="color: #505559;">
  15. <view class="u-font-28">
  16. 评估类型:{{item.type == 1?'个人信用问题咨询':'企业信用问题咨询'}}
  17. </view>
  18. <view class="u-font-28">
  19. 评估用户:{{item.users.realname}}
  20. </view>
  21. </view>
  22. <view class="text-green text-bold">
  23. + {{item.commission/100}}元
  24. </view>
  25. </view>
  26. </view>
  27. <!-- <view class="cu-tabbar-height"></view> -->
  28. <!-- <view class="cu-tabbar-height"></view> -->
  29. <uni-load-more :loadingType="loadingType" :contentText="contentText" />
  30. </view>
  31. </template>
  32. <script>
  33. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  34. export default {
  35. components: {
  36. uniLoadMore
  37. },
  38. data() {
  39. return {
  40. loadingType: 0,
  41. contentText: {
  42. contentdown: '上拉显示更多',
  43. contentrefresh: '正在加载...',
  44. contentnomore: '没有更多数据了'
  45. },
  46. indexPage: 1,
  47. listItem: [],
  48. total_commission: ''
  49. }
  50. },
  51. onLoad() {
  52. this.getUserAccountInfo()
  53. },
  54. onReachBottom() {
  55. if (this.loadingType !== 0) {
  56. return;
  57. }
  58. this.loadingType = 1;
  59. this.getUserAccountInfo();
  60. },
  61. methods: {
  62. async getUserAccountInfo() {
  63. let res = await this.$u.post("manager/income", {
  64. page: this.indexPage
  65. })
  66. if (res.code == 200) {
  67. this.total_commission = res.data.total_commission
  68. this.listItem = this.listItem.concat(res.data.data)
  69. this.indexPage++
  70. if (res.data.current_page == res.data.last_page) {
  71. this.loadingType = 2;
  72. } else {
  73. this.loadingType = 0;
  74. }
  75. } else {
  76. uni.showToast({
  77. icon: 'none',
  78. title: data.message
  79. });
  80. this.loadingType = 0;
  81. }
  82. }
  83. }
  84. }
  85. </script>
  86. <style>
  87. .list_item {
  88. padding: 20rpx;
  89. border-radius: 16rpx;
  90. box-shadow: 6rpx 6rpx 10rpx rgba(122, 122, 122, 0.2);
  91. background: #fff;
  92. }
  93. .order-num::after {
  94. border-color: #bbb;
  95. }
  96. button::after {
  97. display: none;
  98. }
  99. </style>