account-info.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. ></uni-icons>
  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"></text>
  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 ? agentInfo.total_income || '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.commission || '0.00' : '***' }}
  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 ? userInfo.total_consume || '0.00' : '***' }}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </template>
  48. <script setup>
  49. import sheep from '@/sheep';
  50. import { computed, reactive } from 'vue';
  51. const userInfo = computed(() => sheep.$store('user').userInfo);
  52. const agentInfo = computed(() => sheep.$store('user').agentInfo);
  53. const state = reactive({
  54. showMoney: false,
  55. });
  56. </script>
  57. <style lang="scss" scoped>
  58. .account-card {
  59. width: 694rpx;
  60. margin: 0 auto;
  61. padding: 2rpx;
  62. background: linear-gradient(180deg, #ffffff 0.88%, #fff9ec 100%);
  63. border-radius: 12rpx;
  64. z-index: 3;
  65. position: relative;
  66. .account-card-box {
  67. background: #ffefd6;
  68. .card-box-header {
  69. padding: 0 30rpx;
  70. height: 72rpx;
  71. box-shadow: 0px 2px 6px #f2debe;
  72. .header-title {
  73. font-size: 24rpx;
  74. font-weight: 500;
  75. color: #a17545;
  76. line-height: 30rpx;
  77. }
  78. .cicon-play-arrow {
  79. color: #a17545;
  80. font-size: 24rpx;
  81. line-height: 30rpx;
  82. }
  83. }
  84. .card-content {
  85. height: 190rpx;
  86. background: #fdfae9;
  87. .item-title {
  88. font-size: 24rpx;
  89. font-weight: 500;
  90. color: #cba67e;
  91. line-height: 30rpx;
  92. margin-bottom: 24rpx;
  93. }
  94. .item-detail {
  95. font-size: 36rpx;
  96. font-family: OPPOSANS;
  97. font-weight: bold;
  98. color: #692e04;
  99. line-height: 30rpx;
  100. }
  101. }
  102. }
  103. }
  104. </style>