|
@@ -1,34 +1,30 @@
|
|
|
-<route lang="yaml">
|
|
|
-layout: back
|
|
|
-style:
|
|
|
- navigationStyle: custom
|
|
|
+<route lang="json">
|
|
|
+{
|
|
|
+ "style": {
|
|
|
+ "navigationStyle": "custom"
|
|
|
+ }
|
|
|
+}
|
|
|
</route>
|
|
|
<script setup lang="ts">
|
|
|
import MomentItem from '@/components/moment-item.vue'
|
|
|
import { getByDictType, getCircles } from '../../../core/libs/requests'
|
|
|
import { useUserStore } from '../../../store'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
+import { NetImages } from '../../../core/libs/net-images'
|
|
|
+import PageHelper from '@/components/page-helper.vue'
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
const { userInfo } = storeToRefs(userStore)
|
|
|
+const id = ref()
|
|
|
const tab = ref('2')
|
|
|
const { data: circleTypes, run: getCircleType } = useRequest(() =>
|
|
|
getByDictType('member_circle_type'),
|
|
|
)
|
|
|
const circlesData = ref({ list: [] })
|
|
|
-// const { data: circlesData, run } = useRequest(
|
|
|
-// () =>
|
|
|
-// getCircles({
|
|
|
-// circleType: tab.value,
|
|
|
-// // stylistName: userInfo.value.nickname,
|
|
|
-// stylistId: userInfo.value.userId,
|
|
|
-// }),
|
|
|
-// { initialData: { list: [] } },
|
|
|
-// )
|
|
|
const setCirclesData = async (circleType) => {
|
|
|
const { data } = await getCircles({
|
|
|
circleType,
|
|
|
- stylistId: userInfo.value.userId,
|
|
|
+ stylistId: id.value,
|
|
|
})
|
|
|
circlesData.value = data
|
|
|
}
|
|
@@ -42,23 +38,22 @@ const handleTabsChange = async ({ name }: any) => {
|
|
|
await setCirclesData(name)
|
|
|
}
|
|
|
}
|
|
|
-onMounted(async () => {
|
|
|
- // await getCircleType()
|
|
|
+onMounted(async () => {})
|
|
|
+onLoad(async (query: { id: string }) => {
|
|
|
+ id.value = query.id
|
|
|
await setCirclesData(tab.value)
|
|
|
console.log(circleTypes.value)
|
|
|
-
|
|
|
- // await run()
|
|
|
})
|
|
|
defineExpose({
|
|
|
navBarFixed: false,
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
- <div class="">
|
|
|
+ <div class="flex-grow flex flex-col">
|
|
|
<div class="relative">
|
|
|
<wd-img
|
|
|
width="100%"
|
|
|
- :src="'https://via.placeholder.com/375x329'"
|
|
|
+ :src="NetImages.DesigerHomepageDefaultBg"
|
|
|
mode="widthFix"
|
|
|
custom-class="aspect-[1.14/1]"
|
|
|
/>
|
|
@@ -90,19 +85,28 @@ defineExpose({
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="bg-white rounded-t-2xl relative bottom-4">
|
|
|
+ <div class="flex-grow flex flex-col bg-white rounded-t-2xl relative bottom-4">
|
|
|
<wd-tabs v-model="tab" @change="handleTabsChange">
|
|
|
<template v-for="({ label, value }, index) in tabs" :key="index">
|
|
|
<wd-tab :title="label" :name="value"></wd-tab>
|
|
|
</template>
|
|
|
</wd-tabs>
|
|
|
- <div class="p-3.5 flex flex-col bg-[#f6f6f6] gap-3.5">
|
|
|
- <template v-for="it of circlesData.list" :key="it.id">
|
|
|
- <view class="">
|
|
|
- <MomentItem :options="it"></MomentItem>
|
|
|
- </view>
|
|
|
+ <PageHelper
|
|
|
+ class="flex-grow flex flex-col bg-[#f6f6f6]"
|
|
|
+ custom-class=""
|
|
|
+ :request="getCircles"
|
|
|
+ :query="{ circleType: tab, stylistId: id }"
|
|
|
+ >
|
|
|
+ <template #default="{ source }">
|
|
|
+ <div class="p-3.5 flex flex-col bg-[#f6f6f6] gap-3.5">
|
|
|
+ <template v-for="it of source.list" :key="it.id">
|
|
|
+ <view class="">
|
|
|
+ <MomentItem :options="it"></MomentItem>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- </div>
|
|
|
+ </PageHelper>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|