jack 7 years ago
parent
commit
ab30333a9f
2 changed files with 117 additions and 3 deletions
  1. 115 1
      e/l.html
  2. 2 2
      e/z.html

+ 115 - 1
e/l.html

@ -77,7 +77,7 @@
77 77
					      </li>
78 78
					    </ul>
79 79
				</div>
80
				<div class="madiaBlock" style="padding-bottom:50px;">
80
				<div class="madiaBlock displayNone" style="padding-bottom:50px;" id="leword">
81 81
						<div class="madiaTit" id="olisten">留言</div>
82 82
						<ul class="mui-table-view commentBlock noactiveTab">
83 83
					     
@ -109,6 +109,120 @@ $(document).ready(function() {
109 109
	var appid = '';
110 110
	
111 111
	var paperId = GetQueryString("id");
112
	isAgreeNum()
113
	function isAgreeNum() {
114
	var data = {"id": paperId}
115
	$.ajax({		
116
		url:"/ajax/ppaper/agreeCount",
117
		data:data,
118
		dataType: 'json', //数据格式类型
119
		type: 'get', //http请求类型
120
		timeout: 10000,
121
		async: true,
122
		success: function(data) {
123
			if(data.success){		
124
					$(".thumbBtn").html("赞 <span>" + data.data + "</span>");
125
			}
126
		},
127
		error: function() {
128
			$.MsgBox.Alert('提示',"服务器链接超时");
129
		}
130
	});
131
}
132
	leword();
133
	function leword(){
134
			$.ajax({
135
				url:"/ajax/leaveWord/ql/paper",
136
				data: {
137
					"paperId":paperId,
138
					"rows":100	},
139
				dataType: 'json', //服务器返回json格式数据
140
				type: 'get', //HTTP请求类型
141
				timeout: 10000, //超时时间设置为10秒;
142
				traditional: true,
143
				success: function(data) {
144
					if(data.success) {
145
						console.log(data)
146
						if(data.data.length == 0) {
147
							return;
148
						}
149
						$("#leword").show();
150
						for(var i = 0; i < data.data.length; i++) {
151
							var oText = ""
152
							var userType = autho(data.data[i].professor.authType, data.data[i].professor.orgAuth, data.data[i].professor.authStatus);
153
							var baImg = "../images/default-photo.jpg";
154
							if(data.data[i].professor.hasHeadImage == 1) {
155
								baImg = "/images/head/" + data.data[i].professor.id + "_l.jpg";
156
							}
157
							var li = document.createElement("li");
158
							li.innerHTML = '<div class="flexCenter clearfix" data-id="' + data.data[i].professor.id + '">' +
159
								'<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
160
								'<div class="madiaInfo">' +
161
								'<p><span class="h1Font" data-id="' + data.data[i].professor.id + '">' + data.data[i].professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
162
								'</div>' +
163
								'</div>' +
164
								'<div class="madiaInfo">' +
165
								'<p class="h2Font">' + data.data[i].content + '</p>' +
166
								'<p class="operateSpan">' +
167
								'<span class="commenttime">' + commenTime(data.data[i].createTime) + '</span>' +
168
//								'<span data-id="' + data.data[i].id + '" class="dele">' + oText + '</span>' +
169
								'</p>' +
170
								'</div>'
171
							document.getElementsByClassName("commentBlock")[0].appendChild(li);
172
						}
173
	
174
					}
175
				},
176
				error: function() {
177
				}
178
			});
179
		}
180
	$(".commentBlock").on("click","li>.flexCenter",function(){
181
		location.href="http://" + window.location.host + "/e/p.html?id=" + $(this).attr("data-id");
182
	})
183
	$("body").on("click",".authicon,.thumbBtn",function(){
184
			location.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app";
185
			$(this).addClass("activeThis");
186
		})
187
	paperInterestingList()
188
	function paperInterestingList(){
189
		$.ajax({
190
			"url" : "/ajax/ppaper/ralatePatents",
191
			"type" :  "GET" ,
192
			"dataType" : "json",
193
			"data" :{
194
				"paperId":paperId
195
			},
196
			//"async":false,
197
			"traditional": true, //传数组必须加这个
198
			"success" : function(data) {
199
				if(data.success) {
200
					console.log(data);
201
					var dataStr=data.data
202
					if(dataStr.length > 0){
203
						$("#patentModule").show();
204
						var itemlist = '';
205
						for(var i = 0; i < dataStr.length; i++) {
206
							var itemlist = '<li class="mui-table-view-cell" data-id="'+dataStr[i].id+'">';
207
							itemlist += '<div class="flexCenter OflexCenter mui-clearfix"><div class="madiaHead paperHead"></div>';
208
							itemlist += '<div class="madiaInfo OmadiaInfo">';
209
							itemlist += '<p class="ellipsisSty h1Font">'+ dataStr[i].name +'</p>';
210
							itemlist += '<p class="ellipsisSty h2Font">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
211
							itemlist += '</div></div></li>';
212
							$itemlist = $(itemlist);
213
							$("#paperList").append($itemlist);
214
						}
215
					}
216
				}
217
			},
218
			"error":function(){
219
				$.MsgBox.Alert('提示','链接服务器超时')
220
			}
221
		});
222
	}
223
	$("#paperList").on("click","li",function(){
224
		location.href="http://" + window.location.host + "/e/l.html?id=" + $(this).attr("data-id");
225
	});
112 226
	getRecourceMe();/*获取信息*/
113 227
	$.ajax({
114 228
		"url": "../ajax/ppaper/incPageViews",

+ 2 - 2
e/z.html

@ -75,7 +75,7 @@
75 75
				<div class="madiaBlock displayNone" id="patentModule">
76 76
						<div class="madiaTit">您可能感兴趣的专利</div>
77 77
						<ul class="mui-table-view" id="patentList">
78
							<li class="mui-table-view-cell">
78
							<!--<li class="mui-table-view-cell">
79 79
						       	<div class="flexCenter OflexCenter mui-clearfix">
80 80
									<div class="madiaHead patentHead"></div>
81 81
									<div class="madiaInfo OmadiaInfo">
@ -83,7 +83,7 @@
83 83
										<p class="ellipsisSty h2Font">作者:李丹,梁君武,刘华伟,张学红,万强,张清林,潘安练</p>
84 84
									</div>
85 85
								</div>
86
					       </li>
86
					       </li>-->
87 87
					    </ul>
88 88
				</div>
89 89
				<div class="madiaBlock displayNone" style="padding-bottom:50px;" id="leword">