Balance.vue 2.5 KB

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