Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
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
Administrator
beyond-clouds-front
Commits
9bab4872
Commit
9bab4872
authored
Feb 14, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复search页面
parent
3459ac2d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
21 deletions
+15
-21
action/config.js
+2
-1
components/pc/answerCard.vue
+4
-1
components/pc/combinedCard.vue
+1
-16
components/pc/pageHeader.vue
+4
-0
pages/search.vue
+4
-3
No files found.
action/config.js
View file @
9bab4872
...
@@ -258,7 +258,8 @@ export default {
...
@@ -258,7 +258,8 @@ export default {
listenCommentReget2
:
'listenCommentReget2'
,
listenCommentReget2
:
'listenCommentReget2'
,
listenCommentReget3
:
'listenCommentReget3'
,
listenCommentReget3
:
'listenCommentReget3'
,
listenDetailInfo
:
'listenDetailInfo'
,
listenDetailInfo
:
'listenDetailInfo'
,
listenYunInputIcon
:
'listenYunInputIcon'
listenYunInputIcon
:
'listenYunInputIcon'
,
listenSearchWord
:
'listenSearchWord'
},
},
...
...
components/pc/answerCard.vue
View file @
9bab4872
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
<
script
>
<
script
>
import
{
dateConvert
}
from
"../../action/utils/dataConvert"
;
import
{
dateConvert
}
from
"../../action/utils/dataConvert"
;
import
config
from
'../../action/config'
import
config
from
'../../action/config'
;
export
default
{
export
default
{
name
:
"answerCard"
,
name
:
"answerCard"
,
props
:{
props
:{
...
@@ -108,6 +109,8 @@
...
@@ -108,6 +109,8 @@
this
.
questionId
=
info
.
itemId
;
this
.
questionId
=
info
.
itemId
;
this
.
createTime
=
dateConvert
(
info
.
createTime
);
this
.
createTime
=
dateConvert
(
info
.
createTime
);
this
.
userNick
=
info
.
author
;
this
.
userNick
=
info
.
author
;
this
.
replyNumber
=
info
.
extra
?
info
.
extra
.
replyNumber
:
0
;
this
.
solved
=
info
.
extra
?
info
.
extra
.
solved
:
false
;
}
}
},
},
...
...
components/pc/combinedCard.vue
View file @
9bab4872
<
template
>
<
template
>
<div>
<div>
<project-card
:info=
"info"
v-if=
"info.itemType==='BLOG'||info.itemType==='PROJECT'"
></project-card>
<project-card
:info=
"info"
v-if=
"info.itemType==='BLOG'||info.itemType==='PROJECT'"
></project-card>
<answer-card
:info=
"info"
v-if=
"info.itemType==='
ANSWER
'"
></answer-card>
<answer-card
:info=
"info"
v-if=
"info.itemType==='
QUESTION
'"
></answer-card>
<topic-card
:info=
"info"
v-if=
"info.itemType==='TOPIC'"
></topic-card>
<topic-card
:info=
"info"
v-if=
"info.itemType==='TOPIC'"
></topic-card>
<user-card
from=
"other"
:info=
"info"
v-if=
"info.itemType==='USER'"
></user-card>
<user-card
from=
"other"
:info=
"info"
v-if=
"info.itemType==='USER'"
></user-card>
</div>
</div>
...
@@ -23,21 +23,6 @@
...
@@ -23,21 +23,6 @@
type
:
Object
,
type
:
Object
,
default
:()
=>
({})
default
:()
=>
({})
}
}
},
created
()
{
if
(
this
.
info
.
itemType
===
"BLOG"
||
this
.
info
.
itemType
===
"PROJECT"
){
}
if
(
this
.
info
.
itemType
===
"TOPIC"
){
}
if
(
this
.
info
.
itemType
===
"ANSWER"
){
}
if
(
this
.
info
.
itemType
===
"USESR"
){
}
}
}
}
}
...
...
components/pc/pageHeader.vue
View file @
9bab4872
...
@@ -182,6 +182,9 @@
...
@@ -182,6 +182,9 @@
globalBus
.
$on
(
config
.
event
.
listenDetailInfo
,(
title
,
type
,
id
)
=>
{
globalBus
.
$on
(
config
.
event
.
listenDetailInfo
,(
title
,
type
,
id
)
=>
{
this
.
detailTitle
=
title
;
this
.
detailTitle
=
title
;
this
.
detailType
=
type
;
this
.
detailType
=
type
;
});
globalBus
.
$on
(
config
.
event
.
listenSearchWord
,(
val
)
=>
{
this
.
searchValue
=
val
})
})
this
.
changeHeader
();
this
.
changeHeader
();
},
},
...
@@ -204,6 +207,7 @@
...
@@ -204,6 +207,7 @@
clickToSearch
(){
clickToSearch
(){
let
searchValue
=
this
.
searchValue
;
let
searchValue
=
this
.
searchValue
;
this
.
$router
.
push
(
'/search/all?keywords='
+
searchValue
)
this
.
$router
.
push
(
'/search/all?keywords='
+
searchValue
)
},
},
handleLogout
()
{
handleLogout
()
{
...
...
pages/search.vue
View file @
9bab4872
...
@@ -66,7 +66,8 @@
...
@@ -66,7 +66,8 @@
import
NavWrap
from
"../components/pc/nav/navWrap"
;
import
NavWrap
from
"../components/pc/nav/navWrap"
;
import
CardContainer
from
"../components/pc/cardContainer"
;
import
CardContainer
from
"../components/pc/cardContainer"
;
import
Pagination
from
'../components/pc/pagination'
;
import
Pagination
from
'../components/pc/pagination'
;
import
config
from
'../action/config'
import
config
from
'../action/config'
;
import
{
globalBus
}
from
"../components/common/globalBus"
;
export
default
{
export
default
{
name
:
"search"
,
name
:
"search"
,
...
@@ -109,7 +110,6 @@
...
@@ -109,7 +110,6 @@
},
},
created
()
{
created
()
{
this
.
keywords
=
this
.
$route
.
query
.
keywords
;
this
.
keywords
=
this
.
$route
.
query
.
keywords
;
this
.
dataGetSearch
(
1
,
this
.
$route
.
query
.
keywords
);
},
},
watch
:{
watch
:{
...
@@ -117,10 +117,11 @@
...
@@ -117,10 +117,11 @@
this
.
resultList
=
[];
this
.
resultList
=
[];
this
.
total
=
0
;
this
.
total
=
0
;
this
.
restartPagination
();
this
.
restartPagination
();
this
.
dataGetSearch
(
1
);
this
.
dataGetSearch
(
1
,
this
.
keywords
);
},
},
keywords
(
val
){
keywords
(
val
){
this
.
resultList
=
[];
this
.
resultList
=
[];
globalBus
.
$emit
(
config
.
event
.
listenSearchWord
,
val
)
this
.
total
=
0
;
this
.
total
=
0
;
this
.
restartPagination
();
this
.
restartPagination
();
this
.
dataGetSearch
(
1
);
this
.
dataGetSearch
(
1
);
...
...
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