|
@@ -14,6 +14,7 @@ import {
|
|
getDesignerInfo,
|
|
getDesignerInfo,
|
|
getUserInfoById,
|
|
getUserInfoById,
|
|
updateDesignerInfo,
|
|
updateDesignerInfo,
|
|
|
|
+ shareCircle,
|
|
} from '../../../core/libs/requests'
|
|
} from '../../../core/libs/requests'
|
|
import { useUserStore } from '../../../store'
|
|
import { useUserStore } from '../../../store'
|
|
import { storeToRefs } from 'pinia'
|
|
import { storeToRefs } from 'pinia'
|
|
@@ -27,6 +28,7 @@ import { requestToast } from '../../../core/utils/common'
|
|
import { ComponentExposed } from 'vue-component-type-helpers'
|
|
import { ComponentExposed } from 'vue-component-type-helpers'
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
import wechatChannels from '@designer-hub/assets/src/libs/assets/wechatChannels'
|
|
import wechatChannels from '@designer-hub/assets/src/libs/assets/wechatChannels'
|
|
|
|
+import { handleUpvoteClick } from '@/core/libs/actions'
|
|
|
|
|
|
const { alert, confirm } = useMessage()
|
|
const { alert, confirm } = useMessage()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -83,6 +85,14 @@ const handleMomentDelete = async (id) => {
|
|
},
|
|
},
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+const handleLike = async (options) => {
|
|
|
|
+ await handleUpvoteClick({
|
|
|
|
+ ...options,
|
|
|
|
+ userId: userInfo.value.userId,
|
|
|
|
+ userName: userInfo.value.nickname,
|
|
|
|
+ })
|
|
|
|
+ pageHelperRef.value?.refresh()
|
|
|
|
+}
|
|
const handle2Video = () => {
|
|
const handle2Video = () => {
|
|
try {
|
|
try {
|
|
uni.openChannelsUserProfile({ finderUserName: designerInfo.value?.videoNumber })
|
|
uni.openChannelsUserProfile({ finderUserName: designerInfo.value?.videoNumber })
|
|
@@ -138,10 +148,26 @@ onUnload(async () => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-onShareAppMessage(() => ({
|
|
|
|
- title: `${userInfo.value.nickname}: “${designerInfo.value.designDesc}”`,
|
|
|
|
- imageUrl: designerInfo.value?.sharePageUrl,
|
|
|
|
-}))
|
|
|
|
|
|
+// onShareAppMessage(() => ({
|
|
|
|
+// title: `${userInfo.value.nickname}: “${designerInfo.value.designDesc}”`,
|
|
|
|
+// imageUrl: designerInfo.value?.sharePageUrl,
|
|
|
|
+// path: `/pages/mine/homepage/index?id=${id.value}`,
|
|
|
|
+// }))
|
|
|
|
+onShareAppMessage(async ({ from, target }) => {
|
|
|
|
+ const res: Page.CustomShareContent = {}
|
|
|
|
+ if (from === 'button') {
|
|
|
|
+ await shareCircle(target.id)
|
|
|
|
+ res.path = `/pages/home/moment/index?id=${target.id}`
|
|
|
|
+ res.imageUrl = target.dataset.options.bannerUrls[0]
|
|
|
|
+ res.title = `${target.dataset.options.stylistName}: ${target.dataset.options.circleDesc}`
|
|
|
|
+ }
|
|
|
|
+ if (from === 'menu') {
|
|
|
|
+ res.title = `${userInfo.value.nickname}: “${designerInfo.value.designDesc}”`
|
|
|
|
+ res.imageUrl = designerInfo.value?.sharePageUrl
|
|
|
|
+ res.path = `/pages/mine/homepage/index?id=${id.value}`
|
|
|
|
+ }
|
|
|
|
+ return res
|
|
|
|
+})
|
|
onShareTimeline(() => ({}))
|
|
onShareTimeline(() => ({}))
|
|
defineExpose({
|
|
defineExpose({
|
|
navBarFixed: false,
|
|
navBarFixed: false,
|
|
@@ -222,7 +248,10 @@ defineExpose({
|
|
<div class="w-[37.01px] h-[37.01px] bg-[#fa9d3b] rounded-lg">
|
|
<div class="w-[37.01px] h-[37.01px] bg-[#fa9d3b] rounded-lg">
|
|
<wd-img width="100%" height="100%" :src="wechatChannels"></wd-img>
|
|
<wd-img width="100%" height="100%" :src="wechatChannels"></wd-img>
|
|
</div>
|
|
</div>
|
|
- <div v-if="(designerInfo?.videoNumber ?? '') !== ''" @click.stop="handleUnbundle">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-if="isOwn && (designerInfo?.videoNumber ?? '') !== ''"
|
|
|
|
+ @click.stop="handleUnbundle"
|
|
|
|
+ >
|
|
<div
|
|
<div
|
|
class="text-[#da7e1e] text-[9px] font-normal font-['PingFang_SC'] leading-normal flex items-center"
|
|
class="text-[#da7e1e] text-[9px] font-normal font-['PingFang_SC'] leading-normal flex items-center"
|
|
>
|
|
>
|
|
@@ -284,6 +313,7 @@ defineExpose({
|
|
:options="it"
|
|
:options="it"
|
|
:is-own="userInfo.userId === it.stylistId"
|
|
:is-own="userInfo.userId === it.stylistId"
|
|
@delete="handleMomentDelete"
|
|
@delete="handleMomentDelete"
|
|
|
|
+ @like="handleLike"
|
|
></MomentItem>
|
|
></MomentItem>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|