Commit d380c961 by 郑国强

updata

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