实现 P0 自动分配、离线留言与可嵌入 Widget SDK

- 会话创建时按负载自动分配在线客服,无客服则进入离线模式
- 新增 /api/widget/leave-message 沉淀联系方式与留言事件
- 访客端离线留言表单;工作台展示离线留言/自动分配事件
- 提供 public/widget.js + /widget/embed 嵌入方案
This commit is contained in:
yml2213
2026-07-15 11:09:50 +08:00
parent d105840b1f
commit 9485c28abd
11 changed files with 930 additions and 282 deletions
+2
View File
@@ -17,6 +17,7 @@ const Tenants = lazy(() => import('@/pages/admin/Tenants'))
const Plans = lazy(() => import('@/pages/admin/Plans'))
const Ops = lazy(() => import('@/pages/admin/Ops'))
const WidgetPreview = lazy(() => import('@/pages/WidgetPreview'))
const WidgetEmbed = lazy(() => import('@/pages/WidgetEmbed'))
const loading = (
<div className="h-full flex items-center justify-center">
@@ -31,6 +32,7 @@ function Lazy({ children }: { children: React.ReactNode }) {
export const router = createBrowserRouter([
{ path: '/login', element: <Lazy><Login /></Lazy> },
{ path: '/widget/preview', element: <Lazy><WidgetPreview /></Lazy> },
{ path: '/widget/embed', element: <Lazy><WidgetEmbed /></Lazy> },
{
path: '/',
element: <RequireAuth />,