withdraw_list.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <Theme>
  3. <view class="wrap">
  4. <Navbar title="提现记录" fixed border>
  5. <template #right>
  6. <navMenu :options="{ icon: 'icon-home', text: '主页' }" />
  7. </template>
  8. </Navbar>
  9. <view class="content">
  10. <List url="/users/extract/record" ref="listRef">
  11. <template #item="{ item }">
  12. <view class="_list">
  13. <view class="status">{{ statusText(item.status) }}</view>
  14. <view class="_list_item">
  15. <view class="label">
  16. <trans _t="订单号" />
  17. </view>
  18. <view class="value">{{ item.order_no }}</view>
  19. </view>
  20. <view class="_list_item">
  21. <view class="label">
  22. <trans _t="取款金额" />
  23. </view>
  24. <view class="money"
  25. ><text
  26. >{{ symbol.symbol }}{{ Moneyhtml(item.money) }}</text
  27. ></view
  28. >
  29. </view>
  30. <view class="_list_item" v-if="item.status == '未通过'">
  31. <view class="label">
  32. <trans _t="未通过原因" />
  33. </view>
  34. <view class="money">{{ item.reason }}</view>
  35. </view>
  36. <view class="indate">{{ useGlobal().$format(item.indate) }}</view>
  37. </view>
  38. </template>
  39. </List>
  40. </view>
  41. </view>
  42. </Theme>
  43. </template>
  44. <script setup>
  45. import Navbar from "@/components/navbar";
  46. import navMenu from "@/components/nav_menu";
  47. import List from "@/components/list";
  48. import { onMounted, ref, nextTick, computed } from "vue";
  49. import { useSystemStore } from "@/store";
  50. import { onReachBottom } from "@dcloudio/uni-app";
  51. import { t } from "@/locale";
  52. import { useGlobal, Moneyhtml } from "@/utils";
  53. const useSystem = useSystemStore();
  54. const listRef = ref(null);
  55. const currency = computed(() => useSystem.getCurrency);
  56. const statusText = (status) => {
  57. switch (status) {
  58. case "汇款中":
  59. return t("汇款中");
  60. break;
  61. case "已汇款":
  62. return t("已汇款");
  63. break;
  64. case "未通过":
  65. return t("未通过");
  66. break;
  67. default:
  68. return status;
  69. break;
  70. }
  71. };
  72. onMounted(() => {
  73. nextTick(() => {
  74. listRef.value && listRef.value.getData();
  75. });
  76. });
  77. onReachBottom(() => {
  78. nextTick(() => {
  79. listRef.value && listRef.value.scrolltolower();
  80. });
  81. });
  82. </script>
  83. <style lang="less" scoped>
  84. @import url("@/style.less");
  85. .wrap {
  86. min-height: 100vh;
  87. background-color: var(--bg);
  88. .content {
  89. padding: 0 24rpx;
  90. ._list {
  91. margin-top: 16rpx;
  92. border-radius: 16rpx;
  93. background-color: var(--light);
  94. padding: 16rpx;
  95. border-bottom: var(--bor);
  96. .size(28rpx);
  97. .status {
  98. .flex_position(flex-end);
  99. line-height: 50rpx;
  100. }
  101. &_item {
  102. .flex_position(space-between);
  103. line-height: 50rpx;
  104. .money {
  105. .size(24rpx);
  106. text {
  107. .size(32rpx);
  108. margin-left: 8rpx;
  109. }
  110. }
  111. }
  112. .indate {
  113. .flex_position(flex-end);
  114. color: var(--text-01);
  115. .size(24rpx);
  116. }
  117. }
  118. }
  119. }
  120. </style>