PageSourceSearch

https://008.icu/_next/static/chunks/page-DTnSrKoY.js

js 008.icu collected 2026-10-09 04:32:56 UTC 7,124 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t,r as n}from"./framework-BaE7mD_r.js";import r from"./image-T99ccyP5.js";import i from"./link-BwiNOcTB.js";var a=e(n(),1),o={ios:`https://download.008.icu/app.ipa`,android:{}.NEXT_PUBLIC_ANDROID_DOWNLOAD_URL||``},s=`/api/register`,c=t();function l({compact:e=!1}){return(0,c.jsxs)(`section`,{className:`download-prompt ${e?`download-prompt-compact`:``}`,children:[(0,c.jsx)(`div`,{className:`download-prompt-mark`,"aria-hidden":`true`,children:(0,c.jsx)(r,{src:`/brand/tikchat-mark.svg`,alt:``,width:44,height:44})}),(0,c.jsxs)(`div`,{className:`download-prompt-copy`,children:[(0,c.jsx)(`span`,{className:`eyebrow`,children:`CONTINUE IN THE APP`}),(0,c.jsx)(`h2`,{children:`在 TikChat App 中完成登录`}),(0,c.jsx)(`p`,{children:`官网不保存登录态。下载 TikChat 后,使用注册手机号和验证码登录即可。`})]}),(0,c.jsxs)(`div`,{className:`download-prompt-actions`,children:[(0,c.jsx)(`a`,{className:`download-prompt-store`,href:o.ios,"aria-label":`Download TikChat on the App Store`,children:(0,c.jsx)(r,{src:`/assets/landing/store-badges/appstore-dark.png`,alt:`App Store`,width:180,height:52})}),o.android?(0,c.jsx)(`a`,{className:`download-prompt-store`,href:o.android,"aria-label":`Get TikChat on Google Play`,children:(0,c.jsx)(r,{src:`/assets/landing/store-badges/googleplay-dark.png`,alt:`Google Play`,width:180,height:52})}):null]})]})}var u=`tikchat-affiliate-code`,d=/^1[3-9]\d{9}$/;function f(){let e=new URLSearchParams(window.location.search).get(`aff`)?.trim()||``,t=window.sessionStorage.getItem(u)?.trim()||``;return e||t}function p(){let[e,t]=(0,a.useState)(f),[n,o]=(0,a.useState)(``),[p,m]=(0,a.useState)(``),[h,g]=(0,a.useState)(!1),[_,v]=(0,a.useState)(`idle`),[y,b]=(0,a.useState)(``);(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get(`aff`)?.trim()||``;e&&window.sessionStorage.setItem(u,e)},[]);async function x(t){if(t.preventDefault(),b(``),!d.test(n.trim())){b(`请输入正确的 11 位手机号。`);return}if(p.trim().length<2){b(`昵称至少需要 2 个字符。`);return}if(!h){b(`请先同意服务条款与隐私政策。`);return}v(`submitting`);try{let t=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({username:n.trim(),nickname:p.trim(),mobile:n.trim(),invitedByCode:e.trim()})}),r=await t.json();if(!t.ok||r.code!==0)throw Error(r.msg||r.message||`注册失败,请稍后重试。`);v(`success`),window.sessionStorage.removeItem(u)}catch(e){v(`idle`),b(e instanceof Error?e.message:`注册失败,请稍后重试。`)}}return _===`success`?(0,c.jsxs)(`main`,{className:`auth-page auth-page-success`,children:[(0,c.jsx)(`div`,{className:`auth-page-glow auth-page-glow-blue`,"aria-hidden":`true`}),(0,c.jsxs)(`header`,{className:`auth-header page-width`,children:[(0,c.jsxs)(i,{className:`auth-brand`,href:`/`,"aria-label":`返回 TikChat 官网`,children:[(0,c.jsx)(r,{src:`/brand/tikchat-mark.svg`,alt:`TikChat`,width:48,height:48,priority:!0}),(0,c.jsx)(`span`,{children:`TikChat`})]}),(0,c.jsx)(i,{className:`auth-back-link`,href:`/`,children:`返回官网`})]}),(0,c.jsxs)(`section`,{className:`auth-success-card page-width`,children:[(0,c.jsx)(`div`,{className:`success-icon`,"aria-hidden":`true`,children:`✓`}),(0,c.jsx)(`span`,{className:`eyebrow`,children:`ACCOUNT CREATED`}),(0,c.jsx)(`h1`,{children:`注册成功,欢迎加入 TikChat。`}),(0,c.jsxs)(`p`,{children:[`请下载 TikChat App,使用手机号 `,(0,c.jsx)(`strong`,{children:n}),` 获取验证码并登录。`]}
1),(0,c.jsx)(l,{compact:!0}),(0,c.jsx)(i,{className:`auth-secondary-link`,href:`/`,children:`先回到官网`})]})]}):(0,c.jsxs)(`main`,{className:`auth-page`,children:[(0,c.jsx)(`div`,{className:`auth-page-glow auth-page-glow-blue`,"aria-hidden":`true`}),(0,c.jsx)(`div`,{className:`auth-page-glow auth-page-glow-green`,"aria-hidden":`true`}),(0,c.jsxs)(`header`,{className:`auth-header page-width`,children:[(0,c.jsxs)(i,{className:`auth-brand`,href:`/`,"aria-label":`返回 TikChat 官网`,children:[(0,c.jsx)(r,{src:`/brand/tikchat-mark.svg`,alt:`TikChat`,width:48,height:48,priority:!0}),(0,c.jsx)(`span`,{children:`TikChat`})]}),(0,c.jsxs)(`span`,{className:`auth-header-copy`,children:[`已有账号? `,(0,c.jsx)(i,{href:`/login`,children:`去登录`})]})]}),(0,c.jsxs)(`section`,{className:`register-layout page-width`,children:[(0,c.jsxs)(`div`,{className:`register-intro`,children:[(0,c.jsx)(`span`,{className:`eyebrow`,children:`JOIN THE COMMUNITY`}),(0,c.jsxs)(`h1`,{children:[`从一次邀请开始,`,(0,c.jsx)(`br`,{}),`连接更多可能。`]}),(0,c.jsx)(`p`,{children:`创建你的 TikChat 账号,加入你感兴趣的群组、频道与聊天室,把重要的对话留在一个地方。`}),(0,c.jsxs)(`div`,{className:`register-benefits`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`span`,{children:`01`}),(0,c.jsx)(`strong`,{children:`一个账号,多种连接`})]}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`span`,{children:`02`}),(0,c.jsx)(`strong`,{children:`手机号登录,简单快捷`})]}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`span`,{children:`03`}),(0,c.jsx)(`strong`,{children:`邀请关系自动记录`})]})]})]}),(0,c.jsxs)(`div`,{className:`register-card`,children:[(0,c.jsxs)(`div`,{className:`register-card-heading`,children:[(0,c.jsx)(`span`,{className:`eyebrow`,children:`CREATE ACCOUNT`}),(0,c.jsx)(`h2`,{children:`注册 TikChat`}),(0,c.jsx)(`p`,{children:`填写信息,完成后下载 App 登录。`})]}),(0,c.jsxs)(`form`,{className:`register-form`,onSubmit:x,noValidate:!0,children:[(0,c.jsxs)(`label`,{children:[(0,c.jsx)(`span`,{children:`手机号`}),(0,c.jsx)(`input`,{value:n,onChange:e=>o(e.target.value),inputMode:`numeric`,autoComplete:`tel`,placeholder:`请输入手机号`,required:!0})]}),(0,c.jsxs)(`label`,{children:[(0,c.jsx)(`span`,{children:`昵称`}),(0,c.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),autoComplete:`nickname`,placeholder:`你希望别人如何称呼你`,required:!0})]}),(0,c.jsxs)(`label`,{children:[(0,c.jsx)(`span`,{children:`邀请码`}),(0,c.jsx)(`input`,{suppressHydrationWarning:!0,value:e,onChange:e=>t(e.target.value.toUpperCase()),autoComplete:`off`,placeholder:`请输入邀请码`,required:!0}),(0,c.jsx)(`small`,{children:`通过邀请链接访问时,邀请码会自动带入;没有邀请码也可以直接注册。`})]}),(0,c.jsxs)(`label`,{className:`register-agreement`,children:[(0,c.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),(0,c.jsxs)(`span`,{children:[`我已阅读并同意 `,(0,c.jsx)(i,{href:`/#terms`,children:`服务条款`}),` 与 `,(0,c.jsx)(i,{href:`/#privacy`,children:`隐私政策`})]})]}),y?(0,c.jsx)(`p`,{className:`form-error`,role:`alert`,children:y}):null,(0,c.jsx)(`button`,{className:`register-submit`,type:`submit`,disabled:_===`submitting`,children:_===`submitting`?`正在创建账号…`:`创建账号`})]}),(0,c.jsx)(`p`,{className:`register-footnote`,children:`注册后请在 TikChat App 中使用手机号验证码登录。`})]})]})]})}export{p as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.