增加了api文档

This commit is contained in:
2026-09-01 18:17:37 +08:00
parent e0e57a7eb4
commit 73e770db80
25 changed files with 913 additions and 140 deletions
+40
View File
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>API 文档</title>
<link rel="stylesheet" href="swagger-ui.css">
<style>
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
body {
margin: 0;
background: #fafafa;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="swagger-ui-bundle.js"></script>
<script>
window.onload = function () {
var path = window.location.pathname;
var match = path.match(/\/([^\/]+)\.html$/);
var id = match ? match[1] : 'api';
SwaggerUIBundle({
url: id + '.json',
dom_id: '#swagger-ui',
deepLinking: true,
presets: [SwaggerUIBundle.presets.apis]
});
};
</script>
</body>
</html>