index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template>
  2. <view>
  3. <view class="top-bg"></view>
  4. <view class="top-box">
  5. <view class="top">
  6. <text class="num">{{account.activeMoney}}</text>
  7. <text class="p">账户余额</text>
  8. </view>
  9. <view class="bottom">
  10. <view class="t">
  11. <view class="p">账户:</view>
  12. <view class="num">{{account.accountNo}}</view>
  13. </view>
  14. <view class="b">
  15. <view class="item">
  16. <view class="num">{{account.totalMoney}}</view>
  17. <view class="p">总金额</view>
  18. </view>
  19. <view class="item">
  20. <view class="num">{{account.deposit}}</view>
  21. <view class="p">保证金</view>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="btn-box">
  27. <view class="btn t" @click="chargeFn">立即充值</view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. account: {
  36. totalMoney: 0,
  37. lockMoney: 0,
  38. activeMoney: 0,
  39. deposit: 0
  40. },
  41. info: {
  42. saleCount: 0,
  43. buyCount: 0
  44. }
  45. }
  46. },
  47. onShow() {
  48. },
  49. methods: {
  50. chargeFn(){
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="scss">
  56. page {
  57. background-color: #fff;
  58. }
  59. .top-bg {
  60. width: 100%;
  61. height: 400rpx;
  62. position: absolute;
  63. z-index: 0;
  64. background-image: linear-gradient(0deg, #fff 0%, #0080ff 40%);
  65. }
  66. .top-box {
  67. position: relative;
  68. z-index: 1;
  69. .top {
  70. display: flex;
  71. flex-direction: column;
  72. align-items: center;
  73. justify-content: center;
  74. .num {
  75. color: #fff;
  76. font-size: 60rpx;
  77. margin-top: 50rpx;
  78. }
  79. .p {
  80. color: rgba(255, 255, 255, .7);
  81. margin-top: 10rpx;
  82. }
  83. }
  84. .bottom {
  85. display: flex;
  86. background-color: #fff;
  87. border-radius: 20rpx;
  88. margin: 40rpx;
  89. flex-direction: column;
  90. align-items: center;
  91. justify-content: center;
  92. .t {
  93. display: flex;
  94. width: 100%;
  95. padding: 40rpx 30rpx;
  96. box-sizing: border-box;
  97. border-bottom: 1px solid #eee;
  98. .p,
  99. .num {
  100. font-size: 30rpx;
  101. color: #191919;
  102. }
  103. .num {
  104. margin-left: auto;
  105. }
  106. }
  107. .b {
  108. display: flex;
  109. width: 100%;
  110. padding-bottom: 60rpx;
  111. .item {
  112. flex: 1;
  113. display: flex;
  114. flex-direction: column;
  115. align-items: center;
  116. justify-content: center;
  117. box-sizing: border-box;
  118. .num {
  119. color: #191919;
  120. font-size: 40rpx;
  121. margin-top: 50rpx;
  122. font-weight: bold;
  123. }
  124. .p {
  125. color: #999;
  126. margin-top: 10rpx;
  127. }
  128. }
  129. }
  130. }
  131. }
  132. .center-box {
  133. position: relative;
  134. z-index: 1;
  135. background-color: #fff;
  136. display: flex;
  137. border-radius: 20rpx;
  138. display: flex;
  139. margin: 30rpx 40rpx;
  140. padding: 15rpx;
  141. box-shadow: 0 0 50rpx rgba(0, 0, 0, 0.07);
  142. .item {
  143. flex: 1;
  144. display: flex;
  145. flex-direction: column;
  146. align-items: center;
  147. justify-content: center;
  148. min-height: 150rpx;
  149. border-radius: 999px;
  150. margin: 15rpx;
  151. .p {
  152. color: #191919;
  153. font-size: 32rpx;
  154. }
  155. .num {
  156. font-size: 36rpx;
  157. color: #0080ff;
  158. margin-top: 10rpx;
  159. }
  160. }
  161. .l {
  162. background-color: #fff8f5;
  163. }
  164. .r {
  165. background-color: #fffcf0;
  166. }
  167. }
  168. .btn-box {
  169. position: relative;
  170. z-index: 1;
  171. display: flex;
  172. border-radius: 20rpx;
  173. display: flex;
  174. margin: 30rpx;
  175. padding: 30rpx;
  176. flex-direction: column;
  177. .btn {
  178. height: 88rpx;
  179. width: 70%;
  180. color: #fff;
  181. margin: 20rpx auto;
  182. display: flex;
  183. align-items: center;
  184. justify-content: center;
  185. border-radius: 10rpx;
  186. }
  187. .t {
  188. background-color: #0080ff;
  189. }
  190. .b {
  191. background-color: #ffb400;
  192. }
  193. }
  194. </style>