finai/frontend
shijing bcbb3615b5 feat:仓库命名统一 2026-07-10 11:11:29 +08:00
..
app chore: initial commit 2026-07-09 14:26:05 +08:00
src chore: initial commit 2026-07-09 14:26:05 +08:00
.gitignore chore: initial commit 2026-07-09 14:26:05 +08:00
README.md chore: initial commit 2026-07-09 14:26:05 +08:00
index.html chore: initial commit 2026-07-09 14:26:05 +08:00
package-lock.json feat:仓库命名统一 2026-07-10 11:11:29 +08:00
package.json feat:仓库命名统一 2026-07-10 11:11:29 +08:00
vite.config.js chore: initial commit 2026-07-09 14:26:05 +08:00

README.md

财务大模型智能问答客服系统前端

本目录包含两套实现:

  • app/:原零构建 HTML + 原生 JS 版本,保留作为快速演示和参考。
  • 当前目录Vite + Vue 3长期演进版本便于扩展更多模块。

Vite + Vue 3 版本

启动

cd code/frontend
npm install
npm run dev

默认监听 http://127.0.0.1:5173

后端按原方式启动:

cd code/backend
python -m uvicorn app.main:app --reload --host 127.0.0.1 --port 8000

目录结构

code/frontend/
├── app/                  # 旧版零构建实现(保留)
├── index.html            # Vite 入口
├── package.json
├── vite.config.js
└── src/
    ├── main.js
    ├── App.vue
    ├── router/           # vue-router 路由表
    ├── stores/           # Pinia 全局状态apiBase / token / 健康检查)
    ├── api/              # fetch 封装
    ├── components/       # Sidebar / Topbar / LoginPanel / Toast
    ├── views/            # ChatView / DocumentsView / AuditView占位待迁移
    └── styles/main.css   # 待从 app/style.css 迁移

迁移建议

  1. app/style.css 整体合入 src/styles/main.css,确认视觉一致。
  2. 按视图把 app/app.js 中的请求、SSE、列表渲染逻辑挪入对应 views/*.vue
  3. 共用逻辑(如 SSE 解析、文档上传)提取到 src/composables/
  4. 视图稳定后即可删除 app/,或保留作为静态降级方案。