jack 8 gadi atpakaļ
vecāks
revīzija
897a037d4f
2 mainītis faili ar 39 papildinājumiem un 27 dzēšanām
  1. 5 13
      app/html/professorArticle.html
  2. 34 14
      app/js/articleShow.js

+ 5 - 13
app/html/professorArticle.html

@ -9,7 +9,7 @@
9 9
		<link href="../css/iconfont.css" rel="stylesheet" />
10 10
		<link href="../css/app.css" rel="stylesheet" />
11 11
		<style>
12
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;background: #FFFFFF;}
12
			/*html,body{height: 100%;margin:0;padding:0px;overflow: hidden;background: #FFFFFF;}*/
13 13
			.mui-content{height:100%;overflow: auto;background: #FFFFFF;}
14 14
		</style>
15 15
	</head>
@ -32,7 +32,7 @@
32 32
				<div class="mui-col-xs-8">
33 33
					<div class="inputShow"><span>说点什么吧…</span></div>
34 34
				</div>
35
				<div class="mui-col-xs-1">
35
				<div class="mui-col-xs-1" id="listenClick">
36 36
					<span class="mui-icon iconfontnew icon-liuyan"><em class="mui-badge"></em></span>
37 37
				</div>
38 38
				<div class="mui-col-xs-2">
@ -56,7 +56,7 @@
56 56
										<p class="h3Font" id="oTime"></p>
57 57
									</div>
58 58
					            </div>
59
					            <span class="mui-icon attenSpan" id="attBtn">关注</span>
59
					            <span class="mui-icon attenSpan" id="attBtn" style="display:block;">关注</span>
60 60
					        </li>
61 61
					    </ul>
62 62
		    		</div>
@ -91,7 +91,7 @@
91 91
					</div>
92 92
					<!--留言-->
93 93
					<div class="madiaBlock mui-scroll">
94
						<div class="madiaTit" id="title">留言</div>
94
						<div class="madiaTit" id="olisten">留言</div>
95 95
						<ul class="mui-table-view mui-table-view-chevron commentBlock noactiveTab">
96 96
					       
97 97
					   </ul>
@ -123,11 +123,6 @@
123 123
		<script type="text/javascript"> 
124 124
			//处理iOS下弹出软键盘后头部会随页面的滚动条消失问题
125 125
		    iosheader();
126
		    mui(".artfoot").on("tap",".inputShow",function(){
127
		    	document.getElementById("textInput").style.display="block";
128
		    	document.getElementById("operCol").style.display="none";
129
		    	document.getElementById("textInputThis").focus();
130
		    })
131 126
		    mui("body").on("tap",".mui-content",function(){
132 127
		    	document.getElementById("textInput").style.display="none";
133 128
		    	document.getElementById("operCol").style.display="block";
@ -156,10 +151,7 @@
156 151
		    	this.style.display="none";
157 152
		    	shareBlock.style.display="none";
158 153
		    })
159
		    liuyanbut.addEventListener("click",function(){
160
		    	var heighttop = document.getElementById("offmsg").offsetTop;
161
		    	document.documentElement.scrollTop = document.body.scrollTop =heighttop; 
162
		    })
154
		   
163 155
		</script>
164 156
		<script type="text/javascript" src="../js/articleShow.js"></script>
165 157
	</body>

+ 34 - 14
app/js/articleShow.js

@ -33,6 +33,7 @@ function leword(row, aa) {
33 33
			timeout: 10000, //超时时间设置为10秒;
34 34
			traditional: true,
35 35
			success: function(data) {
36
				console.log(JSON.stringify(data))
36 37
				if(data.success) {
37 38
					if(af == 1) {
38 39
						document.getElementsByClassName('commentBlock')[0].innerHTML = ""
@ -66,11 +67,10 @@ function leword(row, aa) {
66 67
						}
67 68
						var li = document.createElement("li");
68 69
						li.className = "mui-table-view-cell";
69
						li.setAttribute("data-id", data.data[i].professor.id)
70 70
						li.innerHTML = '<div class="flexCenter mui-clearfix">' +
71
							'<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
71
							'<div class="madiaHead useHead" style="background-image:url(' + baImg + ')" data-id="'+data.data[i].professor.id+'"></div>' +
72 72
							'<div class="madiaInfo">' +
73
							'<p><span class="h1Font">' + data.data[i].professor.name + '</span><em class="authicon ' + userType.sty + '" title="科袖认证专家"></em></p>' +
73
							'<p><span class="h1Font" data-id="'+data.data[i].professor.id+'">' + data.data[i].professor.name + '</span><em class="authicon ' + userType.sty + '" title="科袖认证专家"></em></p>' +
74 74
							'</div>' +
75 75
							'</div>' +
76 76
							'<div class="madiaInfo">' +
@ -83,6 +83,8 @@ function leword(row, aa) {
83 83
						document.getElementsByClassName("commentBlock")[0].appendChild(li);
84 84
					}
85 85

86
				}else{
87
					mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
86 88
				}
87 89
			},
88 90
			error: function(xhr, type, errorThrown) {
@ -488,7 +490,15 @@ mui.plusReady(function() {
488 490
	oArticleModule.oAjaxGet(baseUrl + "/ajax/article/ralateRes", {
489 491
		"articleId": oArticleModule.articleId
490 492
	}, "get", oArticleModule.correlationResource);
491
	mui('#expertList,.commentBlock').on('tap', 'li', function() {
493
	mui('#expertList').on('tap', 'li', function() {
494
		var id = this.getAttribute("data-id");
495
		plus.nativeUI.showWaiting(); //显示原生等待框
496
		plus.webview.create("../html/proinforbrow.html", 'proinforbrow.html', {}, {
497
			proid: id
498
		});
499
	})
500
	/*留言*/
501
	mui('.commentBlock').on('tap', '.useHead,.h1Font', function() {
492 502
		var id = this.getAttribute("data-id");
493 503
		plus.nativeUI.showWaiting(); //显示原生等待框
494 504
		plus.webview.create("../html/proinforbrow.html", 'proinforbrow.html', {}, {
@ -499,7 +509,7 @@ mui.plusReady(function() {
499 509
	mui('#resourceList').on('tap', 'li', function() {
500 510
		var resouId = this.getAttribute("data-id");
501 511
		plus.nativeUI.showWaiting();
502
		plus.webview.create("../html/resinforbrow.html", 'resinforbrow.html', {}, {
512
		plus.webview.create("../html/resourceShow.html", 'resourceShow.html', {}, {
503 513
			resourceId: resouId
504 514
		});
505 515
	})
@ -702,7 +712,17 @@ mui.plusReady(function() {
702 712
			}
703 713
		});
704 714
	})
705

715
		mui(".artfoot").on("tap",".inputShow",function(){
716
			if(!plus.storage.getItem('userid')) {
717
				oCurren.login();
718
				return;
719
			}
720
		    	document.getElementById("textInput").style.display="block";
721
		    	document.getElementById("operCol").style.display="none";
722
		    	document.getElementById("textInputThis").focus();
723
		    })
724
		
725
		
706 726
	/*微信及微信朋友圈分享专家*/
707 727
	var auths, shares;
708 728
	plus.oauth.getServices(function(services) {
@ -756,10 +776,9 @@ mui.plusReady(function() {
756 776
			var share = buildShareService("sinaweibo");
757 777
			if(share) {
758 778
				shareMessage(share, "sinaweibo", {
759
					content: document.getElementById("articleContent").innerText.substring(0, 70),
760
					title: document.getElementById("articleName").innerHTML,
761
					href: baseUrl + "/ekexiu/shareArticalinfor.html?articleId=" + oArticleModule.articleId,
762
					thumbs: [baseUrl + "/data/article/" + stt + oArticleModule.articleId + "_s.jpg"]
779
					href: "http://www.ekexiu.com",
780
					content: "88",
781
					thumbs: ["http://www.ekexiu.com/images/logo180.png"]
763 782
				});
764 783
			}
765 784
		}
@ -796,6 +815,7 @@ mui.plusReady(function() {
796 815
			plus.nativeUI.closeWaiting();
797 816
			shareAddIntegral(3);
798 817
		}, function(e) {
818
			console.log(JSON.stringify(e))
799 819
			plus.nativeUI.closeWaiting();
800 820
			if(e.code == -2) {
801 821
				plus.nativeUI.toast('已取消分享', {
@ -804,8 +824,8 @@ mui.plusReady(function() {
804 824
			}
805 825
		});
806 826
	}
807
	/*定位*/
808
	document.querySelector(".icon-liuyan").onclick = function() {
809
		window.location.href = "#title";
810
	}
827
	document.getElementById("listenClick").addEventListener("tap",function(){
828
				mui.scrollTo(document.getElementById("olisten").offsetTop,1000);
829
				
830
			})
811 831
});