index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view>
  3. <view class="cu-bar bg-white solid-bottom">
  4. <view class="action">
  5. <text class="cuIcon-title text-orange "></text> 团队收益
  6. </view>
  7. </view>
  8. <view class="lw-table">
  9. <view class="lw-table-item padding">
  10. <view :class="{'text-price':brokerinfo.type == 1}" class="lw-table-value text-bold text-red">
  11. {{statistics.income_total}}
  12. </view>
  13. <view class="lw-table-title text-gray padding-top-xs">总收益</view>
  14. </view>
  15. <view class="lw-table-item padding">
  16. <view :class="{'text-price':brokerinfo.type == 1}" class="lw-table-value text-bold text-red">
  17. {{statistics.income}}
  18. </view>
  19. <view class="lw-table-title text-gray padding-top-xs">当前收益</view>
  20. </view>
  21. </view>
  22. <view class="cu-bar bg-white solid-bottom margin-top">
  23. <view class="action">
  24. <text class="cuIcon-title text-orange "></text> 我的下线
  25. </view>
  26. </view>
  27. <view class="lw-table">
  28. <view class="lw-table-item padding" @click="goNavPage('/pages/partner/user')">
  29. <view class="lw-table-value text-bold text-black">{{statistics.user}}</view>
  30. <view class="lw-table-title text-gray padding-top-xs">求职用户</view>
  31. </view>
  32. <view class="lw-table-item padding" @click="goNavPage('/pages/partner/broker')">
  33. <view class="lw-table-value text-bold text-black">{{statistics.broker}}</view>
  34. <view class="lw-table-title text-gray padding-top-xs">经纪人</view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. var _this;
  41. export default {
  42. data() {
  43. return {
  44. userinfo: {},
  45. brokerinfo: {},
  46. statistics: {
  47. income_total: 0,
  48. income: 0,
  49. user: 0,
  50. worker: 0,
  51. agent: {},
  52. },
  53. modalName: '',
  54. };
  55. },
  56. onLoad: function() {
  57. _this = this;
  58. _this.userinfo = uni.getStorageSync('userinfo') || false;
  59. _this.brokerinfo = uni.getStorageSync('brokerinfo') || false;
  60. if (_this.userinfo === false || _this.brokerinfo === false) {
  61. uni.reLaunch({
  62. url: "/pages/my/my"
  63. });
  64. return false;
  65. }
  66. _this.init();
  67. },
  68. methods: {
  69. init: function() {
  70. _this.$req.ajax({
  71. path: "broker/partnerCenter",
  72. data: {
  73. brokerid: _this.brokerinfo.id
  74. }
  75. }).then((data) => {
  76. _this.statistics = data
  77. }).catch((err) => {
  78. uni.showModal({
  79. title: '信息提示',
  80. content: err,
  81. showCancel: false
  82. });
  83. });
  84. },
  85. goNavPage: function(pageurl) {
  86. _this.userinfo = _this.checkLogin("/pages/my/my");
  87. if (_this.userinfo === false) {
  88. return false;
  89. }
  90. uni.navigateTo({
  91. url: pageurl,
  92. fail: function() {
  93. uni.switchTab({
  94. url: pageurl
  95. });
  96. }
  97. });
  98. },
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .header {
  104. height: 146rpx;
  105. position: relative;
  106. display: flex;
  107. align-items: center;
  108. justify-content: flex-end;
  109. .header-image {
  110. width: 750rpx;
  111. position: absolute;
  112. top: 0;
  113. left: 0;
  114. z-index: -1;
  115. }
  116. .header-notice {
  117. padding-right: 40rpx;
  118. font-size: 25rpx;
  119. color: #E0E0E0;
  120. display: flex;
  121. flex-direction: column;
  122. justify-content: center;
  123. }
  124. }
  125. .lw-table {
  126. display: flex;
  127. align-items: center;
  128. justify-content: space-around;
  129. background: white;
  130. padding: 20rpx 0;
  131. }
  132. .lw-table .lw-table-item {
  133. text-align: center;
  134. }
  135. .lw-table .lw-table-value {
  136. font-size: 40rpx;
  137. }
  138. </style>