|
@@ -49,16 +49,17 @@ const { getOptionLabel } = dictStore
|
|
|
const id = ref()
|
|
|
const current = ref(0)
|
|
|
const isShared = ref(false)
|
|
|
+const circleType = ref()
|
|
|
const commentRef = ref<InstanceType<typeof WdInput>>()
|
|
|
const commentItemRef = ref<InstanceType<typeof CommentItem>[]>()
|
|
|
const instance = getCurrentInstance()
|
|
|
const momentVideoRef = ref<ComponentExposed<typeof MomentVideo>[]>()
|
|
|
const focus = ref(false)
|
|
|
const hot = ref(true)
|
|
|
-const active = ref('hot');
|
|
|
+const active = ref('hot')
|
|
|
const { data, run } = useRequest(() => getCircle(id.value), { initialData: {} })
|
|
|
const { data: reviews, run: runGetReviews } = useRequest(
|
|
|
- () => getCircleReviews({ circleId: id.value,hot:hot.value}),
|
|
|
+ () => getCircleReviews({ circleId: id.value, hot: hot.value }),
|
|
|
{
|
|
|
initialData: {
|
|
|
list: [],
|
|
@@ -149,12 +150,12 @@ const handleDelete = async (index?: number) => {
|
|
|
await runGetReviews()
|
|
|
}
|
|
|
}
|
|
|
-const dictLabelChange = (dictArr:any, value:any) => {
|
|
|
- for(let i in dictArr){
|
|
|
- if(dictArr[i].value === value){
|
|
|
- return dictArr[i].label
|
|
|
- }
|
|
|
- }
|
|
|
+const dictLabelChange = (dictArr: any, value: any) => {
|
|
|
+ for (let i in dictArr) {
|
|
|
+ if (dictArr[i].value === value) {
|
|
|
+ return dictArr[i].label
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
const handleUpvote = async (index?: number) => {
|
|
|
if (index !== undefined) {
|
|
@@ -163,7 +164,9 @@ const handleUpvote = async (index?: number) => {
|
|
|
await runGetReviews()
|
|
|
}
|
|
|
const toDesignerHomepage = () => {
|
|
|
- console.log(`/pages-sub/mine/homepage/index?id=${data.value?.stylistId}${isShared.value ? '&isShared=true' : ''}`)
|
|
|
+ console.log(
|
|
|
+ `/pages-sub/mine/homepage/index?id=${data.value?.stylistId}${isShared.value ? '&isShared=true' : ''}`,
|
|
|
+ )
|
|
|
if (['1', '2'].includes(String(data.value?.circleType))) {
|
|
|
router.push(
|
|
|
`/pages-sub/mine/homepage/index?id=${data.value?.stylistId}${isShared.value ? '&isShared=true' : ''}`,
|
|
@@ -173,16 +176,17 @@ const toDesignerHomepage = () => {
|
|
|
onMounted(async () => {})
|
|
|
const dictMemberDesignStyle = ref<[]>()
|
|
|
const dictCircleSpaceType = ref<[]>()
|
|
|
-onLoad(async (query?: { id: string; isShared?: boolean }) => {
|
|
|
+onLoad(async (query?: { id: string; isShared?: boolean; circleType?: string }) => {
|
|
|
id.value = query?.id
|
|
|
isShared.value = query?.isShared
|
|
|
+ circleType.value = query?.circleType
|
|
|
await run()
|
|
|
await setSwiperStyle()
|
|
|
await runGetReviews()
|
|
|
await setCircleUpvotes()
|
|
|
- let value1 = await getByDictType(DictType.circleSpaceType);
|
|
|
+ let value1 = await getByDictType(DictType.circleSpaceType)
|
|
|
dictCircleSpaceType.value = value1.data
|
|
|
- let value2 = await getByDictType(DictType.memberDesignStyle);
|
|
|
+ let value2 = await getByDictType(DictType.memberDesignStyle)
|
|
|
dictMemberDesignStyle.value = value2.data
|
|
|
})
|
|
|
// onShareAppMessage(async () => {
|
|
@@ -191,12 +195,11 @@ onLoad(async (query?: { id: string; isShared?: boolean }) => {
|
|
|
// })
|
|
|
onShareAppMessage(shareAppMessage)
|
|
|
|
|
|
-
|
|
|
-const handleClick = async (value:boolean) => {
|
|
|
- active.value = value ? 'hot' : 'time';
|
|
|
+const handleClick = async (value: boolean) => {
|
|
|
+ active.value = value ? 'hot' : 'time'
|
|
|
hot.value = value
|
|
|
await runGetReviews()
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
<template>
|
|
|
<view class="bg-white flex-grow">
|
|
@@ -284,13 +287,13 @@ const handleClick = async (value:boolean) => {
|
|
|
<div class="text-black/40 text-sm font-normal font-['PingFang_SC']">
|
|
|
风格:{{ getOptionLabel(DictType.memberDesignStyle, data.designStyle) }}
|
|
|
</div> -->
|
|
|
- <div class="font-normal font-['PingFang_SC']">
|
|
|
- 类别:{{ dictLabelChange(dictCircleSpaceType, data?.spaceType) }}
|
|
|
- </div>
|
|
|
- |
|
|
|
- <div class="text-black/40 text-sm font-normal font-['PingFang_SC']">
|
|
|
- 风格:{{ dictLabelChange(dictMemberDesignStyle, data.designStyle) }}
|
|
|
- </div>
|
|
|
+ <div class="font-normal font-['PingFang_SC']">
|
|
|
+ 类别:{{ dictLabelChange(dictCircleSpaceType, data?.spaceType) }}
|
|
|
+ </div>
|
|
|
+ |
|
|
|
+ <div class="text-black/40 text-sm font-normal font-['PingFang_SC']">
|
|
|
+ 风格:{{ dictLabelChange(dictMemberDesignStyle, data.designStyle) }}
|
|
|
+ </div>
|
|
|
|
|
|
|
<div class="text-black/40 text-sm font-normal font-['PingFang_SC']">
|
|
|
面积:{{ data.spaceExtent }}
|
|
@@ -353,21 +356,25 @@ const handleClick = async (value:boolean) => {
|
|
|
<SectionHeading v-if="!isShared" :title="`评论`" size="base">
|
|
|
<template #append>
|
|
|
<view v-if="reviews?.list" class="flex">
|
|
|
- <div @click="handleClick(true)" :class="{
|
|
|
- 'text-black/90': active === 'hot',
|
|
|
- 'text-black/40': active !== 'hot'
|
|
|
- }" class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">
|
|
|
+ <div
|
|
|
+ @click="handleClick(true)"
|
|
|
+ :class="{
|
|
|
+ 'text-black/90': active === 'hot',
|
|
|
+ 'text-black/40': active !== 'hot',
|
|
|
+ }"
|
|
|
+ class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10.18px]"
|
|
|
+ >
|
|
|
按热度
|
|
|
</div>
|
|
|
+ <div class="text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">|</div>
|
|
|
<div
|
|
|
+ @click="handleClick(false)"
|
|
|
+ :class="{
|
|
|
+ 'text-black/90': active === 'time',
|
|
|
+ 'text-black/40': active !== 'time',
|
|
|
+ }"
|
|
|
class="text-xs font-normal font-['PingFang_SC'] leading-[10.18px]"
|
|
|
>
|
|
|
- |
|
|
|
- </div>
|
|
|
- <div @click="handleClick(false)" :class="{
|
|
|
- 'text-black/90': active === 'time',
|
|
|
- 'text-black/40': active !== 'time'
|
|
|
- }" class="text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">
|
|
|
按时间
|
|
|
</div>
|
|
|
</view>
|
|
@@ -498,7 +505,7 @@ const handleClick = async (value:boolean) => {
|
|
|
</view>
|
|
|
</div>
|
|
|
</BottomAppBar>
|
|
|
- <BottomAppBar v-if="isShared" fixed placeholder>
|
|
|
+ <BottomAppBar v-if="isShared && circleType != 3" fixed placeholder>
|
|
|
<div>
|
|
|
<wd-button block :round="false" @click="toDesignerHomepage">查看设计师主页</wd-button>
|
|
|
</div>
|