Files
Sub-Router/dist/assets/Home-CgXJ_P34.js
T
abingyydsandClaude Sonnet 4.6 d628477e4d feat: 分站套餐页增加限时特惠标识
- 页面顶部添加限时特惠横幅,提示当前为特价
- 每个套餐卡片增加"特惠价"徽章
- 价格区域增加折扣百分比标签和涨价提示
- 中英文 i18n 键补全

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 09:43:53 +09:00

2 lines
8.6 KiB
JavaScript

import{u,a as j,r as n,f as b,l as g,j as e,L as a}from"./index-DFuC01Yj.js";import{G as N}from"./GradientText-JgsHG3_e.js";import{B as v,S as f}from"./StarBorder-BEhnRh1b.js";import{S as o}from"./SpotlightCard-DuGMNMoz.js";import{C as c}from"./CountUp-CbiQotWO.js";import{u as w}from"./useTranslation-BEbHB0KC.js";import"./use-animation-frame-B0UtZweQ.js";import"./proxy-DSSek5uX.js";function B(){const{t}=w(),{user:r}=u(),{site:i}=j(),[d,m]=n.useState([]),[x,h]=n.useState([]);n.useEffect(()=>{b().then(s=>{s.data.success&&m(s.data.data||[])}).catch(()=>{}),g().then(s=>{s.data.success&&h(s.data.data||[])}).catch(()=>{})},[]);const l=d.filter(s=>s.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-0 left-1/2 -translate-x-1/2 w-[800px] h-[600px] bg-gradient-radial from-brand-600/20 via-purple-600/5 to-transparent blur-3xl"}),e.jsx("div",{className:"absolute top-[400px] right-0 w-[500px] h-[500px] bg-gradient-radial from-pink-600/10 to-transparent blur-3xl"})]}),e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 pt-24 pb-20",children:[e.jsxs("div",{className:"text-center max-w-4xl mx-auto",children:[e.jsx("div",{className:"mb-6",children:e.jsx(N,{colors:["#818cf8","#c084fc","#f472b6","#818cf8"],animationSpeed:6,className:"text-5xl md:text-7xl font-extrabold leading-tight tracking-tight",children:(i==null?void 0:i.name)||t("home.defaultHeroTitle")})}),e.jsx(v,{text:t("home.heroSubtitle"),className:"text-lg md:text-xl text-neutral-400 max-w-2xl mx-auto mb-10 leading-relaxed",delay:50,animateBy:"words"}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:r?e.jsx(a,{to:"/dashboard",children:e.jsx(f,{as:"div",color:"#818cf8",speed:"5s",children:t("home.goToDashboard")})}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"btn-primary text-base !px-8 !py-3",children:t("home.getStarted")}),e.jsx(a,{to:"/pricing",className:"btn-secondary text-base !px-8 !py-3",children:t("home.viewPricing")})]})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-6 max-w-xl mx-auto mt-20",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:[e.jsx(c,{from:0,to:l.length||50,duration:2,separator:""}),"+"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("home.aiModels")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:[e.jsx(c,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("home.uptime")})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-white",children:["<",e.jsx(c,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:t("home.latency")})]})]})]}),e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:t("home.whyChooseUs")}),e.jsx("p",{className:"text-neutral-400",children:t("home.whyChooseUsDesc")})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsxs(o,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(129,140,248,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-brand-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-brand-400",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"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:t("home.lightningFast")}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t("home.lightningFastDesc")})]}),e.jsxs(o,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(192,132,252,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-purple-400",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"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:t("home.securePrivate")}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t("home.securePrivateDesc")})]}),e.jsxs(o,{className:"!bg-neutral-900/60 !border-neutral-800/60",spotlightColor:"rgba(244,114,182,0.15)",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-pink-500/10 flex items-center justify-center mb-4",children:e.jsx("svg",{className:"w-6 h-6 text-pink-400",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"})})}),e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:t("home.payAsYouGo")}),e.jsx("p",{className:"text-sm text-neutral-400 leading-relaxed",children:t("home.payAsYouGoDesc")})]})]})]}),l.length>0&&e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:t("home.availableModels")}),e.jsx("p",{className:"text-neutral-400",children:t("home.availableModelsDesc",{count:l.length})})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:l.slice(0,12).map((s,p)=>e.jsxs("div",{className:"glass-sm px-4 py-3 flex items-center gap-3 hover:bg-white/[0.06] transition-colors group",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),e.jsx("span",{className:"text-sm font-mono text-neutral-300 group-hover:text-white transition-colors truncate",children:s.display_name||s.model_name})]},s.id||p))}),l.length>12&&e.jsx("div",{className:"text-center mt-6",children:e.jsxs(a,{to:"/pricing",className:"text-sm text-brand-400 hover:text-brand-300 transition-colors",children:[t("home.viewAllModels",{count:l.length})," →"]})})]}),x.length>0&&e.jsxs("section",{className:"relative max-w-7xl mx-auto px-6 py-20",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-3xl font-bold text-white mb-3",children:t("home.plansPackages")}),e.jsx("p",{className:"text-neutral-400",children:t("home.choosePlan")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:x.filter(s=>s.enabled).slice(0,3).map(s=>e.jsxs("div",{className:"glass rounded-2xl p-6 flex flex-col hover:border-brand-500/30 transition-colors",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:s.name}),s.description&&e.jsx("p",{className:"text-sm text-neutral-400 mb-4",children:s.description}),e.jsxs("div",{className:"mt-auto pt-4",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsxs("span",{className:"text-3xl font-bold text-white",children:["$",s.price]}),s.original_price>s.price&&e.jsxs("span",{className:"text-sm text-neutral-500 line-through",children:["$",s.original_price]})]}),s.duration>0&&e.jsx("p",{className:"text-xs text-neutral-500 mt-1",children:t("home.days",{count:s.duration})})]}),e.jsx(a,{to:r?"/packages":"/register",className:"btn-primary text-center mt-4 !py-2",children:t(r?"home.subscribe":"home.getStarted")})]},s.id))})]}),e.jsx("section",{className:"relative max-w-7xl mx-auto px-6 py-24",children:e.jsxs("div",{className:"glass rounded-3xl p-12 text-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-brand-600/10 via-transparent to-purple-600/10"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("h2",{className:"text-3xl font-bold text-white mb-4",children:t("home.readyToStart")}),e.jsx("p",{className:"text-neutral-400 mb-8 max-w-md mx-auto",children:t("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:r?e.jsx(a,{to:"/dashboard",className:"btn-primary text-base !px-8 !py-3",children:t("home.goToDashboard")}):e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/register",className:"btn-primary text-base !px-8 !py-3",children:t("home.createFreeAccount")}),e.jsx(a,{to:"/login",className:"btn-secondary text-base !px-8 !py-3",children:t("home.signIn")})]})})]})]})})]})}export{B as default};