Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
front-end-dev
techbook
Commits
73dd5144
Commit
73dd5144
authored
Dec 11, 2019
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索
parent
73786f02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
PageTop.vue
src/components/index/PageTop.vue
+3
-1
store.js
src/store.js
+9
-0
No files found.
src/components/index/PageTop.vue
View file @
73dd5144
...
...
@@ -336,6 +336,7 @@
let
params
=
{
context
:
data
}
this
.
$store
.
dispatch
(
'saveSearchResultKeyword'
,{
path
:
this
.
$route
.
path
,
pars
:
data
});
this
.
$router
.
push
({
path
:
"/search"
,
query
:{
key
:
this
.
Base64
.
encode
(
data
)}});
api
.
mixSearchAxios
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
...
...
@@ -430,7 +431,8 @@
let
that
=
this
;
api
.
logoutAxios
().
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
window
.
sessionStorage
.
removeItem
(
"userInfo"
);
// window.sessionStorage.removeItem("userInfo");
window
.
sessionStorage
.
clear
();
that
.
$router
.
push
(
"/login"
);
}
else
{
that
.
$message
.
error
(
res
.
msg
);
...
...
src/store.js
View file @
73dd5144
...
...
@@ -12,6 +12,7 @@ export default new Vuex.Store({
searchResultSmallBusiness
:
new
Map
(),
//搜索结果小B分页
searchResult
:
new
Map
(),
//搜索结果
projectSearch
:
new
Map
(),
saveSearchResultKeyword
:
new
Map
(),
//搜索key
},
mutations
:
{
SAVE_LIST_PAGE_PARS
:(
state
,{
path
,
pars
})
=>
{
...
...
@@ -38,6 +39,10 @@ export default new Vuex.Store({
state
.
searchResult
.
set
(
path
,
pars
)
},
SEARCH_RESULT_KEYWORD
:(
state
,{
path
,
pars
})
=>
{
//搜索key
state
.
saveSearchResultKeyword
.
set
(
path
,
pars
)
},
pro_PARS
:(
state
,{
path
,
pars
})
=>
{
state
.
projectSearch
.
set
(
path
,
pars
);
},
...
...
@@ -66,6 +71,10 @@ export default new Vuex.Store({
commit
(
'SEARCH_RESULT'
,{
path
,
pars
});
},
saveSearchResultKeyword
:
({
commit
},{
path
,
pars
})
=>
{
commit
(
'SEARCH_RESULT_KEYWORD'
,{
path
,
pars
});
},
projectPagePars
:
({
commit
},{
path
,
pars
})
=>
{
commit
(
'pro_PARS'
,{
path
,
pars
});
},
...
...
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