earnings.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <template>
  2. <view>
  3. <!-- <view class="view1" style="border-radius: 20upx;" @click="goTixian">
  4. <view>
  5. <view style="font-size: 40rpx;color: #1789FD;">{{ teamMoney }}</view>
  6. <view style="font-size: 28rpx;margin-top: 10rpx;">总收益</view>
  7. </view>
  8. </view> -->
  9. <!-- <view class="box">
  10. <view class="flex align-center justify-between" style="padding: 50upx 50upx;">
  11. <view>
  12. <view class="margin-bottom-sm">总收益</view>
  13. <view style="font-size: 58upx;">{{teamMoney?teamMoney:'0'}}</view>
  14. </view>
  15. <view class="btn" @click="goTixian">提现</view>
  16. </view>
  17. </view> -->
  18. <view class="view1" style="border-radius: 20upx;">
  19. <view style="display: flex;flex-direction: row;">
  20. <view style="margin: 40upx 0 0 60upx;height: 100upx; width: 150upx;text-align: center;">
  21. <view style="font-size: 40rpx;color: #346EF6;">{{ teamMoney }}</view>
  22. <view style="font-size: 28rpx;margin-top: 10rpx;">总收益</view>
  23. </view>
  24. <view style="margin: 40upx 0 0 60upx;height: 100upx; width: 150upx;text-align: center;">
  25. <view style="font-size: 40rpx;color: #346EF6;">{{ oneTeamMoney }}</view>
  26. <view style="font-size: 28rpx;margin-top: 10rpx;">一级收益</view>
  27. </view>
  28. <view style="margin: 40upx 0 0 60upx;height: 100upx; width: 150upx;text-align: center;">
  29. <view style="font-size: 40rpx;color: #346EF6;">{{ twoTeamMoney }}</view>
  30. <view style="font-size: 28rpx;margin-top: 10rpx;">二级收益</view>
  31. </view>
  32. </view>
  33. <view class="flex align-center justify-between margin-top-xl padding-lr-xl">
  34. <view class="btn" @click="goTixian">提现</view>
  35. <view class="btn " @click="golist">收益明细</view>
  36. </view>
  37. </view>
  38. <view class="navbar">
  39. <view v-for="(item, index) in tabList" :key="index" class="nav-item" :class="{current: type == item.type}"
  40. @click="changeList(item.type)">
  41. {{item.text}}
  42. </view>
  43. </view>
  44. <view class="view2"
  45. style="box-shadow: rgba(183, 183, 183, 0.3) 1px 1px 10px 1px;border-radius: 20upx;margin-bottom: 50upx;">
  46. <view style="display: flex;flex-direction: row;padding: 20upx;">
  47. <view style="width: 15%;">编号</view>
  48. <view style="width: 20%;">头像</view>
  49. <view style="width: 45%;">昵称</view>
  50. <view style="width: 30%;text-align: center;">奖励</view>
  51. </view>
  52. <view class="flex justify-between align-center padding" v-for="(item, index) in list" :key="index">
  53. <view style="width: 15%;">
  54. <view style="font-size: 28upx;margin-left: 15upx;margin-top: 6upx;">{{ index + 1 }}
  55. </view>
  56. </view>
  57. <view style="width: 20%;">
  58. <image :src="item.avatar?item.avatar:'../../static/logo.png'" class="round"
  59. style="width: 50rpx;height: 50rpx;"></image>
  60. </view>
  61. <view style="width: 45%;display: flex;flex-direction: row;align-items: center;">
  62. <view style="font-size: 28upx;width: 90%;overflow: hidden;">{{ item.userName?item.userName:'' }}
  63. </view>
  64. </view>
  65. <view style="width: 30%;text-align: center;display: flex;justify-content: center;align-items: center;">
  66. <view style="font-size: 32upx;color: #FF7F00;">¥{{ item.money ? item.money : 0 }}</view>
  67. </view>
  68. </view>
  69. <empty v-if="list.length==0" style="height: 70vh;position: relative;"></empty>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. import empty from '@/components/empty.vue'
  75. export default {
  76. components: {
  77. empty
  78. },
  79. data() {
  80. return {
  81. total: 0,
  82. first: 0,
  83. second: 0,
  84. list: [],
  85. page: 1,
  86. limit: 10,
  87. tabIndex: 1,
  88. checkReZhiShu: '否',
  89. checkReTuanZhang: '否',
  90. checkReFeiZhiShu: '否',
  91. scrollTop: false,
  92. tabList: [{
  93. state: 'zs',
  94. text: '一级',
  95. type: 1,
  96. number: 0
  97. }, {
  98. state: 'fzs',
  99. text: '二级',
  100. type: 2,
  101. number: 0
  102. }, ],
  103. type: 1,
  104. teamMoney: 0,
  105. oneTeamMoney: 0,
  106. twoTeamMoney: 0,
  107. count: 0,
  108. }
  109. },
  110. onLoad() {
  111. this.$queue.showLoading("加载中...");
  112. this.getTeamMoney()
  113. this.getList();
  114. },
  115. onPageScroll: function(e) {
  116. this.scrollTop = e.scrollTop > 200;
  117. },
  118. methods: {
  119. golist() {
  120. uni.navigateTo({
  121. url: '/my/wallet/moneydetail'
  122. })
  123. },
  124. changeList(e) {
  125. this.page = 1
  126. this.type = e
  127. this.getList()
  128. },
  129. getTeamMoney() {
  130. this.$Request.getT('/app/orders/selectTeamStatistics').then(res => {
  131. if (res.code == 0) {
  132. this.teamMoney = res.data.teamMoney ? res.data.teamMoney : 0;
  133. this.oneTeamMoney = res.data.oneTeamMoney ? res.data.oneTeamMoney : 0;
  134. this.twoTeamMoney = res.data.twoTeamMoney ? res.data.twoTeamMoney : 0;
  135. }
  136. });
  137. },
  138. //收益列表
  139. getList() {
  140. uni.showLoading({
  141. title: '加载中...'
  142. });
  143. let data = {
  144. page: this.page,
  145. limit: this.limit,
  146. type: this.type
  147. }
  148. this.$Request.getT('/app/orders/selectTeamUserList', data).then(res => {
  149. if (res.code == 0 && res.data) {
  150. this.count = res.data.totalPage
  151. if (this.page == 1) {
  152. this.list = res.data.list
  153. } else {
  154. this.list = [...this.list, ...res.data.list]
  155. }
  156. }
  157. uni.hideLoading();
  158. });
  159. },
  160. goTixian() {
  161. uni.navigateTo({
  162. url: '/my/wallet/wallet'
  163. })
  164. }
  165. },
  166. onReachBottom: function() {
  167. if (this.list.length < this.count) {
  168. this.page = this.page + 1;
  169. this.getList();
  170. } else {
  171. uni.showToast({
  172. title: '没有更多了',
  173. icon: 'none'
  174. })
  175. }
  176. },
  177. onPullDownRefresh: function() {
  178. this.page = 1;
  179. this.getList();
  180. }
  181. }
  182. </script>
  183. <style lang="less">
  184. page {
  185. background-color: #FFFFFF;
  186. }
  187. .btn {
  188. width: 280rpx;
  189. text-align: center;
  190. // background: fd6f4b;
  191. background: linear-gradient(90deg, #6C91FE 0%, #4965F9 100%);
  192. // background: linear-gradient(90deg, #f49471 0%, #fd6f4b 100%);
  193. border-radius: 35upx;
  194. padding: 16upx 45upx;
  195. color: #FFFFFF;
  196. }
  197. .box {
  198. margin: 30upx;
  199. background: linear-gradient(90deg, #6C91FE 0%, #4965F9 100%);
  200. border-radius: 24upx;
  201. color: #FFFFFF;
  202. }
  203. // .btn {
  204. // background: linear-gradient(90deg, #9DB6FF 0%, #7D92FF 100%);
  205. // border-radius: 35upx;
  206. // padding: 16upx 45upx;
  207. // color: #FFFFFF;
  208. // }
  209. .view1 {
  210. background-color: #FFFFFF;
  211. width: 93%;
  212. // height: 300upx;
  213. margin-left: 26upx;
  214. border-radius: 20upx;
  215. margin-top: 20upx;
  216. box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
  217. text-align: center;
  218. padding-bottom: 20rpx;
  219. // padding: 100upx 0;
  220. }
  221. .view2 {
  222. background-color: #FFFFFF;
  223. width: 93%;
  224. margin-left: 26upx;
  225. border-radius: 20upx;
  226. margin-top: 20upx;
  227. margin-bottom: 20upx;
  228. }
  229. .yaoqing_view {
  230. width: 95%;
  231. display: flex;
  232. position: fixed;
  233. bottom: 100rpx;
  234. justify-content: center;
  235. }
  236. .yaoqing_btn {
  237. width: 520rpx;
  238. height: 80rpx;
  239. line-height: 80rpx;
  240. text-align: center;
  241. background: #1789FD;
  242. // color: #FFFFFF;
  243. border-radius: 50rpx;
  244. }
  245. .tui-tab-item-title {
  246. // color: #ffffff;
  247. font-size: 30rpx;
  248. height: 80rpx;
  249. line-height: 80rpx;
  250. flex-wrap: nowrap;
  251. white-space: nowrap;
  252. }
  253. .tui-tab-item-title-active {
  254. border-bottom: 1px solid #5E81F9;
  255. color: #5E81F9;
  256. font-size: 32upx;
  257. font-weight: bold;
  258. border-bottom-width: 6upx;
  259. text-align: center;
  260. }
  261. .item {
  262. background: #f5f5f5;
  263. padding: 32rpx;
  264. margin: 32rpx;
  265. font-size: 28rpx;
  266. box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
  267. border-radius: 16upx;
  268. }
  269. .navbar {
  270. display: flex;
  271. height: 40px;
  272. border-radius: 20upx;
  273. box-shadow: 0 1px 5px rgba(0, 0, 0, .06);
  274. position: relative;
  275. z-index: 10;
  276. margin: 20upx 24upx 0;
  277. border-radius: 16upx;
  278. overflow: hidden;
  279. .nav-item {
  280. flex: 1;
  281. display: flex;
  282. justify-content: center;
  283. align-items: center;
  284. height: 100%;
  285. font-size: 15px;
  286. // color: $font-color-dark;
  287. position: relative;
  288. &.current {
  289. // color: $base-color;
  290. background-color: #346EF6;
  291. color: #FFFFFF;
  292. &:after {
  293. content: '';
  294. position: absolute;
  295. left: 50%;
  296. bottom: 0;
  297. transform: translateX(-50%);
  298. width: 44px;
  299. height: 0;
  300. // border-bottom: 2px solid $base-color;
  301. }
  302. }
  303. }
  304. }
  305. </style>