- Added a new visitor chat API endpoint (`/api/chat/visitor`) to allow unauthenticated users to engage in conversations without requiring customer data. - Introduced a visitor context dependency to manage visitor interactions seamlessly. - Enhanced the chat API to support explicit session termination and improved response handling for customer service interactions. - Updated the database configuration to include Redis client support for caching visitor data. - Added a new customer note repository to persist user notes independently of the L1 profile slots. This update significantly improves the customer service experience by enabling visitor interactions and ensuring efficient data handling for both registered and unregistered users.
47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
# JinRong Web
|
||
|
||
React 19 + Vite 8 + Ant Design 6 + **Tailwind CSS v4** · HashRouter · 联调本机 FastAPI。
|
||
|
||
**现状(2026-09-09):** 「静奢智能」视觉层 + 四角色 Dashboard 首页(真接平台读 API);Chat/SSE、共享行情页、risk 处置 UI 待接。
|
||
|
||
**交接手册(改前端必读):** [`docs/frontend/FRONTEND-HANDOFF.md`](../docs/frontend/FRONTEND-HANDOFF.md)
|
||
|
||
## 启动
|
||
|
||
```bash
|
||
# 终端 1:后端(仓库根)
|
||
uvicorn app.main:app --reload
|
||
|
||
# 终端 2:前端
|
||
cd web
|
||
npm install # 首次或 package.json 变更后(含 tailwindcss / @tailwindcss/vite)
|
||
npm run dev
|
||
```
|
||
|
||
浏览器:`http://127.0.0.1:5173/#/login` · 业务路由示例 `/#/app/customer/home`
|
||
|
||
## 验证
|
||
|
||
```bash
|
||
npm run build
|
||
npm run test # 14 例 Vitest
|
||
npm run lint # oxlint(现有 hooks Fast Refresh 警告可忽略,见交接手册 §9)
|
||
```
|
||
|
||
## 技术要点
|
||
|
||
| 项 | 说明 |
|
||
| --- | --- |
|
||
| 样式 | `src/styles/tokens.css` 设计令牌 + Tailwind utility;**勿在页面硬编码品牌色** |
|
||
| 分层 | `pages → hooks/api/utils` · `components/ui` 禁止 import API/auth |
|
||
| 代理 | Vite `/api` → `http://127.0.0.1:8000` |
|
||
| 收益色 | 正收益朱砂红、负值翡翠绿(产品约定,勿反转) |
|
||
|
||
## 装饰素材
|
||
|
||
| 文件 | 用途 |
|
||
| --- | --- |
|
||
| `public/assets/brand/logo-mark.svg` | Header / 登录 Logo |
|
||
| `public/assets/illustrations/login-finance.svg` | 登录页插画 |
|
||
| `public/assets/illustrations/empty-*.svg` | Empty / 占位 |
|