Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YunQi-Front-end
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王家齐
YunQi-Front-end
Commits
00b67cb4
Commit
00b67cb4
authored
Feb 26, 2022
by
郑国强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updata 14.52
parent
ae38de28
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
33 deletions
+45
-33
前端/搜索页面/css/public.css
+6
-2
前端/搜索页面/css/search.css
+27
-22
前端/搜索页面/js/search.js
+12
-9
No files found.
前端/搜索页面/css/public.css
View file @
00b67cb4
body
{
body
{
...
...
@@ -9,12 +9,16 @@ body {
}
header
{
position
:
fixed
;
margin
:
0
auto
;
/* width: 1920px; */
width
:
100%
;
top
:
0%
;
background-color
:
rgba
(
44
,
62
,
90
,
0.9
);
z-index
:
90
;
}
.nav
{
/* position: fixed; */
display
:
flex
;
margin
:
0
auto
;
width
:
1300px
;
...
...
前端/搜索页面/css/search.css
View file @
00b67cb4
.sear
ch_logo
,
.sear
ch_logo
,
...
...
@@ -12,14 +12,16 @@
.search_type
{
position
:
absolute
;
left
:
6
%
;
left
:
7
%
;
top
:
77%
;
width
:
10
9
px
;
width
:
10
0
px
;
height
:
66px
;
background-color
:
rgb
(
64
,
114
,
184
);
border
:
1px
solid
black
;
font-size
:
30px
;
/* border-radius: 10px; */
border-radius
:
15px
;
border-top-right-radius
:
0px
;
border-bottom-right-radius
:
0px
;
text-align
:
center
;
}
.search_logo
img
{
...
...
@@ -71,6 +73,7 @@
justify-content
:
flex-start
;
background-color
:
rgb
(
0
,
0
,
0
,
0.01
);
border-radius
:
10px
;
margin-top
:
50px
;
}
.show_books
.show_book
{
width
:
30%
;
...
...
@@ -125,20 +128,20 @@
.book_model
{
/* display: flex; */
position
:
fixed
;
top
:
0%
;
left
:
0%
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
);
top
:
15%
;
left
:
15.4%
;
width
:
70%
;
height
:
70%
;
border
:
5px
#4072b8
solid
;
box-shadow
:
0px
0px
20px
#4072b8
;
z-index
:
100
;
/* transition: display ease-in-out 1s; */
overflow
:
hidden
;
border-radius
:
15px
;
}
.book_model
img
{
position
:
absolute
;
top
:
5%
;
left
:
5%
;
width
:
40%
;
height
:
80%
;
width
:
55%
;
height
:
100%
;
}
.book_detail
{
position
:
absolute
;
...
...
@@ -147,21 +150,20 @@
flex-direction
:
column
;
letter-spacing
:
0.1px
;
font-size
:
1.5vw
;
top
:
5
%
;
right
:
15
%
;
width
:
4
0
%
;
height
:
8
0%
;
top
:
0
%
;
right
:
0
%
;
width
:
4
5
%
;
height
:
10
0%
;
box-sizing
:
border-box
;
padding
:
2vw
;
background-color
:
rgba
(
0
,
0
,
0
,
0.8
);
color
:
#fff
;
background-color
:
rgba
(
255
,
255
,
255
,
1
);
}
.detail_close
{
position
:
absolute
;
font-size
:
50px
;
color
:
white
;
color
:
rgba
(
0
,
0
,
0
,
0.8
)
;
right
:
2%
;
top
:
2
%
;
top
:
1
%
;
cursor
:
pointer
;
}
.detail_btn
{
...
...
@@ -194,3 +196,6 @@
border-bottom
:
2px
solid
#4072b8
;
transition
:
all
0.1s
;
}
.blur
{
filter
:
blur
(
10px
);
}
前端/搜索页面/js/search.js
View file @
00b67cb4
class
navigation
{
class
navigation
{
...
...
@@ -155,13 +155,14 @@ class searchResult {
if
(
e
.
target
.
className
.
indexOf
(
'no'
)
!==-
1
){
alert
(
'这本书借完啦,过段时间再来吧!'
);
}
else
{
$
(
'header,footer,.search_logo,.show_books'
).
addClass
(
'blur'
)
$
(
'.book_model'
)[
index
].
style
.
display
=
'block'
;
document
.
body
.
style
.
overflow
=
"hidden"
}
})
$
(
'.detail_close'
).
click
((
e
)
=>
{
let
index
=
$
(
"[class*='detail_close']"
).
index
(
e
.
target
);
$
(
'header,footer,.search_logo,.show_books'
).
removeClass
(
'blur'
)
$
(
'.book_model'
)[
index
].
style
.
display
=
'none'
;
document
.
body
.
style
.
overflow
=
""
;
})
...
...
@@ -358,14 +359,14 @@ let axiospost = axios.create({
post.searchType = parm1??$('.search_type')[0].value;
post.searchValue= parm2??$('.search_search')[0].value;
if(!count) {
count++;
return
}
if(post.searchValue==''){
} else if(post.searchValue==''){
alert("请输入相关信息");
return
}
localStorage.removeItem('searchType');
localStorage.removeItem('searchValue');
...
...
@@ -374,8 +375,10 @@ let axiospost = axios.create({
data:post,
url:'/search'
}).then(response=>{
// console.log(count===1)
if(count===1){
if($.isEmptyObject(response.data)){
}else
if($.isEmptyObject(response.data)){
alert('书院暂无此书');
return ;
}
...
...
@@ -396,9 +399,9 @@ let axiospost = axios.create({
$('.btn_search')[0].onclick = btn_search;
window.onload=function(){
let e=null
let parm1
,parm2
;
parm1 =localStorage.getItem('searchType');
parm2 =localStorage.getItem('searchValue');
let parm1
='allBook',parm2='高等数学'
;
//
parm1 =localStorage.getItem('searchType');
//
parm2 =localStorage.getItem('searchValue');
btn_search(e,parm1,parm2);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment