引入后端API项目并重构前后端桥接与路由
本次提交新增了 Avalonia-API(Web API)与 Avalonia-Services(业务服务)两个项目,完善了解决方案结构。重构了 Avalonia-PC 前端与后端的桥接逻辑,实现了基于前缀的路由分发、静态服务、开发者工具等功能。同步更新了 .gitignore、api.js 及相关配置文件,为后续业务扩展和维护打下基础。
This commit is contained in:
@@ -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 } })
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user