Browse Source

判断浏览设备

jack 7 years ago
parent
commit
50c8090518
4 changed files with 22 additions and 2 deletions
  1. 1 0
      app/js/articleShow.js
  2. 14 2
      app/js/public/base.js
  3. 3 0
      app/js/searchListNew2.js
  4. 4 0
      app/js/searchfirst.js

+ 1 - 0
app/js/articleShow.js

@ -493,6 +493,7 @@ mui.plusReady(function() {
493 493
			document.getElementsByClassName("icon-shoucang")[0].classList.remove("icon-yishoucang");
494 494
		},
495 495
	}
496
	wlog("article", oArticleModule.articleId, 2)
496 497
	/*文章详细内容*/
497 498
	oArticleModule.oAjaxGet(baseUrl + "/ajax/article/query", {
498 499
		articleId: oArticleModule.articleId

+ 14 - 2
app/js/public/base.js

@ -269,7 +269,6 @@ var demandDuration = {
269 269
/*判断是否收藏资源文章或者是否关注专家*/
270 270
function ifcollectionAbout(watchObject,sel, num,flag) {
271 271
	var that=sel;
272
	console.log(JSON.stringify(that))
273 272
	mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
274 273
		data: {
275 274
			"professorId": plus.storage.getItem('userid'),
@ -451,4 +450,17 @@ function checkVersion(){
451 450
			});
452 451
		})
453 452
	}
454

453
function wlog(dt, id, src) {
454
	var src = src || "1";
455
	mui.ajax({
456
		url: "http://www.ekexiu.com:8082/log/ajax/log",
457
		data: {
458
			"id": id,
459
			"src": src,
460
			"__lt": dt,
461
		},
462
		success:function(data) {
463
		},
464
		dataType: "json"
465
	});
466
}

+ 3 - 0
app/js/searchListNew2.js

@ -789,6 +789,9 @@ for(var n=0;n<6;n++) {
789 789
			var e = event || window.event || arguments.caller.arguments[0];
790 790
			if(e.keyCode == 13) {
791 791
				var searchval = document.getElementById("searchval").value;
792
				if(searchval.replace(/^\s*|\s*$/,"")) {
793
				wlog("kw", searchval);
794
			}
792 795
				if(tabFlag == 1) {
793 796
					if(obj.ex != searchval) {
794 797
						flag = 1;

+ 4 - 0
app/js/searchfirst.js

@ -70,12 +70,16 @@ mui.plusReady(function() {
70 70
	search.oAjaxGet(baseUrl + "/ajax/dataDict/qlHotKey", {}, "get", search.keyWord);
71 71

72 72
	mui(".hotsearchNew").on("tap", "li", function() {
73
		wlog("kw", this.innerHTML);
73 74
		search.createWin(this.innerHTML);
74 75
	});
75 76

76 77
	/*按键字搜索*/
77 78
	document.getElementById("searchval").addEventListener("keyup", function(e) {
78 79
		if(e.keyCode == 13) {
80
			if(this.value.replace(/^\s*|\s*$/,"")) {
81
				wlog("kw", this.value);
82
			}
79 83
			search.createWin(this.value);
80 84
		}
81 85
	})