40 lines
952 B
HTML
40 lines
952 B
HTML
<!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> |