feat: 群代发改版
This commit is contained in:
@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user