recharge_list.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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="/pay/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.payid }}</view>
  19. </view>
  20. <view class="_list_item">
  21. <view class="label">
  22. <trans _t="充值金额" />
  23. </view>
  24. <view class="money">{{ symbol.symbol }}<text>{{ Moneyhtml(item.money) }}</text></view>
  25. </view>
  26. <view class="indate">{{ useGlobal().$format(item.indate) }}</view>
  27. </view>
  28. </template>
  29. </List>
  30. </view>
  31. </view>
  32. </Theme>
  33. </template>
  34. <script setup>
  35. import Navbar from "@/components/navbar";
  36. import navMenu from "@/components/nav_menu";
  37. import List from "@/components/list";
  38. import { onMounted, ref, nextTick, computed } from "vue";
  39. import { useSystemStore } from "@/store";
  40. import { onReachBottom } from "@dcloudio/uni-app";
  41. import { t } from "@/locale"
  42. import { useGlobal, Moneyhtml } from "@/utils"
  43. const useSystem = useSystemStore();
  44. const symbol = computed(() => useSystem.getSymbol);
  45. const listRef = ref(null);
  46. const currency = computed(() => useSystem.getCurrency);
  47. const statusText = (status) => {
  48. switch (status) {
  49. case '待审核':
  50. return t('待审核')
  51. break;
  52. case '已完成':
  53. return t('已完成')
  54. break;
  55. default:
  56. return status
  57. break;
  58. }
  59. }
  60. onMounted(() => {
  61. nextTick(() => {
  62. listRef.value && listRef.value.getData();
  63. })
  64. })
  65. onReachBottom(() => {
  66. nextTick(() => {
  67. listRef.value && listRef.value.scrolltolower();
  68. })
  69. })
  70. </script>
  71. <style lang="less" scoped>
  72. @import url('@/style.less');
  73. .wrap {
  74. min-height: 100vh;
  75. background-color: var(--bg);
  76. .content {
  77. padding: 0 24rpx;
  78. ._list {
  79. margin-top: 16rpx;
  80. border-radius: 16rpx;
  81. background-color: var(--light);
  82. padding: 16rpx;
  83. .size(28rpx);
  84. .status {
  85. .flex_position(flex-end);
  86. line-height: 50rpx;
  87. }
  88. &_item {
  89. .flex_position(space-between);
  90. line-height: 50rpx;
  91. .money {
  92. .size(32rpx);
  93. text {
  94. margin-left: 8rpx;
  95. }
  96. }
  97. }
  98. .indate {
  99. .flex_position(flex-end);
  100. color: var(--text-01);
  101. .size(24rpx);
  102. }
  103. }
  104. }
  105. }
  106. </style>