Balance.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view :class="['qn-page-' + theme]">
  3. <view class="balace-view primary-lg">
  4. <view class="label">账户余额</view>
  5. <view class="money">
  6. <text class="icon">¥</text>
  7. <text>{{ Number(userInfo.memberBalance) || 0 }}</text>
  8. </view>
  9. </view>
  10. <view class="bth-ul">
  11. <!-- <view class="btn-li" @click="goPage('/pagesT/money/addWithdrawal')">
  12. <text class="ibonfont ibondaifukuan"></text>
  13. <text class="label">余额提现</text>
  14. <text class="ibonfont ibonjinru float_right"></text>
  15. </view> -->
  16. <view class="btn-li" @click="goPage('/pagesT/money/recharge')">
  17. <text class="ibonfont ibondaifukuan"></text>
  18. <text class="label">余额充值</text>
  19. <text class="ibonfont ibonjinru float_right"></text>
  20. </view>
  21. <view class="btn-li clearfix" @click="goPage('/pagesT/money/BalanceDetail')">
  22. <text class="ibonfont ibonnavicon-jylstj"></text>
  23. <text class="label">余额流水</text>
  24. <text class="ibonfont ibonjinru float_right"></text>
  25. </view>
  26. <view class="btn-li" @click="setPassword">
  27. <text class="ibonfont ibonpassword"></text>
  28. <text class="label">设置支付密码</text>
  29. <text class="ibonfont ibonjinru float_right"></text>
  30. </view>
  31. <view class="btn-li clearfix" @click="goPage('/pagesT/money/CustomerBalanceDetail')">
  32. <text class="ibonfont iboncaiwuliushui"></text>
  33. <text class="label">往来查询</text>
  34. <text class="ibonfont ibonjinru float_right"></text>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data() {
  42. return {
  43. userInfo: {}
  44. };
  45. },
  46. onShow() {
  47. this.getCustomerInfo();
  48. },
  49. methods: {
  50. // 获取用户信息
  51. getCustomerInfo() {
  52. this.$u.api.getCustomerInfo().then(({
  53. data
  54. }) => {
  55. this.userInfo = data;
  56. this.$store.commit('commit_userStatus', data);
  57. });
  58. },
  59. setPassword() {
  60. // 已经设置过密码
  61. if (this.userInfo.payPassword) {
  62. this.goPage('/pagesT/money/PayPasswordEditCheck');
  63. } else {
  64. // 未设置过密码
  65. this.goPage('/pagesT/money/PayPassword');
  66. }
  67. }
  68. }
  69. };
  70. </script>
  71. <style lang="scss" scoped>
  72. .balace-view {
  73. width: 710rpx;
  74. margin: 20rpx auto;
  75. text-align: center;
  76. color: #ffffff;
  77. border-radius: 20rpx;
  78. padding: 50rpx 0;
  79. .label {
  80. font-size: 24rpx;
  81. padding-bottom: 10rpx;
  82. }
  83. .money {
  84. font-size: 50rpx;
  85. font-weight: bold;
  86. font-family: DIN-Medium;
  87. .icon {
  88. font-size: 28rpx;
  89. }
  90. }
  91. }
  92. .bth-ul {
  93. padding: 0 30rpx;
  94. width: 710rpx;
  95. margin: 40rpx auto 0;
  96. background-color: #ffffff;
  97. border-radius: 20rpx;
  98. .btn-li {
  99. line-height: 90rpx;
  100. border-bottom: 1px solid #f5f5f5;
  101. .label {
  102. margin-left: 20rpx;
  103. }
  104. .ibonjinru {
  105. font-size: 28rpx;
  106. color: #999999;
  107. }
  108. &:last-child {
  109. border-bottom: 0;
  110. }
  111. }
  112. }
  113. </style>