account.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <Theme>
  3. <view class="wrap">
  4. <Navbar title="账单" border fixed />
  5. <view class="content">
  6. <List url="/users/account/lists" ref="listRef">
  7. <template #item="{ item }">
  8. <view class="list">
  9. <view class="list_top">
  10. <view class="title">{{ item.title }}</view>
  11. <view class="money"
  12. >{{ symbol.symbol }}&nbsp;{{ Moneyhtml(item.setup) }}</view
  13. >
  14. </view>
  15. <view class="date">{{ useGlobal().$format(item.indate) }}</view>
  16. </view>
  17. </template>
  18. </List>
  19. </view>
  20. </view>
  21. </Theme>
  22. </template>
  23. <script setup>
  24. import Navbar from "@/components/navbar";
  25. import List from "@/components/list";
  26. import { ref, computed, onMounted, nextTick } from "vue";
  27. import { useGlobal, Moneyhtml } from "@/utils";
  28. import { onReachBottom } from "@dcloudio/uni-app";
  29. import { useSystemStore } from "@/store";
  30. const useSystem = useSystemStore();
  31. const listRef = ref(null);
  32. const symbol = computed(() => useSystem.getSymbol);
  33. onMounted(() => {
  34. nextTick(() => {
  35. listRef.value && listRef.value.getData();
  36. });
  37. });
  38. onReachBottom(() => {
  39. nextTick(() => {
  40. listRef.value && listRef.value.scrolltolower();
  41. });
  42. });
  43. </script>
  44. <style lang="less" scoped>
  45. @import url("@/style.less");
  46. .wrap {
  47. min-height: 100vh;
  48. background-color: var(--bg);
  49. .content {
  50. padding: 0 24rpx;
  51. .list {
  52. padding: 24rpx;
  53. background-color: var(--light);
  54. margin-top: 24rpx;
  55. border-radius: 12rpx;
  56. border-bottom: var(--bor);
  57. &_top {
  58. .flex_position(space-between);
  59. .size(28rpx);
  60. .title {
  61. color: var(--text);
  62. }
  63. .money {
  64. font-weight: 700;
  65. color: var(--danger);
  66. }
  67. }
  68. .date {
  69. color: var(--text-02);
  70. .size(24rpx);
  71. text-align: right;
  72. margin-top: 8rpx;
  73. }
  74. }
  75. }
  76. }
  77. </style>