Commit d380c961 by 郑国强

updata

parent 6eaaabef
.search_logo, .search_logo,
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.search_type { .search_type {
position: absolute; position: absolute;
left: 7%; left: 6.8%;
top: 77%; top: 77%;
width: 100px; width: 100px;
height: 66px; height: 66px;
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
border-top-right-radius: 0px; border-top-right-radius: 0px;
border-bottom-right-radius: 0px; border-bottom-right-radius: 0px;
text-align: center; text-align: center;
box-shadow: 0px 5px 50px rgba(0, 0, 0, 0.5);
} }
.search_logo img { .search_logo img {
margin: 0 auto; margin: 0 auto;
...@@ -41,6 +42,7 @@ ...@@ -41,6 +42,7 @@
line-height: 66px; line-height: 66px;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.5);
} }
.search_search_focus { .search_search_focus {
border: 2px solid skyblue; border: 2px solid skyblue;
...@@ -61,6 +63,7 @@ ...@@ -61,6 +63,7 @@
background-size: 40%; background-size: 40%;
background-position: center; background-position: center;
cursor: pointer; cursor: pointer;
box-shadow: 5px 5px 50px rgba(0, 0, 0, 0.5);
} }
.btn_search:hover { .btn_search:hover {
background-color: rgb(2, 80, 187); background-color: rgb(2, 80, 187);
...@@ -99,7 +102,7 @@ ...@@ -99,7 +102,7 @@
} }
.show_book .book_name { .show_book .book_name {
text-align: center; text-align: center;
font-size: 30px; font-size: 20px;
} }
.book_recommend { .book_recommend {
color: slategray; color: slategray;
...@@ -149,7 +152,7 @@ ...@@ -149,7 +152,7 @@
justify-content: space-around; justify-content: space-around;
flex-direction: column; flex-direction: column;
letter-spacing: 0.1px; letter-spacing: 0.1px;
font-size: 1.5vw; font-size: 1.2vw;
top: 0%; top: 0%;
right: 0%; right: 0%;
width: 45%; width: 45%;
...@@ -160,7 +163,7 @@ ...@@ -160,7 +163,7 @@
} }
.detail_close { .detail_close {
position: absolute; position: absolute;
font-size: 50px; font-size: 5vw;
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
right: 2%; right: 2%;
top: 1%; top: 1%;
...@@ -182,7 +185,7 @@ ...@@ -182,7 +185,7 @@
.detail_duration { .detail_duration {
width: 10vw; width: 10vw;
height: 2vw; height: 2vw;
font-size: 1.5vw; font-size: 1.2vw;
} }
.show_book .two_menu { .show_book .two_menu {
background-color: #e1eff8; background-color: #e1eff8;
...@@ -199,3 +202,17 @@ ...@@ -199,3 +202,17 @@
.blur { .blur {
filter: blur(10px); filter: blur(10px);
} }
.toTop {
width: 2vw;
height: 2vw;
position: fixed;
right: 5%;
bottom: 15%;
background-image: url("../image/toTop.png");
background-repeat: no-repeat;
background-size: 100%;
z-index: 50;
border-radius: 25px;
border: none;
background-color: rgb(248, 249, 250);
}
class navigation {
class navigation { class navigation {
constructor(obj){ constructor(obj){
this.nav = $('nav')[0] this.nav = $('nav')[0]
...@@ -75,7 +76,7 @@ checkMenu(e,bool){ ...@@ -75,7 +76,7 @@ checkMenu(e,bool){
} }
} }
let axiosget = axios.create({ let axiosget = axios.create({
baseURL: 'http://nhtdfz.natappfree.cc/test//sendborrowapplication', baseURL: 'http://djcj76.natappfree.cc/test/sendborrowapplication',
timeout: 3000, timeout: 3000,
method:'post' method:'post'
}); });
...@@ -84,19 +85,19 @@ let obj = [ ...@@ -84,19 +85,19 @@ let obj = [
{ {
menu:'首页', menu:'首页',
list:[], list:[],
herf:['../index.html'] herf:['../王家齐/index.html']
}, },
{ {
menu:'我的', menu:'我的',
list:[], list:[],
herf:['../index.html#my'] herf:['../王家齐/index.html#my']
}, },
{ {
menu:'热榜', menu:'热榜',
list:[], list:[],
herf:['../index.html#hot-list'] herf:['../王家齐/index.html#hot-list']
}, },
...@@ -104,14 +105,14 @@ let obj = [ ...@@ -104,14 +105,14 @@ let obj = [
{ {
menu:'图书库', menu:'图书库',
list:[], list:[],
herf:['../index.html#book-list'] herf:['../王家齐/index.html#book-list']
}, },
{ {
menu:'用户反馈', menu:'用户反馈',
list:[], list:[],
herf:['../index.html#user-message'] herf:['../王家齐/index.html#user-message']
}, },
...@@ -172,7 +173,7 @@ class searchResult { ...@@ -172,7 +173,7 @@ class searchResult {
let borrowInfor={ let borrowInfor={
username:'zhangshuai2021005731', //用户名 username:'zhangshuai2021005731', //用户名
bookid:'1', bookid:'',
// bookname:'', //书名 // bookname:'', //书名
borrow_date:'',//借阅日期 borrow_date:'',//借阅日期
time:''//借阅时间 time:''//借阅时间
...@@ -204,19 +205,18 @@ class searchResult { ...@@ -204,19 +205,18 @@ class searchResult {
borrowInfor.borrow_date=getDate(); borrowInfor.borrow_date=getDate();
borrowInfor.bookid=this.obj[index].id; borrowInfor.bookid=this.obj[index].book_id;
borrowInfor.bookid="1"; // borrowInfor.bookid="1";
console.log(borrowInfor) console.log(borrowInfor)
// console.log(borrowInfor.bookid) // console.log(borrowInfor.bookid)
axiosget({ axiosget({
// menthod:'get', menthod:'post',
data:borrowInfor data:borrowInfor
}).then(response=>{ }).then(response=>{
console.log(response); // console.log(response);
alert(response.data.message) console.log(response)
},reason=>{ },reason=>{
console.log(reason)
alert(reason.data.message)
}) })
}) })
...@@ -240,9 +240,9 @@ class searchResult { ...@@ -240,9 +240,9 @@ class searchResult {
name.className = 'book_name'; name.className = 'book_name';
name.title= this.obj[i].bookName ; name.title= this.obj[i].bookName ;
filterName =`《 ${this.obj[i].bookName} 》`; filterName =`《 ${this.obj[i].bookName} 》`;
if(this.obj[i].bookName.length>24){ if(this.obj[i].bookName.length>18){
filterName = this.obj[i].bookName.slice(0,15)+'...》'; filterName ="《 "+ this.obj[i].bookName.slice(0,15)+'...》';
} }
name.innerHTML = filterName; name.innerHTML = filterName;
...@@ -294,11 +294,14 @@ class searchResult { ...@@ -294,11 +294,14 @@ class searchResult {
let recommend = document.createElement('span'); let recommend = document.createElement('span');
recommend.className = 'detail_recommend'; recommend.className = 'detail_recommend';
if(this.obj[i].recommend.length>200){
this.obj[i].recommend
}
recommend.innerHTML=`书籍推荐: ${this.obj[i].recommend}`; recommend.innerHTML=`书籍推荐: ${this.obj[i].recommend}`;
// //
let number = document.createElement('span'); let number = document.createElement('span');
number.className = 'detail_number'; number.className = 'detail_number';
number.innerHTML=`图书库存: ${this.obj[i].current_number??0} `; number.innerHTML=`图书库存: ${this.obj[i].currrent_number}本 `;
// //
let position = document.createElement('span'); let position = document.createElement('span');
position.className = 'detail_position'; position.className = 'detail_position';
...@@ -343,7 +346,7 @@ class searchResult { ...@@ -343,7 +346,7 @@ class searchResult {
let axiospost = axios.create({ let axiospost = axios.create({
baseURL: 'http://pctd5r.natappfree.cc', baseURL: 'http://zybbi2.natappfree.cc',
timeout: 3000, timeout: 3000,
method:'post' method:'post'
}); });
...@@ -357,27 +360,28 @@ let axiospost = axios.create({ ...@@ -357,27 +360,28 @@ let axiospost = axios.create({
function btn_search(e,parm1,parm2){ function btn_search(e,parm1,parm2){
post.searchType = parm1??$('.search_type')[0].value; post.searchType = parm1??$('.search_type')[0].value;
console.log(post.searchType)
post.searchValue= parm2??$('.search_search')[0].value; post.searchValue= parm2??$('.search_search')[0].value;
if(!count) { if(!count){
count++; // count++;
} else if(post.searchValue==''){ } else if(post.searchValue==''){
alert("请输入相关信息"); alert("请输入相关信息");
return return
} }
count++;
localStorage.removeItem('searchType'); localStorage.removeItem('searchType');
localStorage.removeItem('searchValue'); localStorage.removeItem('searchValue');
axiospost({ axiospost({
method:'post',
data:post, data:post,
url:'/search' url:'/search'
}).then(response=>{ }).then(response=>{
// console.log(count===1) // console.log(count===1)
if(count===1){ if(count==1){
console.log(count);
console.log('hahah');
}else if($.isEmptyObject(response.data)){ }else if($.isEmptyObject(response.data)){
alert('书院暂无此书'); alert('书院暂无此书');
return ; return ;
...@@ -402,15 +406,15 @@ window.onload=function(){ ...@@ -402,15 +406,15 @@ window.onload=function(){
let parm1,parm2; let parm1,parm2;
parm1 =localStorage.getItem('searchType'); parm1 =localStorage.getItem('searchType');
parm2 =localStorage.getItem('searchValue'); parm2 =localStorage.getItem('searchValue');
parm1='allBook'
btn_search(e,parm1,parm2); btn_search(e,parm1,parm2);
} }
$('.toTop').click(()=>{
window.scrollTo(0,0);
})
console.log($('.nav_user'));
$('.nav_user')[0].innerHTML=`${localStorage.getItem('username')??"您好"},欢迎进入云顶书库`;
\ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<div class="nav_left"> <div class="nav_left">
<img class='little-logo' src="image/little-logo.png" alt="little-logo"> <img class='little-logo' src="image/little-logo.png" alt="little-logo">
<span class="nav_user"> 欢迎进入,xxx </span> <span class="nav_user"> 欢迎进入,xxx </span>
</div> </div>
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
<img src="image/logo.png" alt="logo" > <img src="image/logo.png" alt="logo" >
<select class="search_type"> <select class="search_type">
<option value="bookNameSearch">书名</option> <option value="bookNameSearch">书名</option>
<option value="authoSearchr">作者</option> <option value="authorSearch">作者</option>
<option value="kindSearch">类别</option> <option value="kindSearch">类别</option>
</select> </select>
<input class="search_search" placeholder="请输入你想输入的内容" maxlenth="20"> <input class="search_search" placeholder="请输入你想输入的内容" maxlenth="20">
...@@ -68,7 +69,7 @@ ...@@ -68,7 +69,7 @@
</ul> </ul>
</div> </div>
</footer> </footer>
<button class="toTop"></button>
</div> </div>
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
......
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