- Pattern 改为匹配后端实际格式(如 claude-opus-4-5 而非 claude-4.5-opus) - 确保更具体的 pattern 排在前面,避免 Opus 4.5 误匹配到 Opus 4 的 $15 官方价 - 补充更多模型:GPT-4.1 Mini/Nano、Gemini Flash Lite、DeepSeek R1/V3 等 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
import{u as j,a as g,r as d,f as v,l as f,j as e,L as l,Q as w}from"./index-D8eKls75.js";import{c as N,R as y}from"./RotatingEquiv-DkCC_t4y.js";import{C as k}from"./CountUp-BixuEoA6.js";import{F as r}from"./FadeContent-B3Mc1Ysf.js";import{u as M}from"./useTranslation-D_OVvIX9.js";function P(){const{t:s}=M(),{user:i}=j(),{site:n}=g(),[h,u]=d.useState([]),[c,b]=d.useState([]);d.useEffect(()=>{v().then(t=>{t.data.success&&u(t.data.data||[])}).catch(()=>{}),f().then(t=>{t.data.success&&b(t.data.data||[])}).catch(()=>{})},[]);const o=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 left-1/4 w-[600px] h-[600px] bg-violet-600/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-20 right-1/4 w-[400px] h-[400px] bg-blue-600/8 rounded-full blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-5xl mx-auto px-6 pt-32 pb-20",children:[e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[e.jsx("h1",{className:"text-5xl md:text-7xl font-heading font-extrabold text-white leading-[1.08] tracking-tight",children:(n==null?void 0:n.name)||s("home.defaultHeroTitle")}),e.jsx("p",{className:"text-lg text-neutral-400 mt-6 leading-relaxed max-w-xl mx-auto",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center justify-center gap-4 mt-10",children:i?e.jsx(l,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.getStarted")}),e.jsx(l,{to:"/pricing",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.viewPricing")})]})})]})}),e.jsx(r,{blur:!0,duration:800,delay:400,children:e.jsx("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-24",children:[{value:o.length||50,suffix:"+",label:s("home.aiModels")},{value:99.9,suffix:"%",label:s("home.uptime")},{value:50,suffix:"ms",label:s("home.latency"),prefix:"<"}].map((t,a)=>e.jsxs("div",{className:"text-center p-5 rounded-2xl bg-white/[0.03] border border-white/[0.06]",children:[e.jsxs("div",{className:"text-2xl font-bold text-white",children:[t.prefix,e.jsx(k,{from:0,to:t.value,duration:2}),t.suffix]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.label})]},a))})})]}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-500",children:s("home.whyChooseUsDesc")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-5",children:[{title:s("home.lightningFast"),desc:s("home.lightningFastDesc"),color:"violet",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 10V3L4 14h7v7l9-11h-7z"})})},{title:s("home.securePrivate"),desc:s("home.securePrivateDesc"),color:"blue",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})},{title:s("home.payAsYouGo"),desc:s("home.payAsYouGoDesc"),color:"cyan",icon:e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}].map((t,a)=>e.jsxs("div",{className:"p-6 rounded-xl bg-white/[0.02] border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg bg-${t.color}-500/10 text-${t.color}-400 flex items-center justify-center mb-4`,children:t.icon}),e.jsx("h3",{className:"text-base font-semibold text-white mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t.desc})]},a))})]})}),o.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsxs("div",{className:"flex items-end justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.availableModels")}),e.jsx("p",{className:"text-neutral-500",children:s("home.availableModelsDesc",{count:o.length})})]}),o.length>8&&e.jsxs(l,{to:"/pricing",className:"text-sm text-violet-400 hover:text-violet-300 transition-colors",children:[s("home.viewAllModels",{count:o.length})," →"]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:o.slice(0,8).map((t,a)=>e.jsx("div",{className:"px-4 py-3 rounded-lg border border-white/[0.06] hover:border-white/[0.12] transition-colors",children:e.jsx("span",{className:"text-sm text-neutral-300 font-mono",children:t.display_name||t.model_name})},t.id||a))})]})}),c.length>0&&e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-20",children:e.jsxs(r,{blur:!0,duration:800,delay:100,children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-2",children:s("home.plansPackages")}),e.jsx("p",{className:"text-neutral-500 mb-10",children:s("home.choosePlan")}),e.jsx("div",{className:"grid md:grid-cols-3 gap-4 max-w-4xl",children:c.filter(t=>t.enabled).slice(0,3).map((t,a)=>{const p=t.quota_amount>0?t.quota_amount/w:0,x=N(o,p);return e.jsxs("div",{className:`rounded-2xl p-6 flex flex-col border transition-colors ${a===1?"bg-white/[0.04] border-white/[0.12]":"bg-white/[0.02] border-white/[0.06] hover:border-white/[0.1]"}`,children:[a===1&&e.jsx("span",{className:"text-xs text-violet-400 font-medium mb-2 uppercase tracking-wider",children:s("home.popular")||"Popular"}),e.jsx("h3",{className:"text-base font-semibold text-white",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t.description}),e.jsxs("div",{className:"mt-auto pt-6",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-neutral-600 line-through ml-2",children:["$",t.original_price]}),t.duration>0&&e.jsx("p",{className:"text-xs text-neutral-600 mt-1",children:s("home.days",{count:t.duration})})]}),x.length>0&&e.jsxs("p",{className:"text-xs text-amber-300/80 mt-2",children:["🔥 ",e.jsx(y,{items:x,text:m=>s("packages.officialEquiv",{model:m.label,amount:m.equivDollars})})]}),e.jsx(l,{to:i?"/packages":"/register",className:`mt-4 py-2.5 rounded-xl font-medium text-sm text-center transition-colors ${a===1?"bg-white text-black hover:bg-neutral-100":"bg-white/[0.06] text-white hover:bg-white/[0.1]"}`,children:s(i?"home.subscribe":"home.getStarted")})]},t.id)})})]})}),e.jsx("section",{className:"max-w-5xl mx-auto px-6 py-24",children:e.jsx(r,{blur:!0,duration:800,delay:100,children:e.jsxs("div",{className:"border-t border-white/[0.06] pt-16 text-center",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-white mb-3",children:s("home.readyToStart")}),e.jsx("p",{className:"text-neutral-500 mb-8 max-w-md mx-auto",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:i?e.jsx(l,{to:"/dashboard",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/register",className:"px-8 py-3.5 rounded-2xl bg-white text-black font-semibold text-sm hover:bg-neutral-100 transition-all",children:s("home.createFreeAccount")}),e.jsx(l,{to:"/login",className:"px-8 py-3.5 rounded-2xl border border-white/15 text-white font-medium text-sm hover:bg-white/5 transition-all",children:s("home.signIn")})]})})]})})})]})}export{P as default};
|