PageSourceSearch

https://wodeapp.cn/assets/PaymentSuccessPage-0bOEuEYW.js

js wodeapp.cn collected 2026-09-24 14:37:30 UTC 2,367 bytes, 1 lines download raw bytes

1import{r,j as e}from"./react-vendor-BxoUhqX6.js";import{a as f,j as p,y as j,C as y,H as b,$ as w,L as N}from"./index-Bj3wZDOH.js";import"./clsx-B-dksMZM.js";import"./i18n-vendor-Coo-X0AG.js";function T(){const[d]=f(),n=p(),s=d.get("out_trade_no")||"",[o,a]=r.useState("loading"),[m,t]=r.useState("正在确认支付状态..."),[i,x]=r.useState(0);r.useEffect(()=>{if(!s){a("error"),t("订单号缺失,请联系客服");return}c()},[s]);const c=async()=>{try{const l=await j("/mainserver/api/alipay/sync-order",{method:"POST",body:JSON.stringify({outTradeNo:s})});if(!l.ok)throw new Error("同步失败");(await l.json()).data.synced?(a("success"),t("支付成功!积分和权益已到账,正在跳转..."),setTimeout(()=>n("/credits"),2500)):i<3?(t(`支付确认中,请稍候... (${i+1}/3)`),setTimeout(()=>{x(h=>h+1),c()},3e3)):(a("pending"),t("支付已提交,积分将在几分钟内到账。如有疑问请联系客服。"))}catch{a("error"),t("网络错误,请刷新页面或联系客服。")}},g={loading:e.jsx(N,{className:"w-16 h-16 text-indigo-500 animate-spin"}),success:e.jsx(w,{className:"w-16 h-16 text-green-500"}),pending:e.jsx(b,{className:"w-16 h-16 text-yellow-500"}),error:e.jsx(y,{className:"w-16 h-16 text-red-400"})}[o],u={loading:"确认支付中...",success:"支付成功!",pending:"支付处理中",error:"遇到问题"}[o];return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-indigo-50 to-purple-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-10 max-w-sm w-full text-center",children:[e.jsx("div",{className:"flex justify-center mb-6",children:g}),e.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-3",children:u}),e.jsx("p",{className:"text-gray-500 mb-8 leading-relaxed",children:m}),s&&e.jsxs("p",{className:"text-xs text-gray-400 mb-6 font-mono break-all",children:["订单号:",s]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[o!=="loading"&&e.jsx("button",{onClick:()=>n("/credits"),className:"w-full py-3 bg-indigo-600 text-white rounded-xl font-semibold hover:bg-indigo-700 transition-colors",children:"查看积分"}),e.jsx("button",{onClick:()=>n("/"),className:"w-full py-3 bg-gray-100 text-gray-700 rounded-xl font-semibold hover:bg-gray-200 transition-colors",children:"返回首页"})]})]})})}export{T 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.