jack 7 years ago
parent
commit
7210b75afd
2 changed files with 18 additions and 3 deletions
  1. 16 1
      js/common.js
  2. 2 2
      js/head-staticize.js

+ 16 - 1
js/common.js

@ -58,6 +58,13 @@ $("#hsearch").on("click", function() {
58 58
		location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
59 59
	},300)
60 60
	
61
});
62
$("#searchh").on("click", function() {
63
	var searchContent = $("#hsearchContent").val();
64
	setTimeout(function(){
65
		location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
66
	},300)
67
	
61 68
});
62 69
$("#hsearch").on("click", function() {
63 70
	var searchContent = $("#hsearchContent").val().replace(/^\s*|\s*$/,"");
@ -99,7 +106,15 @@ function exit() {
99 106
	$.cookie('userType', null);
100 107
	location.href = "index.html"
101 108
}
102
109
function exitStaticize() {
110
	$.cookie('userid', null);
111
	$.cookie('userAuth', null);
112
	$.cookie('userEmail', null);
113
	$.cookie('userMobilePhone', null);
114
	$.cookie('userName', null);
115
	$.cookie('userType', null);
116
	location.href = "index.html"
117
}
103 118
function valUser() {
104 119
	var userid = $.cookie('userid');
105 120
	var userAuth = $.cookie('userAuth');

+ 2 - 2
js/head-staticize.js

@ -14,7 +14,7 @@ var headerHtml = '';
14 14
					'</div>' +
15 15
					'<div class="searchblock">'+
16 16
				    '<input type="text" placeholder="搜索专家、资源、文章" class="search-txt" id="hsearchContent">'+
17
						'<div class="search-btn" id="hsearch"><span class="search-icon"></span></div>'+
17
						'<div class="search-btn" id="searchh"><span class="search-icon"></span></div>'+
18 18
					'</div>'+
19 19
					//未登录状态
20 20
					'<div class="unlogin floatR displayNone">'+
@ -35,7 +35,7 @@ var headerHtml = '';
35 35
					                	'<a href="" class="goMyInf"><span class="icon icon1"></span>我的主页</a>'+
36 36
					                    '<a href="/information.html"><span class="icon icon2"></span>修改资料</a>'+
37 37
					                    '<a href="/account-set.html"><span class="icon icon3"></span>账户设置</a>'+
38
					                    '<a href="javascript:;" onClick="exit()"><span class="icon icon4"></span>退出登录</a>'+
38
					                    '<a href="javascript:;" onClick="exitStaticize()"><span class="icon icon4"></span>退出登录</a>'+
39 39
					                '</div> '+            
40 40
					           ' </div>' + 
41 41
						'</div>' +