PageSourceSearch

https://www.100ex.ai/assets/confirm-CAd9sRjj.js

js 100ex.ai collected 2026-10-05 11:46:35 UTC 3,498 bytes, 1 lines download raw bytes

1import{l as x,r as l,c as B,I as s,J as e,y as C,N as f,F as d,u as T,ag as L,a4 as M,H as n}from"./vendor-BB0pBhfa.js";import{t as q}from"./telegram-SXKRukmc.js";import{p as A,q as I,_ as R}from"./index-DWVZku9D.js";import{u as $}from"./use-launchpad-auth-DVtqZb52.js";import"./lodash-rBtdimoK.js";import"./decimal-CaUHonIL.js";import"./vant-06ie2Nec.js";const z={class:"tg-confirm"},E={class:"tg-confirm__card"},F={key:0,viewBox:"0 0 24 24",width:"28",height:"28",fill:"none"},H={key:1,viewBox:"0 0 24 24",width:"28",height:"28",fill:"none"},N={key:2,viewBox:"0 0 24 24",width:"28",height:"28",fill:"none"},S={class:"tg-confirm__title"},j={key:0,class:"tg-confirm__hint"},D={class:"tg-confirm__text tg-confirm__text--err"},J=["disabled"],O=x({__name:"confirm",setup(V){const g=L(),v=M(),{syncAppToken:p,goLogin:k}=$(),h="https://api.100xex.com",b="ohx_official_assistant_bot",m=l(g.query.code||""),c=l(!0),i=l(!1),r=l(!1),o=l("");function y(a){return I("post",`${h}/gw/v1/user/tg/bind_confirm`,{code:a})}async function w(){if(!(!m.value||i.value)){i.value=!0,o.value="";try{await y(m.value),r.value=!0,A("绑定成功","success")}catch(a){o.value=(a==null?void 0:a.msg)||"绑定失败,请回到 Telegram 重新发起"}finally{i.value=!1}}}function _(){window.open(`https://t.me/${b}`,"_blank")}return B(async()=>{var t;if(!m.value){o.value="链接缺少参数,请回到 Telegram 重新发起",c.value=!1;return}if(!await p()){c.value=!1,k();return}try{const u=await q();(t=u==null?void 0:u.data)!=null&&t.bound&&(r.value=!0)}catch{}c.value=!1}),(a,t)=>(n(),s("div",z,[e("div",E,[e("div",{class:C(["tg-confirm__icon",{"is-ok":r.value,"is-err":o.value}])},[r.value?(n(),s("svg",F,[...t[1]||(t[1]=[e("path",{d:"M4 12.5l5 5L20 6.5",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):o.value?(n(),s("svg",H,[...t[2]||(t[2]=[e("path",{d:"M12 7v6m0 4h.01",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round"},null,-1),e("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor","stroke-width":"2"},null,-1)])])):(n(),s("svg",N,[...t[3]||(t[3]=[e("path",{d:"M3.2 12.1L21.1 5c.8-.3 1.5.2 1.3 1.4l-3.1 14c-.2 1-.8 1.2-1.6.8l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.4-4.8 8.7-7.9c.4-.4-.1-.6-.6-.2L7.4 14.2 3.1 13c-.9-.3-.9-.8.1-1z",fill:"currentColor"},null,-1)])]))],2),e("h2",S,f(r.value?"已完成绑定":o.value?"绑定未完成":"绑定 Telegram"),1),c.value?(n(),s("p",j,"加载中…")):r.value?(n(),s(d,{key:1},[t[4]||(t[4]=e("p",{class:"tg-confirm__text"},"此 Telegram 已与你的账号关联,可以回到 Telegram 继续。",-1)),e("button",{class:"tg-confirm__btn",onClick:_},"回到 Telegram"),e("button",{class:"tg-confirm__btn tg-confirm__btn--ghost",onClick:t[0]||(t[0]=u=>T(v).push({name:"TelegramBind"}))},"查看关联状态")],64)):o.value?(n(),s(d,{key:2},[e("p",D,f(o.value),1),e("button",{class:"tg-confirm__btn",onClick:_},"回到 Telegram 重新发起"),t[5]||(t[5]=e("p",{class:"tg-confirm__hint"},"在机器人里发送 /bind 可获取新的绑定链接(5 分钟内有效)。",-1))],64)):(n(),s(d,{key:3},[t[6]||(t[6]=e("p",{class:"tg-confirm__text"},"确认将此 Telegram 账号绑定到当前登录的账户?",-1)),e("button",{class:"tg-confirm__btn",disabled:i.value,onClick:w},f(i.value?"提交中…":"确认绑定"),9,J),t[7]||(t[7]=e("p",{class:"tg-confirm__hint"}
1,"绑定后可随时在账号安全页解除。",-1))],64))])]))}}),Y=R(O,[["__scopeId","data-v-67b3769b"]]);export{Y 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.