You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.7 KiB
96 lines
3.7 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>3D MODELS SYSTEM - HOME</title>
|
|
<!-- jquery -->
|
|
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
|
|
<!-- ZUI -->
|
|
<link rel="stylesheet" href="https://cdn.bootcss.com/zui/1.8.1/css/zui.min.css">
|
|
<script src="https://cdn.bootcss.com/zui/1.8.1/js/zui.min.js"></script>
|
|
<style>
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
#container {
|
|
position: absolute;
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
#output {
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body background='/img/webbg.jpg'>
|
|
<div class="container">
|
|
<nav class="navbar navbar-inverse" role="navigation" style="margin-top:10px">
|
|
<div class="container-fluid">
|
|
<!-- 导航头部 -->
|
|
<a class="navbar-brand" href="">3D MODELS SYSTEM</a>
|
|
<!-- 导航项目 -->
|
|
<div class="collapse navbar-collapse navbar-collapse-example">
|
|
<!-- 右侧的导航项目 -->
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li><a href="/create"><i class="icon icon-plus"></i> 添加新方案</a></li>
|
|
<li class="dropdown">
|
|
<a class="dropdown-toggle" data-toggle="dropdown"><b id='name'>xxx</b>
|
|
<b class="caret"></b></a>
|
|
<ul class="dropdown-menu" role="menu">
|
|
<li><a href="#">用户信息管理</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="/logout">注销</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div id='schemeList'>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$().ready(function () {
|
|
initPage();
|
|
});
|
|
|
|
//初始化页面
|
|
function initPage() {
|
|
$.post('/home', function (data) {
|
|
console.info(data);
|
|
$('#name').text(data.user.name);
|
|
// <div class="col-md-4 col-sm-6 col-lg-3">
|
|
// <a class="card" href="###">
|
|
// <img src="" alt="xxx">
|
|
// <div class="card-heading"><strong>xxx</strong></div>
|
|
// <div class="card-actions">
|
|
// <div class="pull-right"> <button type="button" class="btn btn-primary"><i class="icon-heart"></i>
|
|
// 分享</button></div>
|
|
// </div>
|
|
// </a>
|
|
// </div >
|
|
for (index in data.schemeList) {
|
|
var href = '/create/' + data.schemeList[index].id;
|
|
var name = data.schemeList[index].name;
|
|
var img = data.schemeList[index].img;
|
|
var id = data.schemeList[index].id;
|
|
$('#schemeList').append("<div class='col-md-4 col-sm-6 col-lg-3'><a class='card' href='" + href + "'><div class='media-wrapper'><img style='width:100%' src='" + img + "' alt='" + name + "'></div><div class='card-heading'><strong>" + name + "</strong></div><div class='card-actions'><div class='pull-right'> <button type='button' class='btn btn-primary' onclick='share(" + id + ")'><i class='icon-heart'></i> 分享</button></div></div></a></div >");
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |