浏览代码

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

luyanan 7 年之前
父节点
当前提交
828601fb22

+ 8 - 7
app/css/app.css

323
.personinfo .listtit{ font-size: 20px; line-height: 30px; color: #333333;}
323
.personinfo .listtit{ font-size: 20px; line-height: 30px; color: #333333;}
324
.personinfo .listtit3{font-size: 14px; line-height: 24px; color: #AAAAAA; margin: 0;}
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
.peocountbox{width: 150px;}
327
.peocountbox{width: 150px;}
328
.peocount {/*font-size: 13px;*/ color:#888888 ; overflow:hidden; }
328
.peocount { color:#888888 ; overflow:hidden; }
329
.peocount span em{font-size: 14px; padding: 0 3px; color: #FF9900; font-weight: 600;}
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
.levelbox{margin: auto; overflow: hidden; }
332
.levelbox{margin: auto; overflow: hidden; }
333
.levelbox .mui-icon{ font-size: 14px; color: #CCCCCC;}
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
.infocontit{font-size:16px;line-height: 40px;min-height:40px;border-bottom: 1px solid #E5E5E5; position: relative;padding-left: 26px;color:#333}
338
.infocontit{font-size:16px;line-height: 40px;min-height:40px;border-bottom: 1px solid #E5E5E5; position: relative;padding-left: 26px;color:#333}
338
.infocontit:before{position:absolute;top:50%;margin-top:-10px;left: 15px;;display:inline-block;content:"";width:4px;height:18px;border-radius:10px;background:#ff9900;}
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
.infocon.madiaBlock>ul{margin:-15px;}
349
.infocon.madiaBlock>ul{margin:-15px;}
349
.infocon.madiaBlock>ul>li{padding-left:15px;}
350
.infocon.madiaBlock>ul>li{padding-left:15px;}
350
.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{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
.seeMore em:before{border: solid transparent;border-left-color:#ccc;border-width: 7px;content: " ";position: absolute;left: 100%;top: 12px;}
353
.seeMore em:before{border: solid transparent;border-left-color:#ccc;border-width: 7px;content: " ";position: absolute;left: 100%;top: 12px;}
353
.seeMore em:after{border: solid transparent;border-left-color:#fff;border-width: 5px;content: " ";position: absolute;left: 100%;top: 14px;}
354
.seeMore em:after{border: solid transparent;border-left-color:#fff;border-width: 5px;content: " ";position: absolute;left: 100%;top: 14px;}
354
.detailInfo>ul>li{color:#333;padding-left:0;}
355
.detailInfo>ul>li{color:#333;padding-left:0;}

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

19
19
20
		<!-- 主页面内容容器 -->
20
		<!-- 主页面内容容器 -->
21
		<div class="mui-content">
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
				</div>
32
				</div>
35
			</div>
33
			</div>
36
		</div>
34
		</div>
37
		
38
		<script src="../js/public/mui.min.js"></script>
35
		<script src="../js/public/mui.min.js"></script>
39
		<script src="../js/public/base.js"></script>
36
		<script src="../js/public/base.js"></script>
40
		<script src="../js/public/mui.zoom.js" type="text/javascript" charset="utf-8"></script>
37
		<script src="../js/public/mui.zoom.js" type="text/javascript" charset="utf-8"></script>

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

20
20
21
		<!-- 主页面内容容器 -->
21
		<!-- 主页面内容容器 -->
22
		<div class="mui-content">
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
				</div>
33
				</div>
37
				
38
			</div>
34
			</div>
39
		</div>
35
		</div>
40
		
36
		

+ 9 - 10
app/html/useraiticleList.html

20
		<!-- 主页面内容容器 -->
20
		<!-- 主页面内容容器 -->
21
		<div class="mui-content">
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
					</div>
31
					</div>
33
					<div class="seeMore displayNone" id="seeMoreArtical"><em>查看更多</em></div>
32
				</div>
34
			</div>
33
			</div>
35
		</div>
34
		</div>
36
		<script src="../js/public/mui.min.js"></script>
35
		<script src="../js/public/mui.min.js"></script>

+ 9 - 9
app/html/userpaperList.html

20
		<!-- 主页面内容容器 -->
20
		<!-- 主页面内容容器 -->
21
		<div class="mui-content">
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
					</div>
31
					</div>
32
					<div class="seeMore displayNone" id="seeMorePaper"><em>查看更多</em></div>
32
				</div>
33
			</div>
33
			</div>
34
		</div>
34
		</div>
35
		<script src="../js/public/mui.min.js"></script>
35
		<script src="../js/public/mui.min.js"></script>

+ 10 - 10
app/html/userpatentList.html

20
		<!-- 主页面内容容器 -->
20
		<!-- 主页面内容容器 -->
21
		<div class="mui-content">
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
					</div>
31
					</div>
32
					<div class="seeMore displayNone" id="seeMorePatent"><em>查看更多</em></div>
32
				</div>
33
			</div>
33
			</div>
34
			
35
		</div>
34
		</div>
35
		
36
		<script src="../js/public/mui.min.js"></script>
36
		<script src="../js/public/mui.min.js"></script>
37
		<script src="../js/public/base.js"></script>
37
		<script src="../js/public/base.js"></script>
38
		<script src="../js/userpatentList.js"></script>
38
		<script src="../js/userpatentList.js"></script>

+ 10 - 9
app/html/userresourceList.html

20
		<!-- 主页面内容容器 -->
20
		<!-- 主页面内容容器 -->
21
		<div class="mui-content">
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
					</div>
31
					</div>
31
					
32
				</div>
32
			</div>
33
			</div>
33
			
34
		</div>
34
		</div>
35
		
35
		<script src="../js/public/mui.min.js"></script>
36
		<script src="../js/public/mui.min.js"></script>
36
		<script src="../js/public/base.js"></script>
37
		<script src="../js/public/base.js"></script>
37
		<script src="../js/userresourceList.js"></script>
38
		<script src="../js/userresourceList.js"></script>

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

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
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
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
mui.plusReady(function() {
21
mui.plusReady(function() {
2
	var self = plus.webview.currentWebview();
22
	var self = plus.webview.currentWebview();
3
	var proId = self.proid;
23
	proId = self.proid;
4
	mui("#articelShow").on("tap", "li", function() {
24
	mui("#articelShow").on("tap", "li", function() {
5
		var id = this.getAttribute("data-id");
25
		var id = this.getAttribute("data-id");
6
		var ownerid = this.getAttribute("owner-id");
26
		var ownerid = this.getAttribute("owner-id");
12
			ownerid: ownerid,
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
		mui.ajax(baseUrl + "/ajax/article/pqProPublish", {
40
		mui.ajax(baseUrl + "/ajax/article/pqProPublish", {
20
			type: "GET",
41
			type: "GET",
21
			timeout: 10000,
42
			timeout: 10000,
22
			dataType: "json",
43
			dataType: "json",
23
			data: {
44
			data: {
24
				"professorId": proId,
45
				"professorId": proId,
25
				"pageSize":100
46
				"pageSize": pageSize,
47
				"pageNo": pageNo
26
			},
48
			},
27
			success: function(data) {
49
			success: function(data) {
28
				plus.nativeUI.closeWaiting();
50
				plus.nativeUI.closeWaiting();
48
							liItem.innerHTML = oString;
70
							liItem.innerHTML = oString;
49
							document.getElementById("articelShow").appendChild(liItem);
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
					} else {
76
					} else {
52
						
77
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
53
					}
78
					}
54
				}
79
				}
55
			},
80
			},
56
			error: function() {
81
			error: function() {
57
				plus.nativeUI.toast("服务器链接超时", toastStyle);
82
				plus.nativeUI.toast("服务器链接超时", toastStyle);
83
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
58
				return;
84
				return;
59
			}
85
			}
60
		})
86
		})
61
	}
62
})
87
	})
88
}
89

90


+ 34 - 10
app/js/userpaperList.js

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
mui.plusReady(function() {
20
mui.plusReady(function() {
2
	var self = plus.webview.currentWebview();
21
	var self = plus.webview.currentWebview();
3
	var proId = self.proid;
22
	proId = self.proid;
4
	mui("#paper").on("tap", "li", function() {
23
	mui("#paper").on("tap", "li", function() {
5
		var id = this.getAttribute("data-id");
24
		var id = this.getAttribute("data-id");
6
		plus.nativeUI.showWaiting();
25
		plus.nativeUI.showWaiting();
8
			"paperId": id
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
			type: "GET",
35
			type: "GET",
16
			timeout: 10000,
36
			timeout: 10000,
17
			dataType: "json",
37
			dataType: "json",
18
			data: {
38
			data: {
19
				"id": proId,
39
				"id": proId,
20
				"author": oName,
21
				"pageSize":100
40
				"pageSize":pageSize,
41
				"pageNo":pageNo
22
			},
42
			},
23
			success: function(data) {
43
			success: function(data) {
24
				plus.nativeUI.closeWaiting();
44
				plus.nativeUI.closeWaiting();
39
								'</div>'
59
								'</div>'
40
							document.getElementById("paper").appendChild(li);
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
					} else {
65
					} else {
43
						
66
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
44
					}
67
					}
45
				}
68
				}
46
			},
69
			},
47
			error: function() {
70
			error: function() {
48
				plus.nativeUI.toast("服务器链接超时", toastStyle);
71
				plus.nativeUI.toast("服务器链接超时", toastStyle);
72
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
49
				return;
73
				return;
50
			}
74
			}
51
		})
75
		})
52
	}
53
})
76
	})
77
}

+ 35 - 11
app/js/userpatentList.js

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
	var self = plus.webview.currentWebview();
21
	var self = plus.webview.currentWebview();
4
	var proId = self.proid;
22
	proId = self.proid;
5
	mui("#patent").on("tap", "li", function() {
23
	mui("#patent").on("tap", "li", function() {
6
		var id = this.getAttribute("data-id");
24
		var id = this.getAttribute("data-id");
7
		plus.nativeUI.showWaiting();
25
		plus.nativeUI.showWaiting();
9
			"patentId": id
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
			type: "GET",
36
			type: "GET",
17
			timeout: 10000,
37
			timeout: 10000,
18
			dataType: "json",
38
			dataType: "json",
19
			data: {
39
			data: {
20
				"id": proId,
40
				"id": proId,
21
				"author": oName,
22
				"pageSize":100
41
				"pageSize":pageSize,
42
				"pageNo":pageNo
23
			},
43
			},
24
			success: function(data) {
44
			success: function(data) {
25
				console.log(JSON.stringify(data));
45
				console.log(JSON.stringify(data));
42
								'</div>'
62
								'</div>'
43
							document.getElementById("patent").appendChild(li);
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
					} else {
68
					} else {
46
						document.getElementById("patent").parentNode.parentNode.style.display = "none";
69
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
47
					}
70
					}
48
				}
71
				}
49
			},
72
			},
50
			error: function() {
73
			error: function() {
51
				plus.nativeUI.toast("服务器链接超时", toastStyle);
74
				plus.nativeUI.toast("服务器链接超时", toastStyle);
75
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
52
				return;
76
				return;
53
			}
77
			}
54
		})
78
		})
55
	}
56
})
79
	})
80
}

+ 44 - 13
app/js/userresourceList.js

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
mui.plusReady(function() {
21
mui.plusReady(function() {
2
	var self = plus.webview.currentWebview();
22
	var self = plus.webview.currentWebview();
3
	var proId = self.proid;
23
	proId = self.proid;
4
	console.log(proId)
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
		mui.ajax(baseUrl + "/ajax/resource/pqProPublish", {
39
		mui.ajax(baseUrl + "/ajax/resource/pqProPublish", {
9
			type: "GET",
40
			type: "GET",
10
			timeout: 10000,
41
			timeout: 10000,
11
			dataType: "json",
42
			dataType: "json",
12
			data: {
43
			data: {
13
				"professorId": proId,
44
				"professorId": proId,
14
				"pageSize": 100
45
				"pageSize":pageSize,
46
				"pageNo":pageNo
15
			},
47
			},
16
			success: function(data) {
48
			success: function(data) {
17
				console.log(JSON.stringify(data))
49
				console.log(JSON.stringify(data))
20
				if(data.success) {
52
				if(data.success) {
21
					var obj = data.data.data;
53
					var obj = data.data.data;
22
					if(obj.length > 0) {
54
					if(obj.length > 0) {
23
						
24
						for(var i = 0; i < obj.length; i++) {
55
						for(var i = 0; i < obj.length; i++) {
25
							var liItem = document.createElement("li");
56
							var liItem = document.createElement("li");
26
							liItem.className = "mui-table-view-cell"
57
							liItem.className = "mui-table-view-cell"
37
							document.getElementById("resourceShow").appendChild(liItem);
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
			error: function() {
78
			error: function() {
43
				plus.nativeUI.toast("服务器链接超时", toastStyle);
79
				plus.nativeUI.toast("服务器链接超时", toastStyle);
80
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
44
				return;
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