|
@@ -38,6 +38,7 @@ import { useShare } from '@/composables/share'
|
|
import { useMemberLevelsStore } from '../../../store/member-levles'
|
|
import { useMemberLevelsStore } from '../../../store/member-levles'
|
|
import { getByDictType } from '@/core/libs/requests'
|
|
import { getByDictType } from '@/core/libs/requests'
|
|
import { DictType } from '@/core/libs/models'
|
|
import { DictType } from '@/core/libs/models'
|
|
|
|
+import { title } from 'radash'
|
|
|
|
|
|
const memberLevelsStore = useMemberLevelsStore()
|
|
const memberLevelsStore = useMemberLevelsStore()
|
|
const { getMemberAvatarFrame } = memberLevelsStore
|
|
const { getMemberAvatarFrame } = memberLevelsStore
|
|
@@ -89,6 +90,32 @@ const skills = computed(() =>
|
|
},
|
|
},
|
|
].filter(({ show }) => show),
|
|
].filter(({ show }) => show),
|
|
)
|
|
)
|
|
|
|
+const shareContent = computed(() => {
|
|
|
|
+ return {
|
|
|
|
+ title: designerInfo.value?.homePageName
|
|
|
|
+ ? designerInfo.value?.homePageName
|
|
|
|
+ : memberInfo.value.nickname,
|
|
|
|
+ imageUrl: designerInfo.value?.sharePageUrl,
|
|
|
|
+ path: `/pages-sub/mine/homepage/index?id=${id.value}&isShared=true`,
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+const shareMessage = () => {
|
|
|
|
+ const promise = new Promise((resolve, reject) => {
|
|
|
|
+ if (userInfo.value?.level?.level < 2) {
|
|
|
|
+ uni.showToast({ title: '普通会员无法分享', icon: 'none' })
|
|
|
|
+ reject()
|
|
|
|
+ } else {
|
|
|
|
+ const res: Page.CustomShareContent = {}
|
|
|
|
+ res.title = designerInfo.value?.homePageName
|
|
|
|
+ ? designerInfo.value?.homePageName
|
|
|
|
+ : memberInfo.value.nickname
|
|
|
|
+ res.imageUrl = designerInfo.value.sharePageUrl
|
|
|
|
+ res.path = `/pages-sub/mine/homepage/index?id=${id.value}&isShared=true`
|
|
|
|
+ resolve(res)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return { promise }
|
|
|
|
+}
|
|
const query = computed(() => ({
|
|
const query = computed(() => ({
|
|
circleType: tab.value,
|
|
circleType: tab.value,
|
|
stylistId: id.value,
|
|
stylistId: id.value,
|
|
@@ -206,24 +233,6 @@ onUnload(async () => {
|
|
duration: viewDuration.value.toString(),
|
|
duration: viewDuration.value.toString(),
|
|
})
|
|
})
|
|
})
|
|
})
|
|
-const shareMessage = () => {
|
|
|
|
- const promise = new Promise((resolve, reject) => {
|
|
|
|
- if (userInfo.value?.level?.level < 2) {
|
|
|
|
- uni.showToast({ title: '普通会员无法分享', icon: 'none' })
|
|
|
|
- reject()
|
|
|
|
- } else {
|
|
|
|
- const res: Page.CustomShareContent = {}
|
|
|
|
- res.title = designerInfo.value?.homePageName
|
|
|
|
- ? designerInfo.value?.homePageName
|
|
|
|
- : memberInfo.value.nickname
|
|
|
|
- res.imageUrl = designerInfo.value.sharePageUrl
|
|
|
|
- res.path = `/pages-sub/mine/homepage/index?id=${id.value}&isShared=true`
|
|
|
|
- shareCircle(shareOptions.value?.stylistId)
|
|
|
|
- resolve(res)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- return { promise }
|
|
|
|
-}
|
|
|
|
onShareTimeline(() => ({
|
|
onShareTimeline(() => ({
|
|
title: designerInfo.value?.homePageName
|
|
title: designerInfo.value?.homePageName
|
|
? designerInfo.value?.homePageName
|
|
? designerInfo.value?.homePageName
|
|
@@ -463,19 +472,18 @@ defineExpose({
|
|
class="p-0 after:b-none"
|
|
class="p-0 after:b-none"
|
|
block
|
|
block
|
|
:round="false"
|
|
:round="false"
|
|
|
|
+ data-type="homepage"
|
|
|
|
+ :data-share-content="shareContent"
|
|
:open-type="features.shareMoment ? 'share' : ''"
|
|
:open-type="features.shareMoment ? 'share' : ''"
|
|
|
|
+ :data-options="{ userId: userInfo.userId, homepageId: id }"
|
|
|
|
+ :data-level="userInfo.level"
|
|
@click="clickByPermission('share', () => {})"
|
|
@click="clickByPermission('share', () => {})"
|
|
>
|
|
>
|
|
<wd-button block :round="false">分享</wd-button>
|
|
<wd-button block :round="false">分享</wd-button>
|
|
</button>
|
|
</button>
|
|
<template v-else>
|
|
<template v-else>
|
|
<!-- 1-->
|
|
<!-- 1-->
|
|
- <wd-button
|
|
|
|
- block
|
|
|
|
- :round="false"
|
|
|
|
- open-type="share"
|
|
|
|
- @click="clickByPermission('share', () => {})"
|
|
|
|
- >
|
|
|
|
|
|
+ <wd-button block :round="false" @click="clickByPermission('share', () => {})">
|
|
分享
|
|
分享
|
|
</wd-button>
|
|
</wd-button>
|
|
</template>
|
|
</template>
|