feat: share

This commit is contained in:
chashaobao
2025-08-26 22:55:19 +08:00
parent 2cb532c3d7
commit 670a389f12
3 changed files with 16 additions and 9 deletions

View File

@ -20,6 +20,7 @@ interface ShareAppProps {
inviteCode?: string;
title?: string;
path?: PageUrl;
imageUrl?: string;
params?: Record<string, BL.Anything>;
}
@ -28,6 +29,7 @@ export const getCommonShareMessage = ({
inviteCode,
title,
path,
imageUrl: _imageUrl,
params = {},
}: ShareAppProps = {}): ShareAppMessageReturn => {
const inviteParams = inviteCode ? { c: inviteCode } : undefined;
@ -36,6 +38,6 @@ export const getCommonShareMessage = ({
return {
title: title || `昨天新增了${getRandomCount()}条主播通告,宝子快来看看`,
path: sharePath,
imageUrl: useCapture ? undefined : imageUrl,
imageUrl: useCapture ? undefined : _imageUrl || imageUrl,
};
};