MemberDetails.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="member-details">
  3. <div class="gap10 title">
  4. <div class="line_vertical"></div>
  5. <div class="">{{ $t('personalCenter.openMembershipDetails') }}</div>
  6. </div>
  7. <ul class="member-details-list">
  8. <li v-for="(item, index) in list" :key="index">
  9. <div class="member-details-list-t flex-center-between">
  10. <div class="">{{ $t('personalCenter.goumaishichang') }}:{{ item.orderNum }}个月 {{ item.description }}</div>
  11. <div class="">{{ item.amount }}{{ $t('common.baomibi') }}</div>
  12. </div>
  13. <div class="member-details-list-b flex-center-between">
  14. <!-- <div class="">{{ $t('personalCenter.youxiaoqi') }}:2026-01-01至2026-02-01</div> -->
  15. <div class="">{{ $t('personalCenter.zhifushijian') }}:{{ item.createTime }}</div>
  16. </div>
  17. </li>
  18. </ul>
  19. <template v-if="list.length">
  20. <Pagination :total="form.total" :page-size="form.pageSize" :current-page="form.pageNum"
  21. @page-change="handlePageChange" />
  22. </template>
  23. <el-empty v-else :description="$t('common.empty')" />
  24. </div>
  25. </template>
  26. <script setup lang="ts">
  27. import Pagination from '@/components/Pagination.vue'
  28. import { ref, onMounted } from 'vue'
  29. import { orderList } from '@/api/my.js'
  30. const form = ref({
  31. pageNum: 1,
  32. pageSize: 10,
  33. total: 0,
  34. orderTypeMenu:2,
  35. orderType:'member_recharge',
  36. isAsc:'desc',
  37. orderByColumn:'orderId'
  38. })
  39. const list = ref([])
  40. const getList = async () => {
  41. let res = await orderList(form.value);
  42. console.log(res);
  43. form.value.total = res.total;
  44. list.value = res.rows
  45. }
  46. const handlePageChange = (page) => {
  47. list.value = []
  48. form.value.pageNum = page;
  49. getList()
  50. }
  51. onMounted(() => {
  52. getList()
  53. })
  54. </script>
  55. <style scoped lang="scss">
  56. .member-details {
  57. padding-bottom: 20px;
  58. .title {
  59. height: 60px;
  60. font-size: 20px;
  61. font-weight: bold;
  62. color: #333333;
  63. }
  64. .member-details-list {
  65. li {
  66. padding: 16px;
  67. margin-bottom: 16px;
  68. background: #F5F7FA;
  69. border-radius: 16px;
  70. &:last-child {
  71. margin-bottom: 0;
  72. }
  73. .member-details-list-t {
  74. margin-bottom: 8px;
  75. div {
  76. font-size: 16px;
  77. &:last-child {
  78. color: #F52929;
  79. }
  80. }
  81. }
  82. .member-details-list-b {
  83. div {
  84. font-size: 14px;
  85. color: #666666;
  86. }
  87. }
  88. }
  89. }
  90. }
  91. </style>