Web 端数据交互与 design2 布局修复

统一门户 JSON 契约:新增 GET /templates/{id},模板/云文件/保存/打开走虚拟 key;
layer 保存弹层替代 prompt,本地 .soon 已登录后台 POST 登记;修复保存静默失败与 design2 全宽布局。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24kycj
2026-06-09 01:20:34 +08:00
parent ebe191b06d
commit 877fd278c2
27 changed files with 1232 additions and 326 deletions
@@ -44,6 +44,20 @@ final class FileController
Json::ok(FileService::create($u['id'], $name, $json));
}
public function show(int $id): void
{
$u = Auth::require();
$row = FileService::fetch($u['id'], $id);
Json::ok([
'id' => (int)$row['id'],
'name' => (string)$row['name'],
'version' => (int)$row['version'],
'size' => (int)$row['size'],
'updated_at' => $row['updated_at'],
'json' => (string)$row['json'],
]);
}
public function update(int $id): void
{
$u = Auth::require();