引入后端API项目并重构前后端桥接与路由

本次提交新增了 Avalonia-API(Web API)与 Avalonia-Services(业务服务)两个项目,完善了解决方案结构。重构了 Avalonia-PC 前端与后端的桥接逻辑,实现了基于前缀的路由分发、静态服务、开发者工具等功能。同步更新了 .gitignore、api.js 及相关配置文件,为后续业务扩展和维护打下基础。
This commit is contained in:
2026-04-23 17:25:31 +08:00
parent 9b90a471c2
commit 506ab4857a
16 changed files with 455 additions and 26 deletions
+1 -1
View File
@@ -45,6 +45,6 @@ async function callApi(endpoint, options = {}) {
}
window.api = {
getUser: () => callApi("getUser"),
getUser: () => callApi("getUser?t=1"),
processData: (input) => callApi("processData", { method: "POST", body: { input } })
};