Bladeren bron

添加个人文章资源等详情的下拉加载

luyanan 7 jaren geleden
bovenliggende
commit
828601fb22

+ 8 - 7
app/css/app.css

@ -323,16 +323,17 @@ ul.boxnav li.set span:before{font-family:"iconfont";content: "\e733";font-size:1
323 323
.personinfo .listtit{ font-size: 20px; line-height: 30px; color: #333333;}
324 324
.personinfo .listtit3{font-size: 14px; line-height: 24px; color: #AAAAAA; margin: 0;}
325 325
/*咨询记录及等级*/
326
.peolevelbox{ display: block; padding:4% 16px; border-top:1px #F0F0F0 solid;}
326
/*.peolevelbox{ display: block; padding:4% 16px; border-top:1px #F0F0F0 solid;}
327 327
.peocountbox{width: 150px;}
328
.peocount {/*font-size: 13px;*/ color:#888888 ; overflow:hidden; }
328
.peocount { color:#888888 ; overflow:hidden; }
329 329
.peocount span em{font-size: 14px; padding: 0 3px; color: #FF9900; font-weight: 600;}
330
.peocount .dialogicon{ /*font-size: 16px;line-height:20px; */color: #FF9900;}
331
.peocount:before{position: absolute;right: 0; top: 0;left: 15px; height: 1px; content: ''; -webkit-transform: scaleY(.5); transform: scaleY(.5);background-color: #c8c7cc;}
330
.peocount .dialogicon{color: #FF9900;}
331
.peocount:before{position: absolute;right: 0; top: 0;left: 15px; height: 1px; content: ''; -webkit-transform: scaleY(.5); transform: scaleY(.5);background-color: #c8c7cc;}*/
332 332
.levelbox{margin: auto; overflow: hidden; }
333 333
.levelbox .mui-icon{ font-size: 14px; color: #CCCCCC;}
334
.icon-favorfill{ color:#F4C600;}
335
.starShow{position: absolute;right: 0;top:50%; margin-top:-8px;overflow: hidden;}
334
.levelbox .icon-favorfill{ color:#F4C600;}
335
.starShow{position: absolute;right: 0;top:-4px;overflow: hidden;}
336
.commentsArea .madiaHead.useHeadMsg{top:36px;margin-top:0;}
336 337
/*专家相关信息*/
337 338
.infocontit{font-size:16px;line-height: 40px;min-height:40px;border-bottom: 1px solid #E5E5E5; position: relative;padding-left: 26px;color:#333}
338 339
.infocontit:before{position:absolute;top:50%;margin-top:-10px;left: 15px;;display:inline-block;content:"";width:4px;height:18px;border-radius:10px;background:#ff9900;}
@ -348,7 +349,7 @@ ul.boxnav li.set span:before{font-family:"iconfont";content: "\e733";font-size:1
348 349
.infocon.madiaBlock>ul{margin:-15px;}
349 350
.infocon.madiaBlock>ul>li{padding-left:15px;}
350 351
.seeMore{cursor:pointer;text-align:center;font-size:14px;color:#999;line-height:40px;height:40px;border-top:1px solid #E5E5E5;position: relative;}
351
.seeMore em{font-style: normal;position:absolute;left:50%;margin-left: -24px;padding-right:5px;}
352
.seeMore em{font-style: normal;position:absolute;left:50%;margin-left: -36px;padding-right:5px;}
352 353
.seeMore em:before{border: solid transparent;border-left-color:#ccc;border-width: 7px;content: " ";position: absolute;left: 100%;top: 12px;}
353 354
.seeMore em:after{border: solid transparent;border-left-color:#fff;border-width: 5px;content: " ";position: absolute;left: 100%;top: 14px;}
354 355
.detailInfo>ul>li{color:#333;padding-left:0;}

+ 10 - 13
app/html/cmpInforShow-article.html

@ -19,22 +19,19 @@
19 19
20 20
		<!-- 主页面内容容器 -->
21 21
		<div class="mui-content">
22
			<div class="mui-input-group mainbox">
23
				<div class="infocon madiaBlock">
24
					<ul class="mui-table-view" id="articelShow">
25
				        <!--<li class="mui-table-view-cell">
26
				            <div class="flexCenter OflexCenter mui-clearfix">
27
				                <div class="madiaHead artHead"></div>
28
								<div class="madiaInfo OmadiaInfo">
29
									<p class="mui-ellipsis-2 h1Font">文章名称章名称文章名称</p>
30
								</div>
31
				            </div>
32
				        </li>-->
33
				    </ul>
22
			<!-- 主界面具体展示内容 -->
23
			<class="mui-scroll-wrapper" id="pullrefresh">
24
			 	<div class="mui-scroll">
25
					<div class="mui-input-group mainbox">
26
						<div class="infocon madiaBlock">
27
							<ul class="mui-table-view" id="articelShow">
28
						        
29
						    </ul>
30
						</div>
31
					</div>
34 32
				</div>
35 33
			</div>
36 34
		</div>
37
		
38 35
		<script src="../js/public/mui.min.js"></script>
39 36
		<script src="../js/public/base.js"></script>
40 37
		<script src="../js/public/mui.zoom.js" type="text/javascript" charset="utf-8"></script>

+ 10 - 14
app/html/cmpInforShow-resources.html

@ -20,21 +20,17 @@
20 20
21 21
		<!-- 主页面内容容器 -->
22 22
		<div class="mui-content">
23
			<div class="mui-input-group mainbox">
24
				<div class="infocon madiaBlock">
25
					<ul class="mui-table-view" id="resourceShow">
26
				        <!--<li class="mui-table-view-cell">
27
				            <div class="flexCenter OflexCenter mui-clearfix">
28
				                <div class="madiaHead artHead"></div>
29
								<div class="madiaInfo OmadiaInfo">
30
									<p class="mui-ellipsis h1Font">名称</p>
31
									<p class="h2Font">用途:的萨芬的国防生的</p>
32
								</div>
33
				            </div>
34
				        </li>-->
35
				    </ul>
23
			<!-- 主界面具体展示内容 -->
24
			<class="mui-scroll-wrapper" id="pullrefresh">
25
			 	<div class="mui-scroll">
26
					<div class="mui-input-group mainbox">
27
						<div class="infocon madiaBlock">
28
							<ul class="mui-table-view" id="resourceShow">
29
						        
30
						    </ul>
31
						</div>
32
					</div>
36 33
				</div>
37
				
38 34
			</div>
39 35
		</div>
40 36
		

+ 9 - 10
app/html/useraiticleList.html

@ -20,17 +20,16 @@
20 20
		<!-- 主页面内容容器 -->
21 21
		<div class="mui-content">
22 22
			<!-- 主界面具体展示内容 -->
23
			
24
		
25
			
26
			
27
			<div class="mui-input-group mainbox">
28
					<div class="infocon madiaBlock">
29
						<ul class="mui-table-view" id="articelShow">
30
					        
31
					    </ul>
23
			<class="mui-scroll-wrapper" id="pullrefresh">
24
			 	<div class="mui-scroll">
25
					<div class="mui-input-group mainbox">
26
						<div class="infocon madiaBlock">
27
							<ul class="mui-table-view" id="articelShow">
28
						        
29
						    </ul>
30
						</div>
32 31
					</div>
33
					<div class="seeMore displayNone" id="seeMoreArtical"><em>查看更多</em></div>
32
				</div>
34 33
			</div>
35 34
		</div>
36 35
		<script src="../js/public/mui.min.js"></script>

+ 9 - 9
app/html/userpaperList.html

@ -20,16 +20,16 @@
20 20
		<!-- 主页面内容容器 -->
21 21
		<div class="mui-content">
22 22
			<!-- 主界面具体展示内容 -->
23
			
24
		
25
			
26
			<div class="mui-input-group mainbox">
27
					<div class="infocon madiaBlock">
28
						<ul class="mui-table-view" id="paper">
29
					        
30
					    </ul>
23
			<class="mui-scroll-wrapper" id="pullrefresh">
24
			 	<div class="mui-scroll">
25
					<div class="mui-input-group mainbox">
26
						<div class="infocon madiaBlock">
27
							<ul class="mui-table-view" id="paper">
28
						        
29
						    </ul>
30
						</div>
31 31
					</div>
32
					<div class="seeMore displayNone" id="seeMorePaper"><em>查看更多</em></div>
32
				</div>
33 33
			</div>
34 34
		</div>
35 35
		<script src="../js/public/mui.min.js"></script>

+ 10 - 10
app/html/userpatentList.html

@ -20,19 +20,19 @@
20 20
		<!-- 主页面内容容器 -->
21 21
		<div class="mui-content">
22 22
			<!-- 主界面具体展示内容 -->
23
			
24
		
25
			
26
			<div class="mui-input-group mainbox">
27
					<div class="infocon madiaBlock">
28
						<ul class="mui-table-view" id="patent">
29
					       
30
					    </ul>
23
			<class="mui-scroll-wrapper" id="pullrefresh">
24
			 	<div class="mui-scroll">
25
					<div class="mui-input-group mainbox">
26
						<div class="infocon madiaBlock">
27
							<ul class="mui-table-view" id="patent">
28
						        
29
						    </ul>
30
						</div>
31 31
					</div>
32
					<div class="seeMore displayNone" id="seeMorePatent"><em>查看更多</em></div>
32
				</div>
33 33
			</div>
34
			
35 34
		</div>
35
		
36 36
		<script src="../js/public/mui.min.js"></script>
37 37
		<script src="../js/public/base.js"></script>
38 38
		<script src="../js/userpatentList.js"></script>

+ 10 - 9
app/html/userresourceList.html

@ -20,18 +20,19 @@
20 20
		<!-- 主页面内容容器 -->
21 21
		<div class="mui-content">
22 22
			<!-- 主界面具体展示内容 -->
23
			
24
		
25
			<div class="mui-input-group mainbox">
26
					<div class="infocon madiaBlock">
27
						<ul class="mui-table-view" id="resourceShow">
28
					        
29
					    </ul>
23
			<class="mui-scroll-wrapper" id="pullrefresh">
24
			 	<div class="mui-scroll">
25
					<div class="mui-input-group mainbox">
26
						<div class="infocon madiaBlock">
27
							<ul class="mui-table-view" id="resourceShow">
28
						        
29
						    </ul>
30
						</div>
30 31
					</div>
31
					
32
				</div>
32 33
			</div>
33
			
34 34
		</div>
35
		
35 36
		<script src="../js/public/mui.min.js"></script>
36 37
		<script src="../js/public/base.js"></script>
37 38
		<script src="../js/userresourceList.js"></script>

+ 93 - 71
app/js/cmpInforShow-article.js

@ -1,79 +1,101 @@
1
mui.ready(function() {
2
	mui.plusReady(function() {
3
        var userid = plus.storage.getItem('userid');
4
		var self = plus.webview.currentWebview();
5
		var orgId = self.cmpId;
6
		console.log(orgId)
7
		
8
		
9
		mui('#articelShow').on('tap', 'li', function() {
10
			var id = this.getAttribute("data-id");
11
			var ownerid = this.getAttribute("owner-id");
12
			plus.nativeUI.showWaiting(); //显示原生等待框
13
			plus.webview.create("../html/professorArticle.html", '../html/professorArticle.html', {}, {
14
				articleId: id,
15
				ownerid:ownerid,
16
				oFlag:1
17
			});
18
		})
19
		
20
		
1
var orgId;
2
mui.init({
3
	pullRefresh: {
4
		container: '#pullrefresh',
5
		up: {
6
			height:50,
7
			contentrefresh: '正在加载...',
8
			callback: pullupRefresh
9
		}
10
	}
11
});
12
var Num=1;
13
function pullupRefresh() {
14
	setTimeout(function() {
15
		++Num;
16
		getArtice(10,Num);
17
	}, 1000);
18

19
}
20

21
mui.plusReady(function() {
22
    var userid = plus.storage.getItem('userid');
23
	var self = plus.webview.currentWebview();
24
	orgId = self.cmpId;
25
	
26
	mui('#articelShow').on('tap', 'li', function() {
27
		var id = this.getAttribute("data-id");
28
		var ownerid = this.getAttribute("owner-id");
29
		plus.nativeUI.showWaiting(); //显示原生等待框
30
		plus.webview.create("../html/professorArticle.html", '../html/professorArticle.html', {}, {
31
			articleId: id,
32
			ownerid:ownerid,
33
			oFlag:1
34
		});
35
	})
36
	getArtice(10,1)
37
})	
21 38
		
22 39
	
23 40
		
24
		/*企业文章html*/
25
		function getArtice22() {
26
			console.log(orgId)
27
			mui.ajax(baseUrl + "/ajax/article/pqOrgPublish", {
28
				type: "GET",
29
				timeout: 10000,
30
				dataType: "json",
31
				data: {
32
					"orgId": orgId,
33
					"pageSize": 100,
34
					"pageNo": 1
35
				},
36
				success: function(data) {
37
					plus.nativeUI.closeWaiting();
38
					self.show("slide-in-right", 150);
39
					if(data.success) {
40
						var obj = data.data.data;
41
						if(obj.length>0){
42
							for(var i = 0; i < obj.length; i++) {
43
								var liItem = document.createElement("li");
44
								liItem.setAttribute("data-id",obj[i].articleId);
45
								liItem.setAttribute("owner-id",obj[i].orgId);
46
								liItem.className = "mui-table-view-cell"
47
								var oString = '<div class="flexCenter OflexCenter mui-clearfix">'
48
								if(obj[i].articleImg) {
49
									oString += '<div class="madiaHead artHead" style="background-image:url(' + baseUrl + '/data/article/' + obj[i].articleImg + ')"></div>'
50
								} else {
51
									oString += '<div class="madiaHead artHead"></div>'
52
								}
53
								oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis-2 h1Font">' + obj[i].articleTitle + '</p>'
54
								oString += '</div></div>'
55
								liItem.innerHTML = oString;
56
								document.getElementById("articelShow").appendChild(liItem);
41
function getArtice(pageSize,pageNo) {
42
	mui.plusReady(function() {
43
		mui.ajax(baseUrl + "/ajax/article/pqOrgPublish", {
44
			type: "GET",
45
			timeout: 10000,
46
			dataType: "json",
47
			data: {
48
				"orgId": orgId,
49
				"pageSize": pageSize,
50
				"pageNo": pageNo
51
			},
52
			success: function(data) {
53
				plus.nativeUI.closeWaiting();
54
				plus.webview.currentWebview().show("slide-in-right", 150);
55
				if(data.success) {
56
					var obj = data.data.data;
57
					if(obj.length>0){
58
						for(var i = 0; i < obj.length; i++) {
59
							var liItem = document.createElement("li");
60
							liItem.setAttribute("data-id",obj[i].articleId);
61
							liItem.setAttribute("owner-id",obj[i].orgId);
62
							liItem.className = "mui-table-view-cell"
63
							var oString = '<div class="flexCenter OflexCenter mui-clearfix">'
64
							if(obj[i].articleImg) {
65
								oString += '<div class="madiaHead artHead" style="background-image:url(' + baseUrl + '/data/article/' + obj[i].articleImg + ')"></div>'
66
							} else {
67
								oString += '<div class="madiaHead artHead"></div>'
57 68
							}
58
						}else{
59
							document.getElementById("articelShow").parentNode.parentNode.style.display="none";
69
							oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis-2 h1Font">' + obj[i].articleTitle + '</p>'
70
							oString += '</div></div>'
71
							liItem.innerHTML = oString;
72
							document.getElementById("articelShow").appendChild(liItem);
60 73
						}
74
						if(obj.length<pageSize){ 
75
							mui("#pullrefresh").pullRefresh().endPullupToRefresh(true);
76
						}
77
					}
78
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
79
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
80
					} else {
81
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
61 82
					}
62
				},
63
				error: function() {
64
					//plus.nativeUI.toast("服务器链接超时", toastStyle);
65
					return;
66 83
				}
67
			})
68
		}
69
		getArtice22()
70
	document.getElementsByClassName("topback")[0].addEventListener("tap",function(){
71
			var web = plus.webview.getWebviewById("cmpInforShow.html");
72
			if(web) 
73
				mui.fire(web, "newId",{
74
									rd: 1
75
							});
84
			},
85
			error: function() {
86
				plus.nativeUI.toast("服务器链接超时", toastStyle);
87
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
88
				return;
89
			}
90
		})
76 91
	})
77
		
78
	});
79
})
92
}
93
	
94
document.getElementsByClassName("topback")[0].addEventListener("tap", function() {
95
	var web = plus.webview.getWebviewById("cmpInforShow.html");
96
	if(web)
97
		mui.fire(web, "newId", {
98
			rd: 1
99
		});
100
})
101
		

+ 89 - 84
app/js/cmpInforShow-resources.js

@ -1,91 +1,96 @@
1
var orgId;
2
mui.init({
3
	pullRefresh: {
4
		container: '#pullrefresh',
5
		up: {
6
			height:50,
7
			contentrefresh: '正在加载...',
8
			callback: pullupRefresh
9
		}
10
	}
11
});
12
var Num=1;
13
function pullupRefresh() {
14
	setTimeout(function() {
15
		Num++;
16
		getResource(10,Num);
17
	}, 1000);
1 18

2
mui.ready(function() {
3
	mui.plusReady(function() {
4
		var userid = plus.storage.getItem('userid');
5
		var self = plus.webview.currentWebview();
6
		var orgId = self.cmpId;
7
		companyMessage(orgId);
19
}
8 20

9
		getResource()
10
		
11
		mui('#resourceShow').on('tap', 'li', function() {
12
			var id = this.getAttribute("data-id");
13
			plus.nativeUI.showWaiting(); //显示原生等待框
14
			plus.webview.create("../html/resourceShow.html", 'resourceShow.html', {}, {
15
				resourceId: id
16
			});
17
		})
18
		
19
		
20
		
21
		function companyMessage(id) {
22
			mui.ajax(baseUrl + "/ajax/org/" + id, {
23
				dataType: 'json', //数据格式类型
24
				type: 'GET', //http请求类型
25
				timeout: 10000, //超时设置
26
				success: function(data) {
27
					if(data.success) {
28
						console.log(JSON.stringify(data));
29
						
30
					}
31
				},
32
				error: function() {
33
					plus.nativeUI.toast("服务器链接超时", toastStyle);
34
					return;
35
				}
36
			});
37
		}
38
		
39
		//获取资源
40
		function getResource() {
41
			mui.ajax(baseUrl + "/ajax/resource/pqOrgPublish", {
42
				type: "GET",
43
				timeout: 10000,
44
				dataType: "json",
45
				data: {
46
					"orgId": orgId,
47
					"pageNo": 1,
48
					"pageSize": 100,
49
				},
50
				success: function(data) {
51
					console.log(JSON.stringify(data))
52
					var web = plus.webview.currentWebview()
53
						plus.nativeUI.closeWaiting();
54
						web.show("slide-in-right", 150);
55
					if(data.success) {
56
						var obj = data.data.data;
57
						if(obj.length>0){
58
							for(var i = 0; i < obj.length; i++) {
59
								var liItem = document.createElement("li");
60
								liItem.setAttribute("data-id",obj[i].resourceId);
61
								liItem.className = "mui-table-view-cell"
62
								var oString = '<div class="flexCenter OflexCenter mui-clearfix">'
63
								if(obj[i].images.length) {
64
									oString += '<div class="madiaHead resouseHead" style="background-image:url(' + baseUrl + '/data/resource/' + obj[i].images[0].imageSrc +')"></div>'
65
								} else {
66
									oString += '<div class="madiaHead resouseHead"></div>'
67
								}
68
								oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis h1Font">' + obj[i].resourceName + '</p><p class="h2Font mui-ellipsis">用途:' + obj[i].supportedServices + '</p>'
69
								oString += '</div></div>'
70
								liItem.innerHTML = oString;
71
								document.getElementById("resourceShow").appendChild(liItem);
21
mui.plusReady(function() {
22
	var userid = plus.storage.getItem('userid');
23
	var self = plus.webview.currentWebview();
24
	orgId = self.cmpId;
25

26
	getResource(10,1);
27
	
28
	mui('#resourceShow').on('tap', 'li', function() {
29
		var id = this.getAttribute("data-id");
30
		plus.nativeUI.showWaiting(); //显示原生等待框
31
		plus.webview.create("../html/resourceShow.html", 'resourceShow.html', {}, {
32
			resourceId: id
33
		});
34
	})
35
})		
36
//获取资源
37
function getResource(pageSize,pageNo) {
38
	mui.plusReady(function() {
39
		mui.ajax(baseUrl + "/ajax/resource/pqOrgPublish", {
40
			type: "GET",
41
			timeout: 10000,
42
			dataType: "json",
43
			data: {
44
				"orgId": orgId,
45
				"pageNo": pageNo,
46
				"pageSize": pageSize,
47
			},
48
			success: function(data) {
49
				console.log(JSON.stringify(data))
50
				plus.nativeUI.closeWaiting();
51
				plus.webview.currentWebview().show("slide-in-right", 150);
52
				if(data.success) {
53
					var obj = data.data.data;
54
					if(obj.length>0){
55
						for(var i = 0; i < obj.length; i++) {
56
							var liItem = document.createElement("li");
57
							liItem.setAttribute("data-id",obj[i].resourceId);
58
							liItem.className = "mui-table-view-cell"
59
							var oString = '<div class="flexCenter OflexCenter mui-clearfix">'
60
							if(obj[i].images.length) {
61
								oString += '<div class="madiaHead resouseHead" style="background-image:url(' + baseUrl + '/data/resource/' + obj[i].images[0].imageSrc +')"></div>'
62
							} else {
63
								oString += '<div class="madiaHead resouseHead"></div>'
72 64
							}
73
							
65
							oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis h1Font">' + obj[i].resourceName + '</p><p class="h2Font mui-ellipsis">用途:' + obj[i].supportedServices + '</p>'
66
							oString += '</div></div>'
67
							liItem.innerHTML = oString;
68
							document.getElementById("resourceShow").appendChild(liItem);
69
						}
70
						if(obj.length<pageSize){ 
71
							mui("#pullrefresh").pullRefresh().endPullupToRefresh(true);
74 72
						}
75 73
					}
76
				},
77
				error: function() {
78
					plus.nativeUI.toast("服务器链接超时", toastStyle);
79
					return;
74
					
75
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
76
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
77
					} else {
78
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
79
					}
80 80
				}
81
				})
82
		}
83
		document.getElementsByClassName("topback")[0].addEventListener("tap",function(){
84
			var web = plus.webview.getWebviewById("cmpInforShow.html");
85
			if(web) 
86
				mui.fire(web, "newId",{
87
									rd: 1
88
							});
81
			},
82
			error: function() {
83
				plus.nativeUI.toast("服务器链接超时", toastStyle);
84
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
85
				return;
86
			}
87
		})
89 88
	})
90
	});
91
})
89
}
90
document.getElementsByClassName("topback")[0].addEventListener("tap", function() {
91
	var web = plus.webview.getWebviewById("cmpInforShow.html");
92
	if(web)
93
		mui.fire(web, "newId", {
94
			rd: 1
95
		});
96
});

+ 36 - 8
app/js/userarticleList.js

@ -1,6 +1,26 @@
1
var proId;
2
mui.init({
3
	pullRefresh: {
4
		container: '#pullrefresh',
5
		up: {
6
			height:50,
7
			contentrefresh: '正在加载...',
8
			callback: pullupRefresh
9
		}
10
	}
11
});
12
var Num=1;
13
function pullupRefresh() {
14
	setTimeout(function() {
15
		++Num;
16
		getArticel(10,Num);
17
	}, 1000);
18

19
}
20

1 21
mui.plusReady(function() {
2 22
	var self = plus.webview.currentWebview();
3
	var proId = self.proid;
23
	proId = self.proid;
4 24
	mui("#articelShow").on("tap", "li", function() {
5 25
		var id = this.getAttribute("data-id");
6 26
		var ownerid = this.getAttribute("owner-id");
@ -12,17 +32,19 @@ mui.plusReady(function() {
12 32
			ownerid: ownerid,
13 33
		});
14 34
	})
15
	/*企业文章html*/
16
	getArticel();
35
	getArticel(10,1);
36
})
17 37

18
	function getArticel() {
38
function getArticel(pageSize,pageNo) {
39
	mui.plusReady(function() {
19 40
		mui.ajax(baseUrl + "/ajax/article/pqProPublish", {
20 41
			type: "GET",
21 42
			timeout: 10000,
22 43
			dataType: "json",
23 44
			data: {
24 45
				"professorId": proId,
25
				"pageSize":100
46
				"pageSize": pageSize,
47
				"pageNo": pageNo
26 48
			},
27 49
			success: function(data) {
28 50
				plus.nativeUI.closeWaiting();
@ -48,15 +70,21 @@ mui.plusReady(function() {
48 70
							liItem.innerHTML = oString;
49 71
							document.getElementById("articelShow").appendChild(liItem);
50 72
						}
73
					}
74
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
75
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
51 76
					} else {
52
						
77
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
53 78
					}
54 79
				}
55 80
			},
56 81
			error: function() {
57 82
				plus.nativeUI.toast("服务器链接超时", toastStyle);
83
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
58 84
				return;
59 85
			}
60 86
		})
61
	}
62
})
87
	})
88
}
89

90


+ 34 - 10
app/js/userpaperList.js

@ -1,6 +1,25 @@
1
var proId;
2
mui.init({
3
	pullRefresh: {
4
		container: '#pullrefresh',
5
		up: {
6
			height:50,
7
			contentrefresh: '正在加载...',
8
			callback: pullupRefresh
9
		}
10
	}
11
});
12
var Num=1;
13
function pullupRefresh() {
14
	setTimeout(function() {
15
		Num++;
16
		getPaper(10,Num);
17
	}, 1000);
18

19
}
1 20
mui.plusReady(function() {
2 21
	var self = plus.webview.currentWebview();
3
	var proId = self.proid;
22
	proId = self.proid;
4 23
	mui("#paper").on("tap", "li", function() {
5 24
		var id = this.getAttribute("data-id");
6 25
		plus.nativeUI.showWaiting();
@ -8,17 +27,18 @@ mui.plusReady(function() {
8 27
			"paperId": id
9 28
		});
10 29
	})
11
	/*论文html*/
12
	getPaper(self.authName)
13
	function getPaper(oName) {
14
		mui.ajax(baseUrl + "/ajax/ppaper/byAuthor", {
30
	getPaper(10,1)
31
})
32
function getPaper(pageSize,pageNo) {
33
	mui.plusReady(function() {
34
		mui.ajax(baseUrl + "/ajax/ppaper/byProfessor", {
15 35
			type: "GET",
16 36
			timeout: 10000,
17 37
			dataType: "json",
18 38
			data: {
19 39
				"id": proId,
20
				"author": oName,
21
				"pageSize":100
40
				"pageSize":pageSize,
41
				"pageNo":pageNo
22 42
			},
23 43
			success: function(data) {
24 44
				plus.nativeUI.closeWaiting();
@ -39,15 +59,19 @@ mui.plusReady(function() {
39 59
								'</div>'
40 60
							document.getElementById("paper").appendChild(li);
41 61
						}
62
					} 
63
					if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
64
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
42 65
					} else {
43
						
66
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
44 67
					}
45 68
				}
46 69
			},
47 70
			error: function() {
48 71
				plus.nativeUI.toast("服务器链接超时", toastStyle);
72
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
49 73
				return;
50 74
			}
51 75
		})
52
	}
53
})
76
	})
77
}

+ 35 - 11
app/js/userpatentList.js

@ -1,7 +1,25 @@
1
mui.plusReady(function() {
1
var proId;
2
mui.init({
3
	pullRefresh: {
4
		container: '#pullrefresh',
5
		up: {
6
			height:50,
7
			contentrefresh: '正在加载...',
8
			callback: pullupRefresh
9
		}
10
	}
11
});
12
var Num=1;
13
function pullupRefresh() {
14
	setTimeout(function() {
15
		Num++;
16
		getPatent(10,Num);
17
	}, 1000);
2 18

19
}
20
mui.plusReady(function() {
3 21
	var self = plus.webview.currentWebview();
4
	var proId = self.proid;
22
	proId = self.proid;
5 23
	mui("#patent").on("tap", "li", function() {
6 24
		var id = this.getAttribute("data-id");
7 25
		plus.nativeUI.showWaiting();
@ -9,17 +27,19 @@ mui.plusReady(function() {
9 27
			"patentId": id
10 28
		});
11 29
	})
12
	getPatent(self.authName)
13
	/*论文html*/
14
	function getPatent(oName) {
15
		mui.ajax(baseUrl + "/ajax/ppatent/byAuthor", {
30
	getPatent(10,1)
31
})
32

33
function getPatent(pageSize,pageNo) {
34
	mui.plusReady(function() {
35
		mui.ajax(baseUrl + "/ajax/ppatent/byProfessor", {
16 36
			type: "GET",
17 37
			timeout: 10000,
18 38
			dataType: "json",
19 39
			data: {
20 40
				"id": proId,
21
				"author": oName,
22
				"pageSize":100
41
				"pageSize":pageSize,
42
				"pageNo":pageNo
23 43
			},
24 44
			success: function(data) {
25 45
				console.log(JSON.stringify(data));
@ -42,15 +62,19 @@ mui.plusReady(function() {
42 62
								'</div>'
43 63
							document.getElementById("patent").appendChild(li);
44 64
						}
65
					}
66
					if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
67
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
45 68
					} else {
46
						document.getElementById("patent").parentNode.parentNode.style.display = "none";
69
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
47 70
					}
48 71
				}
49 72
			},
50 73
			error: function() {
51 74
				plus.nativeUI.toast("服务器链接超时", toastStyle);
75
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
52 76
				return;
53 77
			}
54 78
		})
55
	}
56
})
79
	})
80
}

+ 44 - 13
app/js/userresourceList.js

@ -1,17 +1,49 @@
1
var proId;
2
mui.init({
3
	pullRefresh: {
4
		container: '#pullrefresh',
5
		up: {
6
			height:50,
7
			contentrefresh: '正在加载...',
8
			callback: pullupRefresh
9
		}
10
	}
11
});
12
var Num=1;
13
function pullupRefresh() {
14
	setTimeout(function() {
15
		Num++;
16
		getResource(10,Num);
17
	}, 1000);
18

19
}
20

1 21
mui.plusReady(function() {
2 22
	var self = plus.webview.currentWebview();
3
	var proId = self.proid;
23
	proId = self.proid;
4 24
	console.log(proId)
5
	getResource()
25
	mui("#resourceShow").on("tap", "li", function() {
26
		var resouId = this.getAttribute("data-id");
27
		plus.nativeUI.showWaiting();
28
		plus.webview.create("../html/resourceShow.html", 'resourceShow.html', {}, {
29
			resourceId: resouId
30
		});
31
	})
32
	getResource(10,1);
33
})
34

35
	
6 36

7
	function getResource() {
37
function getResource(pageSize,pageNo) {
38
	mui.plusReady(function() {
8 39
		mui.ajax(baseUrl + "/ajax/resource/pqProPublish", {
9 40
			type: "GET",
10 41
			timeout: 10000,
11 42
			dataType: "json",
12 43
			data: {
13 44
				"professorId": proId,
14
				"pageSize": 100
45
				"pageSize":pageSize,
46
				"pageNo":pageNo
15 47
			},
16 48
			success: function(data) {
17 49
				console.log(JSON.stringify(data))
@ -20,7 +52,6 @@ mui.plusReady(function() {
20 52
				if(data.success) {
21 53
					var obj = data.data.data;
22 54
					if(obj.length > 0) {
23
						
24 55
						for(var i = 0; i < obj.length; i++) {
25 56
							var liItem = document.createElement("li");
26 57
							liItem.className = "mui-table-view-cell"
@ -37,19 +68,19 @@ mui.plusReady(function() {
37 68
							document.getElementById("resourceShow").appendChild(liItem);
38 69
						}
39 70
					} 
71
					if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
72
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
73
					} else {
74
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
75
					}
40 76
				}
41 77
			},
42 78
			error: function() {
43 79
				plus.nativeUI.toast("服务器链接超时", toastStyle);
80
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
44 81
				return;
45 82
			}
46 83
		})
47
	}
48
	mui("#resourceShow").on("tap", "li", function() {
49
		var resouId = this.getAttribute("data-id");
50
		plus.nativeUI.showWaiting();
51
		plus.webview.create("../html/resourceShow.html", 'resourceShow.html', {}, {
52
			resourceId: resouId
53
		});
54 84
	})
55
})
85
}
86