feat: 群代发改版

This commit is contained in:
chashaobao
2025-06-27 10:56:44 +08:00
parent 56cf10c768
commit b0dd660dde
18 changed files with 184 additions and 38 deletions

View File

@ -15,15 +15,27 @@ const getRandomCount = () => {
return (seed % 300) + 500;
};
export const getCommonShareMessage = (
useCapture: boolean = true,
inviteCode?: string,
title?: string
): ShareAppMessageReturn => {
console.log('share share message', getJumpUrl(PageUrl.Job, inviteCode ? { c: inviteCode } : undefined));
interface ShareAppProps {
useCapture?: boolean;
inviteCode?: string;
title?: string;
path?: PageUrl;
params?: Record<string, BL.Anything>;
}
export const getCommonShareMessage = ({
useCapture = true,
inviteCode,
title,
path,
params = {},
}: ShareAppProps = {}): ShareAppMessageReturn => {
const inviteParams = inviteCode ? { c: inviteCode } : undefined;
const sharePath = path ? getJumpUrl(path, { ...params, ...inviteParams }) : getJumpUrl(PageUrl.Job, inviteParams);
console.log('share share message', sharePath);
return {
title: title || `昨天新增了${getRandomCount()}条主播通告,宝子快来看看`,
path: getJumpUrl(PageUrl.Job, inviteCode ? { c: inviteCode } : undefined),
path: sharePath,
imageUrl: useCapture ? undefined : imageUrl,
};
};