mineMoney.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <!-- 余额组件 -->
  3. <view
  4. class="mine-money"
  5. id="mine-money"
  6. :style="{ height: userInformation.merchant ? '110px' : '66px' }"
  7. >
  8. <view class="top" v-if="userInformation.merchant" @click="toEnsure">
  9. <view class="content">
  10. <image
  11. class="money-icon"
  12. src="../../../static/mine/308.png"
  13. mode=""
  14. ></image>
  15. <text>{{ i18n.myDeposit }}</text>
  16. </view>
  17. <view class="content"
  18. >{{ userInformation.deposit || 0 }} <text class="right-icon"></text>
  19. </view>
  20. </view>
  21. <view class="bottom">
  22. <view class="basis" @click="jumpBalance">
  23. <view class="num">{{ userInformation.balance || 0 }}</view>
  24. <view class="characters">{{ i18n.balance }}</view>
  25. </view>
  26. <view class="basis" @click="toFollow">
  27. <view class="num">{{ userInformation.interest_num }}</view>
  28. <view class="characters">{{ i18n.mineFollow }}</view>
  29. </view>
  30. <view class="basis" @click="toPackage">
  31. <view class="num">{{ userInformation.express_num }}</view>
  32. <view class="characters">{{ i18n.myPackage }}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. props: {
  40. isTeam: {
  41. type: Boolean,
  42. default: false,
  43. },
  44. userInformation: {
  45. type: Object,
  46. default: {},
  47. },
  48. },
  49. data() {
  50. return {};
  51. },
  52. computed: {
  53. i18n() {
  54. return this.$t("index");
  55. },
  56. },
  57. methods: {
  58. jumpBalance() {
  59. uni.navigateTo({
  60. url: "/pageC/accountBalance/accountBalance",
  61. });
  62. },
  63. toEnsure() {
  64. uni.navigateTo({
  65. url: "/pageC/ensureMoney/ensureMoney",
  66. });
  67. },
  68. toFollow() {
  69. uni.navigateTo({
  70. url: "/pageC/mineFollow/mineFollow",
  71. });
  72. },
  73. toPackage() {
  74. uni.navigateTo({
  75. url: "/pageC/myPackage/myPackage",
  76. });
  77. },
  78. },
  79. created() {},
  80. };
  81. </script>
  82. <style lang="scss">
  83. .mine-money {
  84. height: 110px;
  85. width: 100%;
  86. background-color: #3b3d55;
  87. margin-top: 15px;
  88. border-radius: 10px;
  89. .top {
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. color: #fff;
  94. font-size: 14px;
  95. height: 44px;
  96. .content {
  97. display: flex;
  98. align-items: center;
  99. margin: 0 10px;
  100. }
  101. .money-icon {
  102. width: 18px;
  103. height: 18px;
  104. margin-right: 6px;
  105. }
  106. .right-icon {
  107. display: inline-block;
  108. width: 20px;
  109. height: 20px;
  110. background-image: url("../../../static/mine/309.png");
  111. background-size: 100% 100%;
  112. background-repeat: no-repeat;
  113. }
  114. }
  115. .bottom {
  116. display: flex;
  117. justify-content: space-around;
  118. background-color: #fff;
  119. border-radius: 10px;
  120. height: 66px;
  121. align-items: center;
  122. .num {
  123. font-size: 18px;
  124. color: #333;
  125. text-align: center;
  126. font-weight: 600;
  127. }
  128. .characters {
  129. font-size: 13px;
  130. color: #333;
  131. text-align: center;
  132. }
  133. }
  134. }
  135. </style>