PageSourceSearch

https://julebu.ai/_nuxt/CQwrHdiZ.js

js julebu.ai collected 2026-10-02 00:43:29 UTC 3,519 bytes, 1 lines download raw bytes

1import{f as L,g as O,r as U,aH as N,k as x,fR as P,z as V,av as A,c as m,a as s,n as B,b as l,F as y,t as _,w as v,l as u,m as D,s as g,fH as H,K as j,o as d,q as $,d as w}from"./Hz_U0fwx.js";import{s as z}from"./IBG-Sfxa.js";const F={class:"dark min-h-screen bg-black text-white flex items-center justify-center"},q={class:"text-center max-w-md mx-auto px-6"},K={key:0,class:"mb-8"},W={class:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-blue-500/20 mb-6"},Q={class:"mb-8"},X={class:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-emerald-500/20 mb-6"},Y={class:"text-foreground-faint"},G={class:"mb-8"},J={class:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-amber-500/20 mb-6"},Z={class:"text-foreground-faint"},ee=2e3,te=15,se=2e3,ne=1e3,ae=L({__name:"success",setup(oe){const S=N(),b=O(),{gotoHome:c,gotoDiamonds:h}=D(),i=U("polling");let f=null;const n=E(S.query.orderNo),r=x(()=>n==null?void 0:n.startsWith("diamond_")),T=x(()=>n==null?void 0:n.startsWith(`${P.Lifetime}_`));function E(t){return Array.isArray(t)?typeof t[0]=="string"?t[0]:"":typeof t=="string"?t:""}async function k(){if(!n){c();return}let t=0;async function e(){t++;try{if((await H(n)).status==="success"){await M();return}}catch{}if(t>=te){i.value="timeout";return}f=setTimeout(e,ee)}await e()}async function M(){i.value="success",await C(),r.value?setTimeout(()=>{h()},3e3):(z({source:"stripe-success",orderNo:n,membershipType:T.value||b.isLifetimeMembership()?"lifetime":"regular"}),setTimeout(()=>{c()},ne))}async function C(){let t=!1;function e(){t||(t=!0,j.warning("支付已成功,会员状态正在同步。如果首页仍未更新,请刷新页面试试。",{duration:5e3}))}const o=b.updateUserInfo().then(()=>"done").catch(p=>(console.error("支付成功后刷新用户信息失败:",p),e(),"failed"));let a=null;const R=new Promise(p=>{a=setTimeout(()=>p("timeout"),se)}),I=await Promise.race([o,R]);a&&clearTimeout(a),I==="timeout"&&(console.warn("支付成功后刷新用户信息超时,继续跳转并保留后台刷新"),e())}return V(()=>{k()}),A(()=>{f&&clearTimeout(f)}),(t,e)=>{const o=$;return d(),m("div",F,[s("div",q,[i.value==="polling"?(d(),m("div",K,[s("div",W,[l(o,{name:"lucide:loader-2",class:"w-10 h-10 text-blue-400 animate-spin"})]),e[2]||(e[2]=s("h1",{class:"text-3xl font-bold mb-3"}," 正在确认支付结果... ",-1)),e[3]||(e[3]=s("p",{class:"text-foreground-faint"}," 请稍候,正在处理您的订单 ",-1))])):i.value==="success"?(d(),m(y,{key:1},[s("div",Q,[s("div",X,[l(o,{name:"lucide:check",class:"w-10 h-10 text-emerald-400"})]),e[4]||(e[4]=s("h1",{class:"text-3xl font-bold mb-3"}," 支付成功 ",-1)),s("p",Y,_(r.value?"钻石已到账,即将跳转...":"会员权益已生效,即将返回首页"),1)]),l(u(g),{type:"button",variant:"inverse",size:"lg",onClick:e[0]||(e[0]=a=>r.value?u(h)():u(c)())},{default:v(()=>[w(_(r.value?"立即前往":"返回首页"),1)]),_:1})],64)):i.value==="timeout"?(d(),m(y,{key:2},[s("div",G,[s("div",J,[l(o,{name:"lucide:clock",class:"w-10 h-10 text-amber-400"})]),e[5]||(e[5]=s("h1",{class:"text-3xl font-bold mb-3"}," 支付处理中 ",-1)),s("p",Z,_(r.value?"订单正在处理,请稍后在钱包中查看钻石余额":"订单正在处理,请稍后在个人中心查看会员状态"),1)]),l(u(g),{type:"button",variant:"inverse",size:"lg",onClick:e[1]||(e[1]=a=>u(c)())},{default:v(()=>[...e[6]||(e[6]=[w(" 返回首页 ",-1)])]),_:1})],64)):B("",!0)])])}}});export{ae 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.