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.