Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
aa911f30
Commit
aa911f30
authored
Jul 20, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 搜索缺省页
parent
c25fd006
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
6 deletions
+38
-6
detail.vue
src/pages/search/detail.vue
+38
-6
No files found.
src/pages/search/detail.vue
View file @
aa911f30
<
template
>
<
template
>
<view
class=
"search"
>
<view
class=
"
u-flex
search"
>
<u-navbar
<u-navbar
back-icon-color=
"#333333"
back-icon-color=
"#333333"
background=
"transparent"
background=
"transparent"
...
@@ -19,7 +19,9 @@
...
@@ -19,7 +19,9 @@
@
custom=
"search"
@
custom=
"search"
@
search=
"search"
@
search=
"search"
></u-search>
></u-search>
</view>
<view
v-show=
"lists.length > 0"
>
<view
class=
"title"
<view
class=
"title"
>
共找到含有
<text>
“
{{
keyword
}}
”
</text>
相关试题
<text>
10
</text>
道
</view
>
共找到含有
<text>
“
{{
keyword
}}
”
</text>
相关试题
<text>
10
</text>
道
</view
>
>
...
@@ -76,6 +78,15 @@
...
@@ -76,6 +78,15 @@
</u-collapse>
</u-collapse>
</view>
</view>
</view>
</view>
<view
class=
"u-flex default"
v-show=
"lists.length === 0"
>
<view>
<image
:src=
"defaultImg"
/>
</view>
<view
class=
"no-result"
>
当前暂无搜索结果
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -92,7 +103,8 @@ export default {
...
@@ -92,7 +103,8 @@ export default {
itemStyle
:
{
itemStyle
:
{
background
:
'#fff'
,
background
:
'#fff'
,
padding
:
'0rpx 20rpx'
,
padding
:
'0rpx 20rpx'
,
margin
:
'20rpx 0'
,
margin
:
'10rpx 0'
,
'border-radius'
:
'30rpx 30rpx 0 0'
},
},
titleType
:
[
'单选题'
,
'判断题'
,
'多选题'
],
titleType
:
[
'单选题'
,
'判断题'
,
'多选题'
],
keyword
:
''
,
keyword
:
''
,
...
@@ -202,7 +214,11 @@ export default {
...
@@ -202,7 +214,11 @@ export default {
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
keyword
=
e
?
decodeURIComponent
(
e
.
keyword
)
:
''
this
.
keyword
=
e
?
decodeURIComponent
(
e
.
keyword
)
:
''
},
},
computed
:
{},
computed
:
{
defaultImg
()
{
return
process
.
uniEnv
.
qn_base_url
+
'no-search.png'
},
},
methods
:
{
methods
:
{
itemChange
(
e
)
{
itemChange
(
e
)
{
this
.
arrIndex
=
e
.
show
?
e
.
index
:
null
this
.
arrIndex
=
e
.
show
?
e
.
index
:
null
...
@@ -234,17 +250,24 @@ export default {
...
@@ -234,17 +250,24 @@ export default {
background-image
:
linear-gradient
(
to
top
,
#f8fafd
0%
,
#e9f3ff
50%
);
background-image
:
linear-gradient
(
to
top
,
#f8fafd
0%
,
#e9f3ff
50%
);
background-size
:
100%
520rpx
;
background-size
:
100%
520rpx
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
padding
:
0
20rpx
;
.search-bar
{
width
:
100%
;
padding
:
0
20rpx
;
}
.title
{
.title
{
width
:
100%
;
color
:
#191c27
;
color
:
#191c27
;
font-size
:
32rpx
;
font-size
:
32rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
margin-top
:
30rpx
;
margin-top
:
30rpx
;
padding
:
0
20rpx
;
text
{
text
{
color
:
#2953ff
;
color
:
#2953ff
;
}
}
}
}
.result
{
.result
{
margin-top
:
30rpx
;
width
:
100%
;
.head
{
.head
{
width
:
100%
;
width
:
100%
;
height
:
60rpx
;
height
:
60rpx
;
...
@@ -292,7 +315,7 @@ export default {
...
@@ -292,7 +315,7 @@ export default {
}
}
}
}
.opera
{
.opera
{
padding
:
2
0rpx
0
;
padding
:
3
0rpx
0
;
justify-content
:
space-between
;
justify-content
:
space-between
;
color
:
#5a6073
;
color
:
#5a6073
;
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -312,5 +335,14 @@ export default {
...
@@ -312,5 +335,14 @@ export default {
}
}
}
}
}
}
.default
{
flex-flow
:
column
;
flex
:
1
;
justify-content
:
center
;
.no-result
{
color
:
#9EA5BB
;
font-size
:
28rpx
;
}
}
}
}
</
style
>
</
style
>
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