Browse Source

判断浏览设备

jack 7 years ago
parent
commit
07b7aad78d
4 changed files with 48 additions and 4 deletions
  1. 1 1
      e/a.html
  2. 1 0
      js/articalShow.js
  3. 32 3
      js/common.js
  4. 14 0
      js/public/shareCom.js

+ 1 - 1
e/a.html

111
		var appid = '';
111
		var appid = '';
112
		var articleId = GetQueryString("id");
112
		var articleId = GetQueryString("id");
113
		leword(500, 1);//liuyan
113
		leword(500, 1);//liuyan
114
		
114
		wlog("article", articleId, 3)
115
		//进入发布者详情页面
115
		//进入发布者详情页面
116
		$("#personAL").on("click", function() {
116
		$("#personAL").on("click", function() {
117
			var reType = this.getAttribute("data-type");
117
			var reType = this.getAttribute("data-type");

+ 1 - 0
js/articalShow.js

10
	articleshow();
10
	articleshow();
11
	relevantExperts();
11
	relevantExperts();
12
	relevantResources(); 
12
	relevantResources(); 
13
	wlog("article",articleId,"1");
13
	//判断是否登录转态
14
	//判断是否登录转态
14
	if(userid && userid != "null" && userid != null){
15
	if(userid && userid != "null" && userid != null){
15
		$(".ifLoginOn").removeClass("displayNone");
16
		$(".ifLoginOn").removeClass("displayNone");

+ 32 - 3
js/common.js

26
26
27
$("#search").on("click", function() {
27
$("#search").on("click", function() {
28
	var searchContent = $("#searchContent").val();
28
	var searchContent = $("#searchContent").val();
29
	location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
29
	setTimeout(function(){location.href = "searchNew.html?searchContent=" + encodeURI(searchContent)},300);
30
	
31
});
32
$("#search").on("click", function() {
33
	var searchContent = $("#searchContent").val().replace(/^\s*|\s*$/,"");
34
	if(searchContent) {
35
		wlog("kw", searchContent)
36
	}
30
});
37
});
31
32
//enter绑定时间
38
//enter绑定时间
33
$("#searchContent").keydown(function(e) {
39
$("#searchContent").keydown(function(e) {
34
	if(e.which == 13) {
40
	if(e.which == 13) {
48
54
49
$("#hsearch").on("click", function() {
55
$("#hsearch").on("click", function() {
50
	var searchContent = $("#hsearchContent").val();
56
	var searchContent = $("#hsearchContent").val();
51
	location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
57
	setTimeout(function(){
58
		location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
59
	},300)
60
	
61
});
62
$("#hsearch").on("click", function() {
63
	var searchContent = $("#hsearchContent").val().replace(/^\s*|\s*$/,"");
64
	if(searchContent) {
65
		wlog("kw", searchContent)
66
	}
52
});
67
});
53
/*向下滚动时,header背景变半透明*/
68
/*向下滚动时,header背景变半透明*/
54
$(document).scroll(function() {
69
$(document).scroll(function() {
1152
           
1167
           
1153
    return currentdate;
1168
    return currentdate;
1154
}
1169
}
1170
function wlog(dt, id, src) {
1171
	var src = src || "1";
1172
	$.ajax({
1173
		url: "http://www.ekexiu.com:8082/log/jsonp/log",
1174
		data: {
1175
			"id": id,
1176
			"src": src,
1177
			"__lt": dt,
1178
		},
1179
		success:function(data) {
1180
		},
1181
		dataType: "jsonp"
1182
	});
1183
}

+ 14 - 0
js/public/shareCom.js

181
		}
181
		}
182
	});
182
	});
183
}
183
}
184
function wlog(dt, id, src) {
185
	var src = src || "1";
186
	$.ajax({
187
		url: "http://www.ekexiu.com:8082/log/ajax/log",
188
		data: {
189
			"id": id,
190
			"src": src,
191
			"__lt": dt,
192
		},
193
		success:function(data) {
194
		},
195
		dataType: "json"
196
	});
197
}