mybalance.vue 2.5 KB

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