mybalance.vue 2.5 KB

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