index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="app-page">
  3. <view class="top-box">
  4. <u--image width='710rpx' height='377rpx' radius="10rpx" mode="widthFix"
  5. :src="`${$getImgBaseUrl()}ic-tx-bg.png`" :fade="true" duration="450" customStyle="margin:0;" />
  6. <view class="top-view">
  7. <text class="t1">可提现金额(元)</text>
  8. <view class="top-price-box">
  9. <u-count-to :startVal="0" :endVal="canBeCashed" separator="," decimals="2" color="#FFFFFF"
  10. fontSize="68rpx" bold="true"></u-count-to>
  11. <view class="top-right-box" @click="toSubPages('withdrawal')">
  12. <text>去提现</text>
  13. <u-icon name="arrow-right" color="#FFFFFF" size="15rpx" customStyle="padding: 12rpx"></u-icon>
  14. </view>
  15. </view>
  16. <u-line color="rgba(191,181,255,0.19)" length="610rpx" customStyle="margin:60rpx auto 0 auto;"></u-line>
  17. <view class="top-bottom-box">
  18. <text class="t2" space="nbsp">总金额(元) {{userInfo.balance_total}}</text>
  19. <text class="t3" space="nbsp">冻结金额(元) {{userInfo.balance_lock}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="content-box">
  24. <BaseTitle txt="收支明细" />
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import BaseTitle from "@/components/base-title/index.vue"
  30. export default {
  31. components: {
  32. BaseTitle
  33. },
  34. data() {
  35. return {
  36. userInfo: {
  37. rebate_total: 0,
  38. rebate_used: 0
  39. }
  40. }
  41. },
  42. computed: {
  43. canBeCashed() {
  44. const { balance_total, balance_used, balance_lock } = this.userInfo
  45. return balance_total - balance_used - balance_lock
  46. }
  47. },
  48. onLoad(options) {},
  49. onShow() {
  50. const tempUnserInfo = uni.getStorageSync('userInfo')
  51. if (tempUnserInfo) {
  52. this.userInfo = JSON.parse(tempUnserInfo)
  53. }
  54. },
  55. methods: {
  56. toSubPages(index) {
  57. uni.navigateTo({
  58. url: `/subPages/${index}/index`
  59. })
  60. },
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .app-page {
  66. width: 100%;
  67. display: flex;
  68. align-items: center;
  69. flex-direction: column;
  70. }
  71. .top-box {
  72. margin-top: 20rpx;
  73. width: 100%;
  74. height: 423rpx;
  75. display: flex;
  76. align-items: center;
  77. flex-direction: column;
  78. position: relative;
  79. }
  80. .top-view {
  81. position: absolute;
  82. top: 0;
  83. left: 20rpx;
  84. right: 20rpx;
  85. display: flex;
  86. flex-direction: column;
  87. .t1 {
  88. font-size: 28rpx;
  89. font-family: PingFang SC-Medium, PingFang SC;
  90. font-weight: 500;
  91. color: #EAE7FF;
  92. margin-top: 43rpx;
  93. margin-left: 43rpx;
  94. }
  95. .top-price-box {
  96. width: calc(100% - 100rpx);
  97. display: flex;
  98. margin-left: 50rpx;
  99. margin-top: 24rpx;
  100. flex-direction: row;
  101. align-items: center;
  102. justify-content: space-between;
  103. .top-right-box {
  104. padding: 30rpx 0 30rpx 30rpx;
  105. display: flex;
  106. flex-direction: row;
  107. align-items: center;
  108. text {
  109. font-size: 28rpx;
  110. font-family: PingFang SC-Medium, PingFang SC;
  111. font-weight: 500;
  112. color: #FFFFFF;
  113. }
  114. }
  115. }
  116. .top-bottom-box {
  117. width: calc(100% - 100rpx);
  118. height: 110rpx;
  119. margin-left: 50rpx;
  120. display: flex;
  121. flex-direction: row;
  122. align-items: center;
  123. justify-content: space-between;
  124. .t2 {
  125. font-size: 26rpx;
  126. font-family: PingFang SC-Medium, PingFang SC;
  127. font-weight: 500;
  128. color: #EAE7FF;
  129. }
  130. .t3 {
  131. font-size: 26rpx;
  132. font-family: PingFang SC-Medium, PingFang SC;
  133. font-weight: 500;
  134. color: #EAE7FF;
  135. }
  136. }
  137. }
  138. .content-box {
  139. width: 710rpx;
  140. display: flex;
  141. flex-direction: column;
  142. }
  143. </style>