wanshenmean
2026-03-13 d216edd0e9931d71664f33e625cff6d8131a0fad
分支
用户 wanshenmean <cathay_xy@163.com>
星期五, 三月 13, 2026 16:00 +0800
提交者 wanshenmean <cathay_xy@163.com>
星期五, 三月 13, 2026 16:00 +0800
提交d216edd0e9931d71664f33e625cff6d8131a0fad
目录 9fb9f0c8a250983a531aed17fbaf7e2a3dd11e99 目录 | zip | gz
上一版本 0dbc8273bdfbcabcc4b770546245f6b17d787de9 查看 | 对比
重构: 实现前后端分离架构

- 创建 ApiHttpClient 服务类用于前端调用后端 API
- 添加 BasePageModel 基类统一处理 API 基础地址
- 更新所有页面模型使用 ApiHttpClient 替代 IHttpClientFactory
- Web/Program.cs 移除核心服务注册,只保留 UI 相关服务
- Server 项目添加 CORS 支持和 launchSettings.json
- 移除 Web 项目对 Server 项目的引用
- 修复 Program.cs 中的 using 指令 typo
- 更新前端 JavaScript 使用配置的 API 基础地址

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
已添加5个文件
已修改19个文件
897 ■■■■ 文件已修改
Code/WCS/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.backup.json 56 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/.vs/WIDESEAWCS_S7Simulator.slnx/v18/DocumentLayout.json 56 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Core/Entities/InstanceConfig.cs 16 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Core/Entities/MemoryRegionConfig.cs 16 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Core/Persistence/FilePersistenceService.cs 36 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Core/Server/S7ServerInstance.cs 117 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Controllers/SimulatorInstancesController.cs 50 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Program.cs 40 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/launchSettings.json 21 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Data/instance-GWSC1/config.json 17 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Data/instance-GWSC1/memory.json 10 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/BasePageModel.cs 35 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/Create.cshtml.cs 25 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/Details.cshtml.cs 34 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/Edit.cshtml.cs 77 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/Index.cshtml 41 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/Index.cshtml.cs 8 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Pages/Shared/_Layout.cshtml 5 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Program.cs 22 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/Services/ApiHttpClient.cs 175 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/WIDESEAWCS_S7Simulator.Web.csproj 1 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/appsettings.json 3 ●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/wwwroot/css/site.css 14 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web/wwwroot/js/site.js 22 ●●●●● 对比 | 查看 | 原始文档 | blame | 历史