mybalance.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="page-wrap">
  3. <u-navbar
  4. title="余额中心"
  5. :placeholder="true"
  6. :autoBack="false"
  7. @leftClick="leftClick"
  8. :safeAreaInsetTop="true"
  9. >
  10. </u-navbar>
  11. <view class="panel">
  12. <view class="title">账户余额(元)</view>
  13. <view class="number-wrap">
  14. <view class="total">
  15. ¥ <text class="number">{{balanceInfo.balance}}</text>
  16. </view>
  17. <view class="other u-flex">
  18. <view class="" style="margin-right: 20rpx;">
  19. 授信额度:{{balanceInfo.grantQuota}}
  20. </view>
  21. <view class="" style="margin-right: 20rpx;">
  22. 授信余额:{{balanceInfo.grantSurplus}}
  23. </view>
  24. <view class="">
  25. 授信欠款:{{ balanceInfo.grantUsed }}
  26. </view>
  27. </view>
  28. </view>
  29. <!-- <view class="btn-wrap">
  30. <text class="btn" @click="$u.route('/center/recharge')">充值</text>
  31. </view> -->
  32. <view class="shape shape1"></view>
  33. <view class="shape shape2"></view>
  34. </view>
  35. <u-cell-group>
  36. <u-cell @click="$u.route('/center/dealList')" icon="order" title="交易明细" :isLink="true"></u-cell>
  37. <u-cell @click="$u.route('/center/setPaypass',{fromPage:'reset'})" icon="setting-fill" title="支付密码" :isLink="true"></u-cell>
  38. <u-cell @click="$u.route('/center/findpaypass')" icon="fingerprint" title="找回支付密码" :isLink="true"></u-cell>
  39. </u-cell-group>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. balanceInfo:{},
  47. params:{
  48. }
  49. }
  50. },
  51. onShow() {
  52. this.getBalanceInfo();
  53. },
  54. onLoad() {
  55. },
  56. methods: {
  57. leftClick(){
  58. uni.reLaunch({url: '/center/center'});
  59. },
  60. getBalanceInfo(){
  61. this.$u.api.balanceInfo({id:this.vuex_member_info.id}).then(res=>{
  62. this.balanceInfo = res.data;
  63. // this.avatar = res.data.avatar;
  64. // console.log('balanceInfo',this.balanceInfo);
  65. }).catch(err=>{
  66. console.log('getBalanceInfo',err.data);
  67. })
  68. },
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .panel{
  74. // min-height: 284rpx;
  75. position: relative;
  76. overflow: hidden;
  77. box-sizing: border-box;
  78. background-color: #ddd;
  79. padding: 40rpx;
  80. border-radius: 8rpx;
  81. margin-bottom: 40rpx;
  82. color: #FFFFFF;
  83. background: linear-gradient(147deg, #FF7979 0%, #ED0000 100%);
  84. .title{
  85. font-size: 26rpx;
  86. font-weight: 400;
  87. line-height: 37rpx;
  88. }
  89. .number-wrap{
  90. font-size: 24rpx;
  91. .number{
  92. font-size: 58rpx;
  93. font-weight: 600;
  94. line-height: 81rpx;
  95. margin-bottom: 50rpx;
  96. margin-left: 10rpx;
  97. }
  98. }
  99. .btn-wrap{
  100. position: relative;
  101. z-index: 99;
  102. text-align: right;
  103. .btn{
  104. display: inline-block;
  105. padding: 7rpx 20rpx;
  106. border-radius: 30rpx;
  107. background: rgba(255,255,255,0.16);
  108. }
  109. }
  110. .shape{
  111. width: 326rpx;
  112. height: 372rpx;
  113. position: absolute;
  114. border-radius: 50% 50%;
  115. top: -50rpx;
  116. }
  117. .shape1{
  118. background: rgba(255,255,255,0.1);
  119. right: -50rpx;
  120. }
  121. .shape2{
  122. background: rgba(255,255,255,0.2);
  123. right: -170rpx;
  124. }
  125. }
  126. </style>