@ -8,27 +8,72 @@
< script src = "bootstrap-3.3.4/dist/js/jquery-1.11.3.min.js" > < / script >
< script src = "bootstrap-3.3.4/dist/js/bootstrap.min.js" > < / script >
< script src = "Flat-UI-master/dist/js/flat-ui.min.js" > < / script >
< script src = "https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.0.js" > < / script >
< title > 主页< / title >
< style >
.row{
margin-top: 20px;;
.row {
margin-top: 20px;;
}
.center{
.center {
text-align: center;
}
.pagination{
.pagination {
background: #cccccc;
}
< / style >
< script >
$(function(){
$('#myTabs a').click(function (e) {
$(this).tab('show')
});
})
< / script >
< / head >
< body >
< script >
$(function () {
// 发一个请求给后端, 让后端看看有没有session
$.ajax({
url:"/user/check",
success: function (data) {
if(data["flag"] < 0 ) {
// 还没登录
$("#logout").hide();
}else{
// 已经登录了
$("#register").hide();
$("#login").hide();
}
},
error: function () {
console.log("error");
}
});
// 点了注销会发生什么
$("#logout").click(function () {
$("#logout").hide();
$("#register").show();
$("#login").show();
$.ajax({
url:"/user/logout",
success: function (data) {
console.log("log out success")
},
error: function () {
console.log("error");
}
});
});
})
< / script >
<!-- Static navbar -->
< div class = "navbar navbar-default navbar-static-top" role = "navigation" >
< div class = "container" >
@ -46,16 +91,23 @@
< li > < a href = "FriendLink.html" > 友情链接< / a > < / li >
< / ul >
< ul class = "nav navbar-nav navbar-right hidden-sm" >
< li > < a href = "Login.html" > 登录< / a > < / li >
< li > < a href = "Register.html" > 注册< / a > < / li >
< li > < a id = "login" href = "Login.html" > 登录< / a > < / li >
< li > < a id = "register" href = "Register.html" > 注册< / a > < / li >
< li > < a id = "logout" href = "#" > 注销< / a > < / li >
< li >
< a href = "Cart.html" > < span class = "glyphicon glyphicon-shopping-cart" > 购物车< / span > < / a > < / li >
< a href = "Cart.html" > < span class = "glyphicon glyphicon-shopping-cart" > 购物车< / span > < / a >
< / li >
< / ul >
< / div > <!-- /.nav - collapse -->
< / div >
< / div >
< / div >
<!-- content -->
< div class = "container" >
< div class = "jumbotron" >
< h1 > 图书商城< / h1 >
< p > ...< / p >
@ -63,19 +115,24 @@
< / div >
< ul class = "nav nav-tabs" id = "myTabs" >
< li class = "active" > < a href = "#" > 计算机 < / a > < / li >
< li > < a href = "#" > 都市言情 < / a > < / li >
< li > < a href = "#" > 军事科技 < / a > < / li >
< li > < a href = "#" > 历史人文 < / a > < / li >
< li > < a href = "#" > 都市言情 < / a > < / li >
< li > < a href = "#" > 军事科技 < / a > < / li >
< li > < a href = "#" > 历史人文 < / a > < / li >
< li class = "active" > < a href = "#" > 默认排序 < / a > < / li >
< li > < a href = "#" > 浏览量从高到低 < / a > < / li >
< li > < a href = "#" > 浏览量从低到高 < / a > < / li >
< li > < a href = "#" > 更新时间从新到老 < / a > < / li >
< li > < a href = "#" > 更新时间从老到新 < / a > < / li >
< li > < a href = "#" > 价格从小到大 < / a > < / li >
< li > < a href = "#" > 价格从大到小 < / a > < / li >
< / ul >
<!-- 订单详情页 -->
< div class = "row" >
< div class = "col-sm-4 col-md-3" >
< div class = "thumbnail" >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200" src = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" data-src = "holder.js/100%x200" data-holder-rendered = "true" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="
data-src="holder.js/100%x200" data-holder-rendered="true">
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
@ -85,21 +142,25 @@
< / div >
< / div >
< div class = "col-sm-4 col-md-3" >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200" src = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" data-src = "holder.js/100%x200" data-holder-rendered = "true" >
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
< p > < span > 价格:< / span > < span > 100.00< / span > < / p >
< p > < a class = "btn btn-primary btn-block" role = "button" href = "#" > 查看详情< / a > < / p >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="
data-src="holder.js/100%x200" data-holder-rendered="true">
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
< p > < span > 价格:< / span > < span > 100.00< / span > < / p >
< p > < a class = "btn btn-primary btn-block" role = "button" href = "#" > 查看详情< / a > < / p >
< / div >
< / div >
< / div >
< / div >
< div class = "col-sm-4 col-md-3" >
< div class = "thumbnail" >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200" src = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" data-src = "holder.js/100%x200" data-holder-rendered = "true" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="
data-src="holder.js/100%x200" data-holder-rendered="true">
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
@ -109,9 +170,11 @@
< / div >
< / div >
< div class = "col-sm-4 col-md-3" >
< div class = "thumbnail" >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200" src = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" data-src = "holder.js/100%x200" data-holder-rendered = "true" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="
data-src="holder.js/100%x200" data-holder-rendered="true">
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
@ -121,32 +184,36 @@
< / div >
< / div >
< div class = "col-sm-4 col-md-3" >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200" src = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" data-src = "holder.js/100%x200" data-holder-rendered = "true" >
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
< p > < span > 价格:< / span > < span > 100.00< / span > < / p >
< p > < a class = "btn btn-primary btn-block" role = "button" href = "#" > 查看详情< / a > < / p >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="
data-src="holder.js/100%x200" data-holder-rendered="true">
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
< p > < span > 价格:< / span > < span > 100.00< / span > < / p >
< p > < a class = "btn btn-primary btn-block" role = "button" href = "#" > 查看详情< / a > < / p >
< / div >
< / div >
< / div >
< / div >
< div class = "col-sm-4 col-md-3" >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200" src = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg==" data-src = "holder.js/100%x200" data-holder-rendered = "true" >
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
< p > < span > 价格:< / span > < span > 100.00< / span > < / p >
< p > < a class = "btn btn-primary btn-block" role = "button" href = "#" > 查看详情< / a > < / p >
< div class = "thumbnail" >
< a href = "BookInfo.html" >
< img style = "width: 100%; height: 200px; display: block;" alt = "100%x200"
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNDggMjAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIG1lZXQiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIj48ZGVmcyAvPjxyZWN0IGZpbGw9IiNlZWVlZWUiIHdpZHRoPSIzNDgiIGhlaWdodD0iMjAwIiAvPjxnPjx0ZXh0IHN0eWxlPSJmb250LWZhbWlseTogQXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7IGZvbnQtc2l6ZTogMjJweDsgZm9udC13ZWlnaHQ6IGJvbGQ7IGRvbWluYW50LWJhc2VsaW5lOiBjZW50cmFsOyBmaWxsOiAjYWFhYWFhOyIgeD0iMTMxLjE2IiB5PSIxMDAiPjM0OHgyMDA8L3RleHQ+PC9nPjwvc3ZnPg=="
data-src="holder.js/100%x200" data-holder-rendered="true">
< / a >
< div class = "caption center" >
< h3 > 书名< / h3 >
< p > < span > 价格:< / span > < span > 100.00< / span > < / p >
< p > < a class = "btn btn-primary btn-block" role = "button" href = "#" > 查看详情< / a > < / p >
< / div >
< / div >
< / div >
< / div >
< / div >
<!-- 分页 -->
< nav class = "center" >
< ul class = "pagination pagination-lg" >
< li >
@ -169,9 +236,11 @@
< / div >
<!-- footer -->
< div class = "navbar navbar-default navbar-static-bottom" >
版权声明区
< p style = "text-align: center" > 版权声明区< / p >
< / div >
< / body >
< / html >