feat: 支付闭环 + 运营助手 Tool Calling + 管理后台完善
- 支付系统:微信支付 mock 自动完成、NATIVE 扫码支付、JSAPI 集成 - 运营助手:Tool Calling 架构,19 个可执行工具,AI 驱动操作 - 角色管理:表格布局 + Dialog 表单 + 权限勾选 - 配置统一:config.ts 单一数据源 - API 审计:补齐 status toggle / comments 端点 - 暗黑模式硬件编码颜色全部替换为 CSS 变量
This commit is contained in:
@@ -7,6 +7,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Skeleton } from '@/components/ui/skeleton';
|
||||
import { API_BASE } from '@/lib/config';
|
||||
|
||||
export default function EditToolPage() {
|
||||
const params = useParams();
|
||||
@@ -17,7 +18,7 @@ export default function EditToolPage() {
|
||||
|
||||
useEffect(() => { loadTool(); }, [params.id]);
|
||||
|
||||
const base = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000';
|
||||
const base = API_BASE;
|
||||
function token() { return localStorage.getItem('adminToken'); }
|
||||
function headers() {
|
||||
const t = token();
|
||||
@@ -26,7 +27,7 @@ export default function EditToolPage() {
|
||||
|
||||
async function loadTool() {
|
||||
try {
|
||||
const res = await fetch(`${base}/api/v1/tools`, { headers: headers() });
|
||||
const res = await fetch(`${base}/tools`, { headers: headers() });
|
||||
if (res.ok) {
|
||||
const data = await res.json();
|
||||
const tool = (data.items || []).find((t: any) => t.id === Number(params.id));
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { API_BASE } from '@/lib/config';
|
||||
|
||||
export async function generateStaticParams() {
|
||||
try {
|
||||
const base = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000';
|
||||
const res = await fetch(`${base}/api/v1/tools`);
|
||||
const res = await fetch(`${API_BASE}/tools`);
|
||||
const data = await res.json();
|
||||
const items = data.items || [];
|
||||
if (items.length === 0) return [{ id: '1' }];
|
||||
|
||||
Reference in New Issue
Block a user