index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <route lang="json">
  2. {
  3. "style": {
  4. "navigationStyle": "custom"
  5. }
  6. }
  7. </route>
  8. <script setup lang="ts">
  9. import MomentItem from '@/components/moment-item.vue'
  10. import { getByDictType, getCircles } from '../../../../core/libs/requests'
  11. import { useUserStore } from '../../../../store'
  12. import { storeToRefs } from 'pinia'
  13. import { NetImages } from '../../../../core/libs/net-images'
  14. import PageHelper from '@/components/page-helper.vue'
  15. import BottomAppBar from '@/components/bottom-app-bar.vue'
  16. import { useRouter } from '../../../../core/utils/router'
  17. import NavbarEvo from '@/components/navbar-evo.vue'
  18. const router = useRouter()
  19. const userStore = useUserStore()
  20. const { userInfo } = storeToRefs(userStore)
  21. const id = ref()
  22. const tab = ref('2')
  23. const { data: circleTypes, run: getCircleType } = useRequest(() =>
  24. getByDictType('member_circle_type'),
  25. )
  26. const circlesData = ref({ list: [] })
  27. const setCirclesData = async (circleType) => {
  28. const { data } = await getCircles({
  29. circleType,
  30. stylistId: id.value,
  31. })
  32. circlesData.value = data
  33. }
  34. const tabs = ref([
  35. { label: '案例', value: '2' },
  36. { label: '动态', value: '1' },
  37. { label: '视频', value: '0' },
  38. ])
  39. const handleTabsChange = async ({ name }: any) => {
  40. if (['1', '2'].includes(name)) {
  41. await setCirclesData(name)
  42. }
  43. }
  44. onMounted(async () => {})
  45. onLoad(async (query: { id: string }) => {
  46. if (query.id) {
  47. id.value = query.id
  48. } else {
  49. id.value = userInfo.value.userId
  50. }
  51. await setCirclesData(tab.value)
  52. console.log(circleTypes.value)
  53. })
  54. onShareAppMessage(() => ({ title: `${userInfo.value.nickname}` }))
  55. defineExpose({
  56. navBarFixed: false,
  57. })
  58. </script>
  59. <template>
  60. <div class="flex-grow flex flex-col px-3.5">
  61. <NavbarEvo transparent dark></NavbarEvo>
  62. <div class="relative aspect-[0.79/1] mx--3.5">
  63. <div class="absolute top-0 left-0 w-full h-full">
  64. <wd-img
  65. width="100%"
  66. height="100%"
  67. :src="NetImages.ConsultDefaultBg"
  68. mode="widthFix"
  69. custom-class="aspect-[0.71/1]"
  70. />
  71. </div>
  72. </div>
  73. <div class="flex-grow flex flex-col bg-white rounded-t-2xl relative px-4">
  74. <div class="mt-13 flex gap-3 border-b-1 border-b-solid border-b-[#e1e1e1] pb-3">
  75. <div class="px-4 py-0.5 bg-[#2b2725] rounded justify-center items-center gap-2.5 flex">
  76. <div
  77. class="text-center text-white text-base font-normal font-['PingFang_SC'] tracking-wide"
  78. >
  79. 姓名
  80. </div>
  81. </div>
  82. <div class="flex-1 flex items-center">
  83. <wd-input placeholder="请填写您的真实姓名" no-border></wd-input>
  84. </div>
  85. </div>
  86. <div class="mt-13 flex gap-3 border-b-1 border-b-solid border-b-[#e1e1e1] pb-3">
  87. <div class="px-4 py-0.5 bg-[#2b2725] rounded justify-center items-center gap-2.5 flex">
  88. <div
  89. class="text-center text-white text-base font-normal font-['PingFang_SC'] tracking-wide"
  90. >
  91. 电话
  92. </div>
  93. </div>
  94. <div class="flex-1 flex items-center">
  95. <wd-input placeholder="请输入您的手机号" no-border></wd-input>
  96. </div>
  97. </div>
  98. </div>
  99. <BottomAppBar fixed placeholder>
  100. <div class="flex gap-7.5">
  101. <div class="flex-1">
  102. <wd-button block :round="false">提交预约</wd-button>
  103. </div>
  104. </div>
  105. </BottomAppBar>
  106. </div>
  107. </template>