feat: 支付闭环 + 运营助手 Tool Calling + 管理后台完善

- 支付系统:微信支付 mock 自动完成、NATIVE 扫码支付、JSAPI 集成
- 运营助手:Tool Calling 架构,19 个可执行工具,AI 驱动操作
- 角色管理:表格布局 + Dialog 表单 + 权限勾选
- 配置统一:config.ts 单一数据源
- API 审计:补齐 status toggle / comments 端点
- 暗黑模式硬件编码颜色全部替换为 CSS 变量
This commit is contained in:
yuzhiran-dev
2026-05-20 18:29:00 +08:00
parent 728edc59ef
commit 23edb74bce
76 changed files with 1589 additions and 473 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const API_BASE = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api/v1';
import { API_BASE } from '@/lib/config';
export function getToken(): string | null {
if (typeof window === 'undefined') return null;
+7
View File
@@ -0,0 +1,7 @@
export const API_BASE = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:4000/api/v1';
export const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://yuzhiran.com';
export const SITE_NAME = process.env.NEXT_PUBLIC_SITE_NAME || '宇之然 AI';
export const WX_APPID = process.env.NEXT_PUBLIC_WX_APPID || '';
+3 -1
View File
@@ -7,7 +7,9 @@ export interface ModelOption {
export const AVAILABLE_MODELS: ModelOption[] = [
{ id: 'general', label: '通用模式', provider: 'OpenAI 兼容', desc: '日常问答,综合能力均衡' },
{ id: 'opencode-go', label: 'DeepSeek V4 Flash', provider: 'OpenCode Go', desc: '高速推理,代码生成强' },
{ id: 'deepseek-v4-flash', label: 'DeepSeek V4 Flash', provider: '商汤科技', desc: '高速推理,代码生成强' },
{ id: 'sensenova-6.7-flash-lite', label: 'SenseNova 6.7 Flash Lite', provider: '商汤科技', desc: '轻量快速,日常使用' },
{ id: 'sensenova-u1-fast', label: 'SenseNova U1 Fast', provider: '商汤科技', desc: '高性能推理,复杂任务' },
];
export const DEFAULT_MODEL = 'general';
+15
View File
@@ -0,0 +1,15 @@
export function isWeChatBrowser(): boolean {
if (typeof window === 'undefined') return false;
return /MicroMessenger/i.test(navigator.userAgent);
}
export function getOpenidFromUrl(): string | null {
if (typeof window === 'undefined') return null;
const params = new URLSearchParams(window.location.search);
return params.get('openid');
}
export function isMiniProgram(): boolean {
if (typeof window === 'undefined') return false;
return /miniProgram/i.test(navigator.userAgent) || !!getOpenidFromUrl();
}