Commit 1adf4498 authored by zhangyanni's avatar zhangyanni

搜索

parent 34b2bd8e
......@@ -324,7 +324,7 @@
this.keyword = data;
}
if(data){
this.publicFun.setUserInfoCookie("keyword",data);
this.publicFun.setUserInfoCookie("keyword",this.Base64.encode(data));
this.$store.dispatch('saveSearchResultKeyword',{path:this.$route.path,pars:data});
this.$router.push({path:"/search",query:{key:this.Base64.encode(data)}});
globalMsg.$emit("sendResultData",data);
......
......@@ -196,7 +196,7 @@
search:this.stateData
};
}
params.search.context = this.publicFun.getCookie("keyword");
params.search.context = this.Base64.decode(this.publicFun.getCookie("keyword"));
api.getBigBusinessListAxios(params).then((res)=>{
this.getUserInfoFunc();
if(res.code==0){
......
......@@ -169,7 +169,7 @@
sort: {}
}
}
params.search.context = this.publicFun.getCookie("keyword");
params.search.context = this.Base64.decode(this.publicFun.getCookie("keyword"));
api.selectProjects(params).then(response => {
this.getUserInfoFunc();
if(response.code == 0) {
......
......@@ -61,7 +61,7 @@
id: 12,
name: "activityList"
}],
keyword: this.publicFun.getCookie("keyword") ? this.publicFun.getCookie("keyword") : null,
keyword: this.publicFun.getCookie("keyword") ? this.Base64.decode(this.publicFun.getCookie("keyword")): null,
currentIndex: this.publicFun.getCookie("mobileIndex") ? this.publicFun.getCookie("mobileIndex") : -1,
isReturn:false,
}
......@@ -95,12 +95,12 @@
this.$router.push({path: "/mobileSearchResult", query: {key: data, tab: tab}});
} else {
if (data != this.publicFun.getCookie("keyword")) this.$router.replace({
if (data != this.Base64.decode(this.publicFun.getCookie("keyword"))) this.$router.replace({
path: "/mobileSearchResult",
query: {key: data, tab: tab}
});
}
this.publicFun.setUserInfoCookie("keyword", data);
this.publicFun.setUserInfoCookie("keyword", this.Base64.encode(data));
}
},
......
......@@ -215,7 +215,7 @@
getProjectList(param){
if(!this.isMargin){
this.stateProjectData.context = this.publicFun.getCookie("keyword")?this.publicFun.getCookie("keyword"):undefined;
this.stateProjectData.context = this.publicFun.getCookie("keyword")?this.Base64.decode(this.publicFun.getCookie("keyword")):undefined;
}
let params = {
pagination:{
......@@ -313,7 +313,7 @@
getInitList(param){
if(!this.isMargin){
this.stateData.context = this.publicFun.getCookie("keyword")?this.publicFun.getCookie("keyword"):"";
this.stateData.context = this.publicFun.getCookie("keyword")?this.Base64.decode(this.publicFun.getCookie("keyword")):"";
};
let params = {
pagination:{
......
......@@ -43,7 +43,7 @@
data(){
return{
currentIndex:1,
keyword:this.publicFun.getCookie("keyword")?this.publicFun.getCookie("keyword"):"",
keyword:this.publicFun.getCookie("keyword")?this.Base64.decode(this.publicFun.getCookie("keyword")):"",
userInfo:"",
resultData:"",
totalCount:this.publicFun.getCookie("totalCount")?this.publicFun.getCookie("totalCount"):0,
......@@ -96,14 +96,14 @@
// this.keyword = this.Base64.decode(this.$route.query.key);
globalMsg.$on("sendResultData",(keyword)=>{
this.keyword = keyword;
this.publicFun.setUserInfoCookie("keyword",keyword);
this.publicFun.setUserInfoCookie("keyword",this.Base64.encode(keyword));
})
if(this.publicFun.getCookie("keyword")) this.getResultDataFunc(this.publicFun.getCookie("keyword"));
if(this.publicFun.getCookie("keyword")) this.getResultDataFunc(this.Base64.decode(this.publicFun.getCookie("keyword")));
},
watch:{
keyword:{
handler:function(newVal,oldVal){
this.getResultDataFunc(this.publicFun.getCookie("keyword"))
this.getResultDataFunc(this.Base64.decode(this.publicFun.getCookie("keyword")))
},
deep:true
}
......
......@@ -92,7 +92,7 @@
context:data
}
var tab = 1;
this.publicFun.setUserInfoCookie("keyword",data);
this.publicFun.setUserInfoCookie("keyword",this.Base64.encode(data));
this.publicFun.setUserInfoCookie("searchTabInd",tab);
this.$router.push({path:"/mobileSearchResult",query:{key:data,tab:tab}});
api.mixSearchAxios(params).then((res)=>{
......
......@@ -31,7 +31,7 @@
return{
title:this.$t("mobile.searchResult"),
currentIndex:this.publicFun.getCookie("searchTabInd")?this.publicFun.getCookie("searchTabInd"):1,
keyword:this.publicFun.getCookie("keyword")?this.publicFun.getCookie("keyword"):"",
keyword:this.publicFun.getCookie("keyword")?this.Base64.decode(this.publicFun.getCookie("keyword")):"",
userInfo:"",
resultData:"",
totalCount:this.publicFun.getCookie("totalCount")?this.publicFun.getCookie("totalCount"):0,
......
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