Commit 00b67cb4 by 郑国强

updata 14.52

parent ae38de28
body { body {
...@@ -9,12 +9,16 @@ body { ...@@ -9,12 +9,16 @@ body {
} }
header { header {
position: fixed;
margin: 0 auto; margin: 0 auto;
/* width: 1920px; */ width: 100%;
top: 0%;
background-color: rgba(44, 62, 90, 0.9); background-color: rgba(44, 62, 90, 0.9);
z-index: 90;
} }
.nav { .nav {
/* position: fixed; */
display: flex; display: flex;
margin: 0 auto; margin: 0 auto;
width: 1300px; width: 1300px;
......
.search_logo, .search_logo,
...@@ -12,14 +12,16 @@ ...@@ -12,14 +12,16 @@
.search_type { .search_type {
position: absolute; position: absolute;
left: 6%; left: 7%;
top: 77%; top: 77%;
width: 109px; width: 100px;
height: 66px; height: 66px;
background-color: rgb(64, 114, 184); background-color: rgb(64, 114, 184);
border: 1px solid black; border: 1px solid black;
font-size: 30px; font-size: 30px;
/* border-radius: 10px; */ border-radius: 15px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
text-align: center; text-align: center;
} }
.search_logo img { .search_logo img {
...@@ -71,6 +73,7 @@ ...@@ -71,6 +73,7 @@
justify-content: flex-start; justify-content: flex-start;
background-color: rgb(0, 0, 0, 0.01); background-color: rgb(0, 0, 0, 0.01);
border-radius: 10px; border-radius: 10px;
margin-top: 50px;
} }
.show_books .show_book { .show_books .show_book {
width: 30%; width: 30%;
...@@ -125,20 +128,20 @@ ...@@ -125,20 +128,20 @@
.book_model { .book_model {
/* display: flex; */ /* display: flex; */
position: fixed; position: fixed;
top: 0%; top: 15%;
left: 0%; left: 15.4%;
width: 100%; width: 70%;
height: 100%; height: 70%;
background-color: rgba(0, 0, 0, 0.5); border: 5px #4072b8 solid;
box-shadow: 0px 0px 20px #4072b8;
z-index: 100; z-index: 100;
/* transition: display ease-in-out 1s; */ overflow: hidden;
border-radius: 15px;
} }
.book_model img { .book_model img {
position: absolute; position: absolute;
top: 5%; width: 55%;
left: 5%; height: 100%;
width: 40%;
height: 80%;
} }
.book_detail { .book_detail {
position: absolute; position: absolute;
...@@ -147,21 +150,20 @@ ...@@ -147,21 +150,20 @@
flex-direction: column; flex-direction: column;
letter-spacing: 0.1px; letter-spacing: 0.1px;
font-size: 1.5vw; font-size: 1.5vw;
top: 5%; top: 0%;
right: 15%; right: 0%;
width: 40%; width: 45%;
height: 80%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 2vw; padding: 2vw;
background-color: rgba(0, 0, 0, 0.8); background-color: rgba(255, 255, 255, 1);
color: #fff;
} }
.detail_close { .detail_close {
position: absolute; position: absolute;
font-size: 50px; font-size: 50px;
color: white; color: rgba(0, 0, 0, 0.8);
right: 2%; right: 2%;
top: 2%; top: 1%;
cursor: pointer; cursor: pointer;
} }
.detail_btn { .detail_btn {
...@@ -194,3 +196,6 @@ ...@@ -194,3 +196,6 @@
border-bottom: 2px solid #4072b8; border-bottom: 2px solid #4072b8;
transition: all 0.1s; transition: all 0.1s;
} }
.blur {
filter: blur(10px);
}
class navigation { class navigation {
...@@ -155,13 +155,14 @@ class searchResult { ...@@ -155,13 +155,14 @@ class searchResult {
if(e.target.className.indexOf('no')!==-1){ if(e.target.className.indexOf('no')!==-1){
alert('这本书借完啦,过段时间再来吧!'); alert('这本书借完啦,过段时间再来吧!');
} else { } else {
$('header,footer,.search_logo,.show_books').addClass('blur')
$('.book_model')[index].style.display='block'; $('.book_model')[index].style.display='block';
document.body.style.overflow = "hidden" document.body.style.overflow = "hidden"
} }
}) })
$('.detail_close').click((e)=>{ $('.detail_close').click((e)=>{
let index = $("[class*='detail_close']").index(e.target); let index = $("[class*='detail_close']").index(e.target);
$('header,footer,.search_logo,.show_books').removeClass('blur')
$('.book_model')[index].style.display='none'; $('.book_model')[index].style.display='none';
document.body.style.overflow = "" ; document.body.style.overflow = "" ;
}) })
...@@ -358,14 +359,14 @@ let axiospost = axios.create({ ...@@ -358,14 +359,14 @@ let axiospost = axios.create({
post.searchType = parm1??$('.search_type')[0].value; post.searchType = parm1??$('.search_type')[0].value;
post.searchValue= parm2??$('.search_search')[0].value; post.searchValue= parm2??$('.search_search')[0].value;
if(!count) { if(!count) {
count++; count++;
return } else if(post.searchValue==''){
}
if(post.searchValue==''){
alert("请输入相关信息"); alert("请输入相关信息");
return return
} }
localStorage.removeItem('searchType'); localStorage.removeItem('searchType');
localStorage.removeItem('searchValue'); localStorage.removeItem('searchValue');
...@@ -374,8 +375,10 @@ let axiospost = axios.create({ ...@@ -374,8 +375,10 @@ let axiospost = axios.create({
data:post, data:post,
url:'/search' url:'/search'
}).then(response=>{ }).then(response=>{
// console.log(count===1)
if(count===1){
if($.isEmptyObject(response.data)){ }else if($.isEmptyObject(response.data)){
alert('书院暂无此书'); alert('书院暂无此书');
return ; return ;
} }
...@@ -396,9 +399,9 @@ let axiospost = axios.create({ ...@@ -396,9 +399,9 @@ let axiospost = axios.create({
$('.btn_search')[0].onclick = btn_search; $('.btn_search')[0].onclick = btn_search;
window.onload=function(){ window.onload=function(){
let e=null let e=null
let parm1,parm2; let parm1='allBook',parm2='高等数学';
parm1 =localStorage.getItem('searchType'); // parm1 =localStorage.getItem('searchType');
parm2 =localStorage.getItem('searchValue'); // parm2 =localStorage.getItem('searchValue');
btn_search(e,parm1,parm2); btn_search(e,parm1,parm2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment