diff --git a/h5/app-invite/app.js b/h5/app-invite/app.js index cbb55b4..43e241e 100644 --- a/h5/app-invite/app.js +++ b/h5/app-invite/app.js @@ -20,6 +20,8 @@ const DEFAULT_TASK_NOTES = { transport: "(Only the highest-level bonuses may be awarded)", quota: "(Only invited users who reach the required recharge amount count as valid invites)", }; +const INVITE_SHARE_COPY_PREFIX = + "Download the app, invite your friends to join, and earn 100,000 coins plus a special welcome gift!"; const DEFAULTS = { view: "invite", @@ -613,6 +615,11 @@ function currentInviteShareURL() { return buildInviteShareURL(state.inviteLink, state.inviteCode); } +function currentInviteShareCopyText() { + const inviteURL = trimValue(currentInviteShareURL()); + return inviteURL ? `${INVITE_SHARE_COPY_PREFIX} ${inviteURL}` : ""; +} + function renderStats() { els.inviteLinkText.textContent = trimValue(currentInviteShareURL()) || "--"; els.inviteCodeText.textContent = trimValue(state.inviteCode) || "--"; @@ -1211,7 +1218,7 @@ function bindEvents() { els.copyButtons.forEach((button) => { button.addEventListener("click", async () => { const target = button.getAttribute("data-copy-target"); - const value = target === "invite-code" ? state.inviteCode : currentInviteShareURL(); + const value = target === "invite-code" ? state.inviteCode : currentInviteShareCopyText(); try { await copyText(trimValue(value));