index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="myAccount">
  3. <capsule :showBorder="true" bgColor="#FF7451">
  4. <template v-slot:top>
  5. <view class="shop-top">
  6. <view class="back-icon" @click="backClick">
  7. <tui-icon name="arrowleft" :size="32" color="#FFFFFF"></tui-icon>
  8. </view>
  9. <view class="shop-name">我的账户</view>
  10. </view>
  11. </template>
  12. </capsule>
  13. <view class="seat"></view>
  14. <view class="acction-turnover">
  15. <view class="turnover-box">
  16. <view class="turnover-price">
  17. <text>营业额</text>
  18. <text>{{ myPriceInfo.turnover }}</text>
  19. </view>
  20. <view class="price-box">
  21. <view class="box-item">
  22. <text>途中金额</text>
  23. <text>{{ myPriceInfo.wayAmount }}</text>
  24. </view>
  25. <view class="box-item">
  26. <text>已到账金额(元)</text>
  27. <text>{{ myPriceInfo.theAmountReceived }}</text>
  28. </view>
  29. </view>
  30. <view class="price-detailed">
  31. <text>收入明细</text>
  32. <view class="goSee">
  33. <text>去查看</text>
  34. <tui-icon
  35. name="arrowright"
  36. color="rgba(0, 0, 0, 0.4)"
  37. :size="18"
  38. ></tui-icon>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="my-wallet">
  44. <view class="wallet-header">
  45. <view class="wallet-title">我的钱包</view>
  46. <view class="wallet-go">
  47. <text>收款账户</text>
  48. <tui-icon name="arrowright" color="#999999" :size="18"></tui-icon>
  49. </view>
  50. </view>
  51. <view class="waller-container">
  52. <view class="waller-all">
  53. <text>账户总余额</text>
  54. <text>{{ myPriceInfo.totalAccountBalance || 0 }}</text>
  55. </view>
  56. <view class="go-waller" @click="goTo">去提现</view>
  57. <view class="waller-list">
  58. <view class="waller-item">
  59. <text>可提现总余额</text>
  60. <text>{{ myPriceInfo.withdrawalAmount || 0 }}</text>
  61. </view>
  62. <view class="waller-item">
  63. <text>提现中总金额</text>
  64. <text>{{ myPriceInfo.withdrawalInAmount || 0 }}</text>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="box-container">
  70. <view
  71. class="acction-box"
  72. v-for="(item, index) in tradeAccount"
  73. :key="index"
  74. >
  75. <view class="box-title">{{ item.title }}</view>
  76. <view class="box-list" :class="item.isAct ? 'act' : ''">
  77. <view
  78. class="box-item"
  79. v-for="(item2, index2) in item.list"
  80. :key="index2"
  81. >
  82. <text>{{ item2.name }}</text>
  83. <text>{{ myPriceInfo[item2.price] || 0 }}</text>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. import { getMyAccount } from "@/config/index";
  92. import { tradeAccount } from "./data.js";
  93. export default {
  94. created() {
  95. this.getInfo();
  96. },
  97. data() {
  98. return {
  99. // 静态数据
  100. tradeAccount: tradeAccount,
  101. myPriceInfo: {},
  102. };
  103. },
  104. methods: {
  105. // navigateTo(`/pages_module/withdrawal/index?balance=${financialData.withdrawableMoney}&trading=${financialData.beeWithdrawal}
  106. async getInfo() {
  107. let res = await getMyAccount({});
  108. this.myPriceInfo = res.data;
  109. console.log(res);
  110. },
  111. goTo(){
  112. // 去提现
  113. this.navigateTo(`/pages_module/withdrawal/index?balance=${this.myPriceInfo.withdrawalAmount}&trading=${this.myPriceInfo.withdrawalConsumptionBalance}`);
  114. },
  115. backClick() {
  116. uni.navigateTo({
  117. delta: 1,
  118. // 兜底处理
  119. fail: () => {
  120. uni.switchTab({
  121. url: "/pages/tabbar/user/index",
  122. });
  123. },
  124. });
  125. },
  126. },
  127. };
  128. </script>
  129. <style lang="scss" scoped>
  130. @import "./index.scss";
  131. </style>