Commit 1b866561 by 郑国强

js

parent 1eb3f2d5
class navigation { class navigation {
...@@ -340,7 +340,7 @@ let post ={ ...@@ -340,7 +340,7 @@ let post ={
} }
let result = null; let result = null;
$('.btn_search').click((e,parm1,parm2)=>{ ('.btn_search').onclick= (e,parm1,parm2)=>{
console.log($('.search_type')[0].value); console.log($('.search_type')[0].value);
post.searchType = parm1||$('.search_type')[0].value; post.searchType = parm1||$('.search_type')[0].value;
...@@ -351,6 +351,7 @@ $('.btn_search').click((e,parm1,parm2)=>{ ...@@ -351,6 +351,7 @@ $('.btn_search').click((e,parm1,parm2)=>{
alert("请输入相关信息!") alert("请输入相关信息!")
return; return;
} }
}
axiospost({ axiospost({
method:'post', method:'post',
...@@ -370,7 +371,7 @@ $('.btn_search').click((e,parm1,parm2)=>{ ...@@ -370,7 +371,7 @@ $('.btn_search').click((e,parm1,parm2)=>{
}).catch(error=>{ }).catch(error=>{
alert(error); alert(error);
}) })
})
localStorage.removeItem('test') localStorage.removeItem('test')
...@@ -378,10 +379,11 @@ localStorage.removeItem('test') ...@@ -378,10 +379,11 @@ localStorage.removeItem('test')
window.onload=function(){ window.onload=function(){
console.log()
let parm1,parm2; let parm1,parm2;
parm1 =localStorage.getItem('searchType'); parm1 =localStorage.getItem('searchType');
parm1 =localStorage.getItem('searchValue'); parm1 =localStorage.getItem('searchValue');
$('.btn_search').click(parm1,parm2); $('.btn_search').onclick();
} }
......
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