account-info.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!-- 分销账户:展示基本统计信息 -->
  2. <template>
  3. <view class="account-card">
  4. <view class="account-card-box">
  5. <view class="ss-flex ss-row-between card-box-header">
  6. <view class="ss-flex">
  7. <view class="header-title ss-m-r-16">账户信息</view>
  8. <button
  9. class="ss-reset-button look-btn ss-flex"
  10. @tap="state.showMoney = !state.showMoney"
  11. >
  12. <uni-icons
  13. :type="state.showMoney ? 'eye-filled' : 'eye-slash-filled'"
  14. color="#A57A55"
  15. size="20"
  16. />
  17. </button>
  18. </view>
  19. <view class="ss-flex" @tap="sheep.$router.go('/pages/user/wallet/commission')">
  20. <view class="header-title ss-m-r-4">查看明细</view>
  21. <text class="cicon-play-arrow" />
  22. </view>
  23. </view>
  24. <!-- 收益 -->
  25. <view class="card-content ss-flex">
  26. <view class="ss-flex-1 ss-flex-col ss-col-center">
  27. <view class="item-title">当前佣金(元)</view>
  28. <view class="item-detail">
  29. {{ state.showMoney ? fen2yuan(state.summary.brokeragePrice || 0) : '***' }}
  30. </view>
  31. </view>
  32. <view class="ss-flex-1 ss-flex-col ss-col-center">
  33. <view class="item-title">昨天的佣金(元)</view>
  34. <view class="item-detail">
  35. {{ state.showMoney ? fen2yuan(state.summary.yesterdayPrice || 0) : '***' }}
  36. </view>
  37. </view>
  38. <view class="ss-flex-1 ss-flex-col ss-col-center">
  39. <view class="item-title">累计已提(元)</view>
  40. <view class="item-detail">
  41. {{ state.showMoney ? fen2yuan(state.summary.withdrawPrice || 0) : '***' }}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script setup>
  49. import sheep from '@/sheep';
  50. import { computed, reactive, onMounted } from 'vue';
  51. import BrokerageApi from '@/sheep/api/trade/brokerage';
  52. import { fen2yuan } from '@/sheep/hooks/useGoods';
  53. const userInfo = computed(() => sheep.$store('user').userInfo);
  54. const state = reactive({
  55. showMoney: false,
  56. summary: {},
  57. });
  58. onMounted(async () => {
  59. let { code, data } = await BrokerageApi.getBrokerageUserSummary();
  60. if (code === 0) {
  61. state.summary = data || {}
  62. }
  63. });
  64. </script>
  65. <style lang="scss" scoped>
  66. .account-card {
  67. width: 694rpx;
  68. margin: 0 auto;
  69. padding: 2rpx;
  70. background: linear-gradient(180deg, #ffffff 0.88%, #fff9ec 100%);
  71. border-radius: 12rpx;
  72. z-index: 3;
  73. position: relative;
  74. .account-card-box {
  75. background: #ffefd6;
  76. .card-box-header {
  77. padding: 0 30rpx;
  78. height: 72rpx;
  79. box-shadow: 0px 2px 6px #f2debe;
  80. .header-title {
  81. font-size: 24rpx;
  82. font-weight: 500;
  83. color: #a17545;
  84. line-height: 30rpx;
  85. }
  86. .cicon-play-arrow {
  87. color: #a17545;
  88. font-size: 24rpx;
  89. line-height: 30rpx;
  90. }
  91. }
  92. .card-content {
  93. height: 190rpx;
  94. background: #fdfae9;
  95. .item-title {
  96. font-size: 24rpx;
  97. font-weight: 500;
  98. color: #cba67e;
  99. line-height: 30rpx;
  100. margin-bottom: 24rpx;
  101. }
  102. .item-detail {
  103. font-size: 36rpx;
  104. font-family: OPPOSANS;
  105. font-weight: bold;
  106. color: #692e04;
  107. line-height: 30rpx;
  108. }
  109. }
  110. }
  111. }
  112. </style>