Przeglądaj źródła

判断浏览设备

jack 7 lat temu
rodzic
commit
07b7aad78d
4 zmienionych plików z 48 dodań i 4 usunięć
  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,7 +111,7 @@
111 111
		var appid = '';
112 112
		var articleId = GetQueryString("id");
113 113
		leword(500, 1);//liuyan
114
		
114
		wlog("article", articleId, 3)
115 115
		//进入发布者详情页面
116 116
		$("#personAL").on("click", function() {
117 117
			var reType = this.getAttribute("data-type");

+ 1 - 0
js/articalShow.js

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

+ 32 - 3
js/common.js

@ -26,9 +26,15 @@ $(document).ready(function() {
26 26
27 27
$("#search").on("click", function() {
28 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 38
//enter绑定时间
33 39
$("#searchContent").keydown(function(e) {
34 40
	if(e.which == 13) {
@ -48,7 +54,16 @@ $("#hsearchContent").keydown(function(e) {
48 54
49 55
$("#hsearch").on("click", function() {
50 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 68
/*向下滚动时,header背景变半透明*/
54 69
$(document).scroll(function() {
@ -1152,3 +1167,17 @@ function getNowFormatDate(num) {
1152 1167
           
1153 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,3 +181,17 @@ function shareWays(shareTitle,descContent,lineLink,imgUrl){
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
}