|
@@ -157,13 +157,19 @@ onUnload(async () => {
|
|
|
onShareAppMessage(async ({ from, target }) => {
|
|
|
const res: Page.CustomShareContent = {}
|
|
|
if (from === 'button') {
|
|
|
- if (!features.value.shareMoment) {
|
|
|
- return handleShareClick()
|
|
|
+ if (target.dataset.type === 'homepage') {
|
|
|
+ res.title = `${userInfo.value.nickname}: “${designerInfo.value.designDesc}”`
|
|
|
+ res.imageUrl = designerInfo.value?.sharePageUrl
|
|
|
+ res.path = `/pages/mine/homepage/index?id=${id.value}&isShared=true`
|
|
|
+ } else {
|
|
|
+ if (!features.value.shareMoment) {
|
|
|
+ return handleShareClick()
|
|
|
+ }
|
|
|
+ await shareCircle(target.dataset.options.id)
|
|
|
+ res.path = `/pages/home/moment/index?id=${target.dataset.options.id}&isShared=true`
|
|
|
+ res.imageUrl = target.dataset.options.bannerUrls[0]
|
|
|
+ res.title = `${target.dataset.options.stylistName}: ${target.dataset.options.circleDesc}`
|
|
|
}
|
|
|
- await shareCircle(target.id)
|
|
|
- res.path = `/pages/home/moment/index?id=${target.id}&isShared=true`
|
|
|
- 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}”`
|
|
@@ -334,7 +340,7 @@ defineExpose({
|
|
|
</wd-button>
|
|
|
</div>
|
|
|
<div class="flex-1" v-if="userInfo.userId === Number(id)">
|
|
|
- <wd-button block :round="false" open-type="share">分享</wd-button>
|
|
|
+ <wd-button block :round="false" open-type="share" data-type="homepage">分享</wd-button>
|
|
|
</div>
|
|
|
<div class="flex-1" v-if="userInfo.userId !== Number(id)">
|
|
|
<wd-button
|