mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-02 23:23:28 +08:00
69 lines
1.7 KiB
HTML
69 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Document</title>
|
||
<style>
|
||
a,
|
||
a:visited {
|
||
color: blue;
|
||
margin: 20px;
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
<div id="container">
|
||
|
||
</div>
|
||
<script>
|
||
var links = [
|
||
{
|
||
url: 'http://localhost/',
|
||
title: 'Home'
|
||
},
|
||
"<hr>",
|
||
{
|
||
url: 'http://localhost/api/swagger-ui.html',
|
||
title: 'Swagger'
|
||
},
|
||
{
|
||
url: 'http://localhost/api/',
|
||
title: 'API'
|
||
},
|
||
{
|
||
url: 'http://localhost/api/book/get?id=1',
|
||
title: 'API测试:Book'
|
||
},
|
||
"<hr>",
|
||
{
|
||
url: 'http://localhost/nginx_status',
|
||
title: 'Nginx Status'
|
||
},
|
||
"<hr>",
|
||
{
|
||
url: 'http://fanyi.youdao.com/',
|
||
title: '有道翻译'
|
||
},
|
||
{
|
||
url: 'http://fanyi.baidu.com/',
|
||
title: '百度翻译'
|
||
},
|
||
]
|
||
|
||
var html = '';
|
||
links.forEach(function (link) {
|
||
if (typeof link === 'object') {
|
||
html += '<p>' + link.title + '<a href="' + link.url + '" target="_blank">' + link.url + '</a></p>';
|
||
} else if (typeof link === 'string') {
|
||
html += link;
|
||
}
|
||
});
|
||
document.getElementById('container').innerHTML = html;
|
||
</script>
|
||
</body>
|
||
|
||
</html> |