ソースを参照

个人详情专利论文

luyanan 7 年 前
コミット
67ff5407f7
共有3 個のファイルを変更した0 個の追加170 個の削除を含む
  1. 0 2
      app/js/userInforShow.js
  2. 0 84
      app/js/userpaperList.js
  3. 0 84
      app/js/userpatentList.js

+ 0 - 2
app/js/userInforShow.js

330
		patentListVal=function(){
330
		patentListVal=function(){
331
			var aimId="patent"
331
			var aimId="patent"
332
			oAjax("/ajax/ppatent/professor",{
332
			oAjax("/ajax/ppatent/professor",{
333
				"category":"1",
334
				"owner":proId,
333
				"owner":proId,
335
				"rows": rows
334
				"rows": rows
336
			}, "get", function(res){
335
			}, "get", function(res){
356
		paperListVal=function(){
355
		paperListVal=function(){
357
			var aimId="paper"
356
			var aimId="paper"
358
			oAjax("/ajax/ppaper/professor",{
357
			oAjax("/ajax/ppaper/professor",{
359
				"category":"1",
360
				"owner":proId,
358
				"owner":proId,
361
				"rows": rows
359
				"rows": rows
362
			}, "get", function(res){
360
			}, "get", function(res){

+ 0 - 84
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
		getPatent(10,Num);
17
	}, 1000);
18

19
}
20
mui.plusReady(function() {
21
	var self = plus.webview.currentWebview();
22
	proId = self.proid;
23
	mui("#patent").on("tap", "li", function() {
24
		var id = this.getAttribute("data-id");
25
		plus.nativeUI.showWaiting();
26
		plus.webview.create("../html/patentShow.html", 'patentShow.html', {}, {
27
			"patentId": id
28
		});
29
	})
30
	getPatent(10,1)
31
})
32

33
function getPatent(pageSize,pageNo) {
34
	mui.plusReady(function() {
35
		mui.ajax(baseUrl + "/ajax/ppatent/byProfessor", {
36
			type: "GET",
37
			timeout: 10000,
38
			dataType: "json",
39
			data: {
40
				"id": proId,
41
				"pageSize":pageSize,
42
				"pageNo":pageNo
43
			},
44
			success: function(data) {
45
				console.log(JSON.stringify(data));
46
				plus.nativeUI.closeWaiting();
47
				plus.webview.currentWebview().show("slide-in-right", 150);
48
				if(data.success) {
49
					if(pageNo!=data.data.pageNo) {
50
						data.data.data=[];
51
					}
52
					var obj = data.data.data;
53
					if(obj.length > 0) {
54
						for(var i = 0; i < obj.length; i++) {
55
							var li = document.createElement("li");
56
							var li = document.createElement("li");
57
							li.setAttribute("data-id", obj[i].id);
58
							li.className = "mui-table-view-cell";
59
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
60
								'<div class="madiaHead patentHead"></div>' +
61
								'<div class="madiaInfo OmadiaInfo">' +
62
								'<p class="mui-ellipsis-2 h1Font">' + obj[i].name + '</p>' +
63
								'<p class="mui-ellipsis h2Font">' + obj[i].authors.substring(0, obj[i].authors.length - 1) + '</p>' +
64
								'</div>' +
65
								'</div>'
66
							document.getElementById("patent").appendChild(li);
67
						}
68
					}
69
					if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
70
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
71
					} else {
72
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
73
					}
74
				}
75
			},
76
			error: function() {
77
				plus.nativeUI.toast("服务器链接超时", toastStyle);
78
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
79
				return;
80
			}
81
		})
82
	})
83
}
84
var deceleration = mui.os.ios ? 0.003 : 0.0009;
1
var deceleration = mui.os.ios ? 0.003 : 0.0009;
85
mui('.mui-scroll-wrapper').scroll({
2
mui('.mui-scroll-wrapper').scroll({
86
    bounce: false,
3
    bounce: false,
139
				var aimId = "paper",
56
				var aimId = "paper",
140
					newStr = "他尚未发布任何论文"
57
					newStr = "他尚未发布任何论文"
141
				oAjax("/ajax/ppaper/professor",{
58
				oAjax("/ajax/ppaper/professor",{
142
					"category":"1",
143
					"owner":proId,
59
					"owner":proId,
144
					"assTime":dataO.parTime,
60
					"assTime":dataO.parTime,
145
					"id":dataO.parId,
61
					"id":dataO.parId,

+ 0 - 84
app/js/userpatentList.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
		getPatent(10,Num);
17
	}, 1000);
18

19
}
20
mui.plusReady(function() {
21
	var self = plus.webview.currentWebview();
22
	proId = self.proid;
23
	mui("#patent").on("tap", "li", function() {
24
		var id = this.getAttribute("data-id");
25
		plus.nativeUI.showWaiting();
26
		plus.webview.create("../html/patentShow.html", 'patentShow.html', {}, {
27
			"patentId": id
28
		});
29
	})
30
	getPatent(10,1)
31
})
32

33
function getPatent(pageSize,pageNo) {
34
	mui.plusReady(function() {
35
		mui.ajax(baseUrl + "/ajax/ppatent/byProfessor", {
36
			type: "GET",
37
			timeout: 10000,
38
			dataType: "json",
39
			data: {
40
				"id": proId,
41
				"pageSize":pageSize,
42
				"pageNo":pageNo
43
			},
44
			success: function(data) {
45
				console.log(JSON.stringify(data));
46
				plus.nativeUI.closeWaiting();
47
				plus.webview.currentWebview().show("slide-in-right", 150);
48
				if(data.success) {
49
					if(pageNo!=data.data.pageNo) {
50
						data.data.data=[];
51
					}
52
					var obj = data.data.data;
53
					if(obj.length > 0) {
54
						for(var i = 0; i < obj.length; i++) {
55
							var li = document.createElement("li");
56
							var li = document.createElement("li");
57
							li.setAttribute("data-id", obj[i].id);
58
							li.className = "mui-table-view-cell";
59
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
60
								'<div class="madiaHead patentHead"></div>' +
61
								'<div class="madiaInfo OmadiaInfo">' +
62
								'<p class="mui-ellipsis-2 h1Font">' + obj[i].name + '</p>' +
63
								'<p class="mui-ellipsis h2Font">' + obj[i].authors.substring(0, obj[i].authors.length - 1) + '</p>' +
64
								'</div>' +
65
								'</div>'
66
							document.getElementById("patent").appendChild(li);
67
						}
68
					}
69
					if(pageNo < Math.ceil(data.data.total / data.data.pageSize)) {
70
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(false); /*能上拉*/
71
					} else {
72
						mui('#pullrefresh').pullRefresh().endPullupToRefresh(true); /*不能上拉*/
73
					}
74
				}
75
			},
76
			error: function() {
77
				plus.nativeUI.toast("服务器链接超时", toastStyle);
78
				mui('#pullrefresh').pullRefresh().endPullupToRefresh(true);
79
				return;
80
			}
81
		})
82
	})
83
}
84
var deceleration = mui.os.ios ? 0.003 : 0.0009;
1
var deceleration = mui.os.ios ? 0.003 : 0.0009;
85
mui('.mui-scroll-wrapper').scroll({
2
mui('.mui-scroll-wrapper').scroll({
86
    bounce: false,
3
    bounce: false,
139
				var aimId = "patent",
56
				var aimId = "patent",
140
					newStr = "他尚未发布任何专利"
57
					newStr = "他尚未发布任何专利"
141
				oAjax("/ajax/ppatent/professor",{
58
				oAjax("/ajax/ppatent/professor",{
142
					"category":"1",
143
					"owner":proId,
59
					"owner":proId,
144
					"assTime":dataO.patTime,
60
					"assTime":dataO.patTime,
145
					"id":dataO.patId,
61
					"id":dataO.patId,