This commit is contained in:
2025-12-26 18:13:15 +08:00
parent 66e6370013
commit 413c147109
32 changed files with 2449 additions and 205 deletions

View File

@@ -0,0 +1,16 @@
import { app, core } from "../../app.ts";
app.route({
path: 'page',
key: 'go',
middleware: ['auth']
}).define(async (ctx) => {
const url = ctx.query?.url as string;
if (!url) {
ctx.throw!(400, '缺少 url 参数');
}
const page = await core.getPage();
await page.goto(url);
ctx.body = { success: true, message: `已导航到 ${url}` };
}).addTo(app);