PageSourceSearch

https://www.vicoco.cn/assets/js/index-DmbSlgFU.js

js vicoco.cn collected 2026-10-06 14:13:17 UTC 6,713 bytes, 1 lines download raw bytes

1import{cl as b,cv as v,r,j as e,cx as S,cy as _}from"./vendor-CWbTxbDJ.js";import{u as w,g as C,t as P,N as T,c as k}from"./index-CF-Nit-z.js";import{S as E,U as R}from"./index-Cm0pyq_5.js";import"./ui-vendor-BVdwggPR.js";import"./vip-CAw_bTAV.js";import"./vipApi-BfE34DRy.js";import"./projectApi-C6GqtqYk.js";const I="_pageWrapper_8021y_27",A={pageWrapper:I},M=()=>{const i=b(),[c]=v(),{user:L,isAuthenticated:O}=w(),m=C(),s=a=>P(a,m),[o,p]=r.useState(3),[n,h]=r.useState({recharge_id:"",out_trade_no:"",trade_no:"",money:"",name:"",trade_status:""}),[d,x]=r.useState(!1),[t,f]=r.useState(!1);r.useEffect(()=>{const a=document.title;return document.title=s("paymentSuccess.seoTitle"),()=>{document.title=a}},[m]);const u=async a=>{if(!d){x(!0);try{const l=await fetch(k(`/api/recharge/${encodeURIComponent(a)}/status/`),{method:"GET",credentials:"include"}),N=await l.json().catch(()=>({}));l.ok&&N.payment_status==="completed"&&(f(!0),_.success(s("paymentSuccess.toastSuccess"),{position:"top-center",autoClose:3e3}))}catch(l){console.error("查询充值状态异常:",l)}finally{x(!1)}}};r.useEffect(()=>{const a={recharge_id:c.get("recharge_id")||"",out_trade_no:c.get("out_trade_no")||"",trade_no:c.get("trade_no")||"",money:c.get("money")||"",name:c.get("name")||"",trade_status:c.get("trade_status")||""};if(h(a),!a.recharge_id||t)return;u(a.recharge_id);const l=window.setInterval(()=>void u(a.recharge_id),2e3);return()=>window.clearInterval(l)},[c,t,d]),r.useEffect(()=>{if(t)if(o>0){const a=setTimeout(()=>{p(o-1)},1e3);return()=>clearTimeout(a)}else i("/user-recharge")},[o,i,t]);const j=()=>{i("/user-recharge")},y=()=>{i("/user-center")},g=()=>{i("/recharge-records")};return e.jsxs("div",{className:A.pageWrapper,children:[e.jsx(S,{position:"top-center",autoClose:3e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),e.jsx(T,{}),e.jsx(E,{}),e.jsx("main",{className:"ml-0 lg:ml-72 mt-16 min-h-screen bg-secondary",children:e.jsxs("div",{className:"p-4 sm:p-6",children:[e.jsx(R,{eyebrow:"WALLET / PAYMENT",title:t?s("paymentSuccess.title"):"支付结果确认中",description:t?s("paymentSuccess.subtitle"):"已返回 VicroCode,正在等待支付平台的安全通知。"}),e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs("div",{className:"bg-primary rounded-xl p-8 shadow-card text-center",children:[e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:`w-20 h-20 ${t?"bg-green-500":"bg-amber-500"} rounded-full flex items-center justify-center mx-auto mb-4`,children:e.jsx("i",{className:`fas ${t?"fa-check":"fa-clock"} text-white text-3xl`})})}),n.out_trade_no&&e.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 mb-6 text-left",children:[e.jsxs("h3",{className:"text-lg font-semibold text-text-primary mb-4",children:[e.jsx("i",{className:"fas fa-receipt text-accent mr-2"}),s("paymentSuccess.orderInfo")]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:s("paymentSuccess.orderNo")}),e.jsx("span",{className:"text-text-primary font-mono text-sm",children:n.out_trade_no})]}),n.trade_no&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:s("paymentSuccess.tradeNo")}),e.jsx("span",{className:"text-text-primary font-mono text-sm",children:n.trade_no})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:s("paymentSuccess.productName")}
1),e.jsx("span",{className:"text-text-primary",children:n.name||s("paymentSuccess.defaultProductName")})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:s("paymentSuccess.paymentAmount")}),e.jsxs("span",{className:"text-accent font-bold text-lg",children:["¥",n.money]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-text-secondary",children:s("paymentSuccess.paymentStatus")}),e.jsxs("span",{className:`${t?"text-green-500":"text-amber-600"} font-semibold`,children:[e.jsx("i",{className:`fas ${t?"fa-check-circle":"fa-clock"} mr-1`}),t?s("paymentSuccess.successStatus"):"确认中"]})]})]})]}),t&&e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[e.jsx("i",{className:"fas fa-clock text-blue-500"}),e.jsx("span",{className:"text-blue-700",children:o>0?e.jsxs("span",{children:[e.jsx("span",{className:"font-bold text-lg",children:o}),s("paymentSuccess.redirectSuffix")]}):e.jsx("span",{children:s("paymentSuccess.jumping")})})]})})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsxs("button",{onClick:j,className:"px-6 py-3 bg-accent text-white rounded-lg font-medium hover:bg-accent/90 transition-colors flex items-center justify-center",children:[e.jsx("i",{className:"fas fa-credit-card mr-2"}),s("paymentSuccess.continueRecharge")]}),e.jsxs("button",{onClick:y,className:"px-6 py-3 bg-gray-500 text-white rounded-lg font-medium hover:bg-gray-600 transition-colors flex items-center justify-center",children:[e.jsx("i",{className:"fas fa-user mr-2"}),s("paymentSuccess.userCenter")]}),e.jsxs("button",{onClick:g,className:"px-6 py-3 bg-green-500 text-white rounded-lg font-medium hover:bg-green-600 transition-colors flex items-center justify-center",children:[e.jsx("i",{className:"fas fa-history mr-2"}),s("paymentSuccess.rechargeRecords")]})]}),d&&e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[e.jsx("i",{className:"fas fa-spinner fa-spin text-blue-500"}),e.jsx("span",{className:"text-blue-700",children:s("paymentSuccess.processing")})]})})}),e.jsx("div",{className:"mt-8 pt-6 border-t border-gray-200",children:e.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("i",{className:"fas fa-info-circle text-yellow-500 mt-1"}),e.jsxs("div",{className:"text-sm text-yellow-700",children:[e.jsx("p",{className:"font-medium mb-1",children:s("paymentSuccess.tipsTitle")}),e.jsxs("ul",{className:"space-y-1 text-xs",children:[e.jsxs("li",{children:["• ",s("paymentSuccess.tipCoins")]}),e.jsxs("li",{children:["• ",s("paymentSuccess.tipSupport")]}),e.jsxs("li",{children:["• ",s("paymentSuccess.tipRecords")]})]})]})]})})})]})})]})})]})};export{M 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.