account-info.vue 2.8 KB

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