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