Commit 73dd5144 authored by zhangyanni's avatar zhangyanni

搜索

parent 73786f02
......@@ -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);
......
......@@ -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 });
},
......
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