index.vue 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <route lang="json">
  2. { "style": { "navigationStyle": "custom" } }
  3. </route>
  4. <script setup lang="ts">
  5. import PageHelper from '@/components/page-helper.vue'
  6. import Card from '@/components/card.vue'
  7. import { getPoints } from '../../../core/libs/requests'
  8. import { useUserStore } from '../../../store'
  9. import { storeToRefs } from 'pinia'
  10. import dayjs from 'dayjs'
  11. import NavbarEvo from '@/components/navbar-evo.vue'
  12. const userStore = useUserStore()
  13. const { userInfo } = storeToRefs(userStore)
  14. </script>
  15. <template>
  16. <div class="flex-grow">
  17. <NavbarEvo title="积分明细" transparent dark></NavbarEvo>
  18. <div class="relative aspect-[3/1]">
  19. <div class="aspect-[1.69/1] absolute top-0 w-full">
  20. <div class="relative w-full h-full">
  21. <div class="absolute top-0 left-0 right-0">
  22. <wd-img
  23. width="100%"
  24. src="https://image.zhuchaohui.com/zhucaohui/033c6d899ea6ab7b042cc11a93b44f000274b48c5be38874c1f43de93ac90751.png"
  25. mode="widthFix"
  26. custom-class=""
  27. ></wd-img>
  28. </div>
  29. <div class="absolute top-0 left-0 right-0">
  30. <wd-img
  31. width="100%"
  32. src="https://image.zhuchaohui.com/zhucaohui/f3571650a267343e33316f4a6ca02dc423a3ce17ad7504caaca7ff2ac61e2465.png"
  33. mode="widthFix"
  34. ></wd-img>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="relative px-3.5">
  40. <div class="flex items-end px-3.5 mb-5">
  41. <div class="text-white text-sm font-normal font-['PingFang_SC'] leading-relaxed">
  42. 当前积分
  43. </div>
  44. <div>
  45. <span class="text-[#ffefd8] text-4xl font-normal font-['D-DIN_Exp'] leading-9">
  46. {{ userInfo.level?.point }}
  47. </span>
  48. </div>
  49. <div class="flex-1"></div>
  50. <div></div>
  51. <div class="text-[#b6b6b6] text-sm font-normal font-['PingFang_SC'] leading-relaxed">
  52. 2024
  53. </div>
  54. </div>
  55. <Card custom-class="relative">
  56. <PageHelper :request="getPoints" :query="{ stylistId: userInfo.userId, year: 2024 }">
  57. <template #default="{ source }">
  58. <div class="flex flex-col gap-4">
  59. <template v-for="(it, i) in source.list" :key="i">
  60. <div class="flex items-center py-4">
  61. <div class="flex-1 flex flex-col">
  62. <div
  63. class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-relaxed"
  64. >
  65. {{ it.name }}
  66. </div>
  67. <div
  68. class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-relaxed"
  69. >
  70. <!-- 2024/08/10 14:21:54 -->
  71. {{ dayjs(it.createTime).format('YYYY/MM/DD hh:mm:ss') }}
  72. </div>
  73. </div>
  74. <div>
  75. <div
  76. class="text-lg font-normal font-['D-DIN_Exp'] leading-relaxed"
  77. :class="`${it.pointsType === '1' ? 'text-[#ef4343]' : 'text-black'}`"
  78. >
  79. <!-- 8200 -->
  80. {{ { '1': '+', '2': '-' }[it.pointsType] }}
  81. {{ it.points }}
  82. </div>
  83. </div>
  84. </div>
  85. <div class="h-0.25 bg-[#dadada]" v-if="i !== source.list.length - 1"></div>
  86. </template>
  87. </div>
  88. </template>
  89. </PageHelper>
  90. </Card>
  91. </div>
  92. </div>
  93. </template>