- 新增 PackageOrder 模型,记录每次套餐购买的详细信息 - 将套餐扣费和充值操作改为数据库事务(原子操作),防止部分失败导致数据不一致 - 使用行级锁(FOR UPDATE)确保并发安全 - 添加 ErrInsufficientQuota 哨兵错误,提升错误处理可靠性 - 购买成功后记录操作日志(RecordLog) - 前端 Packages.jsx 增加失败时的错误提示 - 分站模型管理和设置页面小幅修正 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 lines
921 B
JavaScript
2 lines
921 B
JavaScript
import{j as n}from"./index-p6W69obe.js";import{u as a}from"./useTranslation-BUy5R_Pw.js";function u({className:t=""}){var s;const{i18n:e}=a(),o=(s=e.language)==null?void 0:s.startsWith("zh"),r=()=>{e.changeLanguage(o?"en":"zh")};return n.jsxs("button",{onClick:r,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors ${t}`,"aria-label":"Switch language",children:[n.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:[n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.6 9h16.8M3.6 15h16.8"}),n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3a15.3 15.3 0 0 1 4 9 15.3 15.3 0 0 1-4 9 15.3 15.3 0 0 1-4-9 15.3 15.3 0 0 1 4-9Z"})]}),n.jsx("span",{children:o?"EN":"中文"})]})}export{u as L};
|