all_profit.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <script>
  2. import {getTotalMoney, getWaterList} from "@/api/money";
  3. import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
  4. import tools from "@/common/js/tools";
  5. import EnBlank from "@/components/en-utils/en-blank/en-blank.vue";
  6. export default {
  7. name: "all-profit",
  8. components: {EnBlank},
  9. data() {
  10. return {
  11. address:'',
  12. revenueTotal:'',
  13. list:[],
  14. page:1
  15. };
  16. },
  17. mounted() {
  18. this.getTotalMoney()
  19. this.getWaterList()
  20. },
  21. methods: {
  22. async getAccount(){
  23. this.address= tokenpocketBnb.getMyAddress()
  24. },
  25. getWaterList(){
  26. getWaterList({'page':this.page,water_key:[4,5]}).then(res=>{
  27. if(res.code===1){
  28. ++this.page
  29. if(res.data.items.length>0){
  30. this.list.push(...res.data.items)
  31. }
  32. }
  33. })
  34. },
  35. getTotalMoney(){
  36. getTotalMoney().then(res=>{
  37. if (res.code===1){
  38. this.pledgeTotal=res.data.pledgeTotal
  39. this.revenueTotal=res.data.revenueTotal
  40. }
  41. })
  42. },
  43. returnBut() {
  44. uni.navigateBack({
  45. delta: 1
  46. });
  47. }
  48. },
  49. }
  50. </script>
  51. <template>
  52. <view class="flex-common-css box-sizing-border box-b">
  53. <view class="nav-box bgc-f box-sizing-border align-items-center">
  54. <!-- <i @click="returnBut" class="el-icon-arrow-left fw-b fs-20 mr-10"></i> -->
  55. <uni-icons @click="returnBut" type="left" size="20"></uni-icons>
  56. <view class="fs-28 fw-b">总收益</view>
  57. </view>
  58. <view class="head-box flex-direction-column align-items-center flex-justify-center b-rad-20 mb-10">
  59. <view class="fs-28 fc-f mb-16">
  60. 总收益
  61. </view>
  62. <view class="fs-26 fc-f fw-b mb-16">
  63. {{revenueTotal*1}}
  64. </view>
  65. <!-- <view class="fs-28 fc-f text-align-center tx-box b-rad-20">-->
  66. <!-- 提现-->
  67. <!-- </view>-->
  68. </view>
  69. <view class="fs-28 fw-b mb-10">
  70. 历史明细
  71. </view>
  72. <view class="scroll-view-css b-rad-20">
  73. <view v-for="item in list" :key="item.id"
  74. class="p-20 box-sizing-border bgc-f b-rad-20 align-items-center flex-justify-space">
  75. <view>
  76. <view class="fs-28 fw-b mb-16">
  77. {{item.status_str}}
  78. </view>
  79. <view class="fs-20 fc-858585">
  80. {{item.created_date}}
  81. </view>
  82. </view>
  83. <view class="fs-28 fw-b" v-if="item.price>=0.001">
  84. {{(item.price*1).toFixed(3)}}
  85. </view>
  86. <view class="fs-28 fw-b" v-else>
  87. {{(item.price*1).toFixed(6)}}
  88. </view>
  89. </view>
  90. <en-blank v-if="list.length<=0" message="~暂无记录"></en-blank>
  91. </view>
  92. </view>
  93. </template>
  94. <style scoped lang="scss">
  95. .box-b {
  96. padding: 120rpx 20rpx 20rpx;
  97. }
  98. .nav-box {
  99. width: 100%;
  100. height: 80rpx;
  101. line-height: 80rpx;
  102. position: absolute;
  103. top: 0;
  104. left: 0;
  105. padding-left: 20rpx;
  106. }
  107. .tx-box {
  108. width: 30%;
  109. height: 80rpx;
  110. background: #ff952d;
  111. line-height: 80rpx;
  112. }
  113. .head-box {
  114. padding: 60rpx 0;
  115. background-image: linear-gradient(270deg, #ffc62c, #ffa954);
  116. }
  117. </style>