> 2026-10-29:已按 `Downloads/getbusiness` 原型恢复页面结构和主要交互,保留真实后端。逐页对照、验收截图及发布注意事项见 [原型一致性验收](docs/原型一致性验收.md)。新增手动项目保存接口需与前端同步更新后端。 # 如昼商机助手前端 D1–D2 已接入会话登录、手填档案、分页检索与获客报告、平台市场聚合、检索方案快照、八状态关注与标签。发现商机与重点关注只读取后端事实;对话调研继续按 D3 计划接入,仍明确标注原型。真实 MySQL 与供应商联调待配置后验收。 ```sh npm ci npm run dev ``` 默认端口 3000,`/api` 代理到 `http://127.0.0.1:8240`。后端按相邻 `rz-GB/README.md` 配置并启动;前端不需要任何 API Key,也不要配置 `VITE_*_API_KEY`。 - 登录使用预设 `admin` 和后端初始化密码;浏览器只保存 HttpOnly 会话 Cookie,不再认可旧 `rz-authed`。 - 公司档案从服务端加载,保存失败或版本冲突不会显示成功;八组表单支持手填及 TXT / Markdown 本地字段识别,导入需先核对再写入表单,最后显式保存;介绍文件不上传给供应商。 - “服务验证”按单个动作创建任务。缺凭证时等待配置,补充环境并重启后端后可继续;历史任务重放不会重复收费。 - “发现商机”默认全国近 90 天,普通检索按发布时间,获客偏好不删除候选;临时偏好视图不发起外部请求。区域市场分别展示平台聚合与已读样本。 - 方案保存不执行;手动执行使用部署预算上限、保存时的具体日期,并冻结方案/档案版本和有序结果。 - 关注状态与备注一次提交,单独修改备注也留痕;版本冲突拒绝覆盖;取消关注需确认,标签全局删除自动解绑。 - 列表摘要为已有原文规则摘录;缺正文如实提示。右侧 AI 面板展示已有摘要,提交问题才创建问答任务;了解采购方/深入研判进入对应调研表单,显式提交后执行。 - D2 契约、39 项后端测试及浏览器夹具验收见相邻 `rz-GB/docs/D2实施与验收.md`。 - `npm run build` 校验 TypeScript 并打包;`npm run lint` 仍存在原型遗留问题,详见后端 `docs/D1实施与验收.md`。生产部署需要配置同源 `/api` 反向代理和前端路由回退,不能只双击 `dist/index.html`。 以下保留原模板技术说明。 # React + TypeScript + Vite This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. Currently, two official plugins are available: - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh ## React Compiler The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). ## Expanding the ESLint configuration If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: ```js export default defineConfig([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Remove tseslint.configs.recommended and replace with this tseslint.configs.recommendedTypeChecked, // Alternatively, use this for stricter rules tseslint.configs.strictTypeChecked, // Optionally, add this for stylistic rules tseslint.configs.stylisticTypeChecked, // Other configs... ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: ```js // eslint.config.js import reactX from 'eslint-plugin-react-x' import reactDom from 'eslint-plugin-react-dom' export default defineConfig([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]) ``` ## D3 企业与项目调研 对话调研已接入研究客户、研究竞对(单/双公司)、区域市场和投标项目四入口。页面读取后端真实 SSE;主体歧义、预算暂停需显式确认,取消不会清除已发生费用。获客结果的了解采购方/深入研判创建对象关联子任务,点击前不深查。 投标文件只发送同源 `/api/files`,保留 multipart boundary、会话与 CSRF;必要正文和扫描页由后端发送 DeepSeek,不向公开搜索传文件全文。页面展示来源、文件定位、实际调用与模型 token;原件删除不等于删除报告摘录。 运行 `npm run build` 和本次改动文件 ESLint 已通过;浏览器在 H2 + 本地模拟 HTTP 环境验证候选确认、预算恢复、市场跳转、对象深挖和文件上传。真实 MySQL/知了/DeepSeek 尚待配置后验收。后端详细记录:[D3 实施与验收](../rz-GB/docs/D3实施与验收.md)。 D4 历史会话和单项目/整批提问均由后端保存。发现商机的“基于整批结果提问”覆盖该批全部已读候选,来源、日期、覆盖范围与实际模型 token 可回查。调研会话支持服务端搜索、改名、删除;删除范围在界面确认。构建与部署详见后端 `docs/接口契约与运行交付.md`。开发代理可设置 `API_PROXY_TARGET`,不在浏览器配置供应商密钥。