浏览代码

最新文章

jack 7 年之前
父节点
当前提交
888e4b6acb
共有 2 个文件被更改,包括 32 次插入7 次删除
  1. 6 0
      app/html/professorArticle.html
  2. 26 7
      app/js/articleShow.js

+ 6 - 0
app/html/professorArticle.html

97
					        
97
					        
98
					    </ul>
98
					    </ul>
99
					</div>
99
					</div>
100
					<div class="madiaBlock displayNone" id="newarticle">
101
						<div class="madiaTit">最新文章</div>
102
						<ul class="mui-table-view" id="newarticleList">
103
					        
104
					    </ul>
105
					</div>
100
					<!--留言-->
106
					<!--留言-->
101
					<div class="madiaBlock" style="padding-bottom:50px;">
107
					<div class="madiaBlock" style="padding-bottom:50px;">
102
						<div class="madiaTit" id="olisten">留言</div>
108
						<div class="madiaTit" id="olisten">留言</div>

+ 26 - 7
app/js/articleShow.js

96
}
96
}
97

97

98
mui.plusReady(function() {
98
mui.plusReady(function() {
99
	var ffl=false;
99
	var oCurren = {
100
	var oCurren = {
100
		self: plus.webview.currentWebview(),
101
		self: plus.webview.currentWebview(),
101
		userid: plus.storage.getItem('userid'),
102
		userid: plus.storage.getItem('userid'),
369
			document.getElementById("resourceList").appendChild(li);
370
			document.getElementById("resourceList").appendChild(li);
370
		},
371
		},
371
		correlationArticle: function($data) {
372
		correlationArticle: function($data) {
372

373
			if($data.length == 0) {
374
				return;
373
				if($data.total) {
374
					if($data.data.length == 0) {
375
						return;
376
					}
377
				}else{
378
					if($data.length == 0) {
379
						return;
380
					}
381
				}
382
				var oo=1;
383
			if($data.total) {
384
				var $data=$data.data;
385
				
386
				document.getElementById('newarticle').style.display = "block";
387
				oo=0;
388
			}else{
389
				document.getElementById('article').style.display = "block";
390
				
375
			}
391
			}
376
			document.getElementById('article').style.display = "block"
392
			
377
			for(var i = 0; i < $data.length; i++) {
393
			for(var i = 0; i < $data.length; i++) {
378
				var ourl, of ;
394
				var ourl, of ;
379
				if($data[i].articleType == 1) {
395
				if($data[i].articleType == 1) {
425
								'<p><span class="h2Font" style="margin-right:10px">'+namepo+'</span><span class="time">'+commenTime($data[i].publishTime)+'</span></p>'+
441
								'<p><span class="h2Font" style="margin-right:10px">'+namepo+'</span><span class="time">'+commenTime($data[i].publishTime)+'</span></p>'+
426
								'</div>' +
442
								'</div>' +
427
								'</div>'
443
								'</div>'
428
							document.getElementById("articleList").appendChild(li);
444
							
445
							if(oo==0){
446
								document.getElementById("newarticleList").appendChild(li)
447
							}else{document.getElementById("articleList").appendChild(li);}
429
						}
448
						}
430
					},
449
					},
431
					error: function(xhr, type, errorThrown) {
450
					error: function(xhr, type, errorThrown) {
491
			
510
			
492
		}
511
		}
493
	});
512
	});
494
	
513
	oArticleModule.oAjaxGet(baseUrl + "/ajax/article/find", {pageSize:5}, "get", oArticleModule.correlationArticle);
495
	oArticleModule.oAjaxGet(baseUrl + "/ajax/article/ralatePro", {
514
	oArticleModule.oAjaxGet(baseUrl + "/ajax/article/ralatePro", {
496
		"articleId": oArticleModule.articleId
515
		"articleId": oArticleModule.articleId
497
	}, "get", oArticleModule.correlationExpert);
516
	}, "get", oArticleModule.correlationExpert);
591
			resourceId: resouId
610
			resourceId: resouId
592
		});
611
		});
593
	})
612
	})
594
	mui('#articleList').on('tap', 'li', function() {
613
	mui('#articleList,#newarticleList').on('tap', 'li', function() {
595
		var id = this.getAttribute("data-id");
614
		var id = this.getAttribute("data-id");
596
		plus.nativeUI.showWaiting();
615
		plus.nativeUI.showWaiting();
597
		var webviewShow=plus.webview.create("../html/professorArticle.html", '../html/professorArticle.html', {}, {
616
		var webviewShow=plus.webview.create("../html/professorArticle.html", '../html/professorArticle.html', {}, {