|
@ -74,7 +74,7 @@
|
74
|
74
|
<div class="headblock floatL"><img id="proHead" class="headimg headRadius" src="../images/default-photo.jpg"></div>
|
75
|
75
|
<div class="media-body floatL">
|
76
|
76
|
<span class="listtit"><span id="proName"></span><em class="authicon authicon-cu" style="position:absolute;margin:4px 0 0 2px ;"></em></span>
|
77
|
|
<div class="listtit2"><span id="proTitle"></span><span id="proOffice"></span><span id="proOrg"></span><span id="proAddress"></span></div>
|
|
77
|
<div class="listtit2" id="oMess"></div>
|
78
|
78
|
<div class="mui-ellipsis listtit3" id="proRlist"></div>
|
79
|
79
|
<div class="mui-ellipsis listtit3" id="proZlist"></div>
|
80
|
80
|
</div>
|
|
@ -139,83 +139,25 @@
|
139
|
139
|
console.log(data)
|
140
|
140
|
var $info = data.data || {};
|
141
|
141
|
if(data.success && data.data) {
|
142
|
|
var nameli = document.getElementById("nameli");
|
143
|
|
var proZlist = document.getElementById("proZlist"); //专家资源
|
|
142
|
//var nameli = document.getElementById("nameli");
|
|
143
|
/*var proZlist = document.getElementById("proZlist"); //专家资源
|
144
|
144
|
var proRlist = document.getElementById("proRlist"); //专家资源
|
145
|
145
|
var proName = document.getElementById("proName");
|
146
|
146
|
var proTitle = document.getElementById("proTitle");
|
147
|
147
|
var proOffice = document.getElementById("proOffice");
|
148
|
148
|
var proOrg = document.getElementById("proOrg");
|
149
|
|
var proAddress = document.getElementById("proAddress");
|
|
149
|
var proAddress = document.getElementById("proAddress");*/
|
150
|
150
|
var articleImg = document.getElementById("articleImg");
|
151
|
151
|
var artical_topic = document.getElementById("artical_topic");
|
152
|
152
|
var main_content = document.getElementById("main_content");
|
153
|
153
|
var hiddenImg = document.getElementById("hiddenImg"); //隐藏文章头图位置
|
154
|
|
proName.innerText = $info.professor.name;
|
155
|
|
if($info.professor.title && $info.professor.office && $info.professor.orgName && $info.professor.address) {
|
156
|
|
proTitle.innerText = $info.professor.title + ",";
|
157
|
|
proOffice.innerText = $info.professor.office + ",";
|
158
|
|
proOrg.innerText = $info.professor.orgName + " | ";
|
159
|
|
proAddress.innerText = $info.professor.address;
|
160
|
|
} else if(!$info.professor.title && $info.professor.office && $info.professor.orgName && $info.professor.address) {
|
161
|
|
proOffice.innerText = $info.professor.office + ",";
|
162
|
|
proOrg.innerText = $info.professor.orgName + " | ";
|
163
|
|
proAddress.innerText = $info.professor.address;
|
164
|
|
} else if($info.professor.title && !$info.professor.office && $info.professor.orgName && $info.professor.address) {
|
165
|
|
proTitle.innerText = $info.professor.title + ",";
|
166
|
|
proOrg.innerText = $info.professor.orgName + " | ";
|
167
|
|
proAddress.innerText = $info.professor.address;
|
168
|
|
} else if($info.professor.title && $info.professor.office && !$info.professor.orgName && $info.professor.address) {
|
169
|
|
proTitle.innerText = $info.professor.title + ",";
|
170
|
|
proOffice.innerText = $info.professor.office + " | ";
|
171
|
|
proAddress.innerText = $info.professor.address;
|
172
|
|
} else if($info.professor.title && $info.professor.office && $info.professor.orgName && !$info.professor.address) {
|
173
|
|
proTitle.innerText = $info.professor.title + ",";
|
174
|
|
proOffice.innerText = $info.professor.office + ",";
|
175
|
|
proOrg.innerText = $info.professor.orgName;
|
176
|
|
} else if(!$info.professor.title && !$info.professor.office && $info.professor.orgName && $info.professor.address) {
|
177
|
|
proOrg.innerText = $info.professor.orgName + " | ";
|
178
|
|
proAddress.innerText = $info.professor.address;
|
179
|
|
} else if(!$info.professor.title && $info.professor.office && !$info.professor.orgName && $info.professor.address) {
|
180
|
|
proOffice.innerText = $info.professor.office + " | ";
|
181
|
|
proAddress.innerText = $info.professor.address;
|
182
|
|
} else if(!$info.professor.title && $info.professor.office && $info.professor.orgName && !$info.professor.address) {
|
183
|
|
proOffice.innerText = $info.professor.office + ",";
|
184
|
|
proOrg.innerText = $info.professor.orgName;
|
185
|
|
} else if($info.professor.title && !$info.professor.office && !$info.professor.orgName && $info.professor.address) {
|
186
|
|
proTitle.innerText = $info.professor.title + " | ";
|
187
|
|
proAddress.innerText = $info.professor.address;
|
188
|
|
} else if($info.professor.title && !$info.professor.office && $info.professor.orgName && !$info.professor.address) {
|
189
|
|
proOffice.innerText = $info.professor.title + ",";
|
190
|
|
proAddress.innerText = $info.professor.orgName;
|
191
|
|
} else if($info.professor.title && $info.professor.office && !$info.professor.orgName && !$info.professor.address) {
|
192
|
|
proTitle.innerText = $info.professor.title + ",";
|
193
|
|
proOffice.innerText = $info.professor.office;
|
194
|
|
} else if(!$info.professor.title && !$info.professor.office && !$info.professor.orgName && $info.professor.address) {
|
195
|
|
proAddress.innerText = $info.professor.address;
|
196
|
|
} else if(!$info.professor.title && !$info.professor.office && $info.professor.orgName && !$info.professor.address) {
|
197
|
|
proOrg.innerText = $info.professor.orgName;
|
198
|
|
} else if(!$info.professor.title && $info.professor.office && !$info.professor.orgName && !$info.professor.address) {
|
199
|
|
proOffice.innerText = $info.professor.office;
|
200
|
|
} else if($info.professor.title && !$info.professor.office && !$info.professor.orgName && !$info.professor.address) {
|
201
|
|
proTitle.innerText = $info.professor.title;
|
|
154
|
//proName.innerText = $info.professor.name;
|
|
155
|
if($info.articleType==1){
|
|
156
|
professor($info.professorId);
|
|
157
|
}else{
|
|
158
|
company($info.orgId)
|
202
|
159
|
}
|
203
|
|
var rlist = ''
|
204
|
|
for(var n = 0; n < $info.professor.researchAreas.length; n++) {
|
205
|
|
rlist += '<span>' + $info.professor.researchAreas[n].caption + '</span>';
|
206
|
|
if(n != $info.professor.researchAreas.length - 1) {
|
207
|
|
rlist += ',';
|
208
|
|
}
|
209
|
|
}
|
210
|
|
($info.professor.researchAreas) ? proRlist.innerHTML = rlist: proRlist.innerText = '';
|
211
|
|
var zlist = "";
|
212
|
|
for(var n = 0; n < $info.professor.resources.length; n++) {
|
213
|
|
zlist += '<span>' + $info.professor.resources[n].resourceName + '</span>';
|
214
|
|
if(n != $info.professor.resources.length - 1) {
|
215
|
|
zlist += ',';
|
216
|
|
}
|
217
|
|
}
|
218
|
|
($info.professor.resources) ? proZlist.innerHTML = zlist: proZlist.innerText = '';
|
|
160
|
|
219
|
161
|
|
220
|
162
|
if($info.articleImg) {
|
221
|
163
|
articleImg.style.backgroundImage = 'url(/data/article/' + $info.articleImg + ')';
|
|
@ -226,9 +168,9 @@
|
226
|
168
|
//alert(imgUrl);
|
227
|
169
|
//articleImg.style.backgroundImage = 'url(../images/logo180.png)';
|
228
|
170
|
}
|
229
|
|
if($info.professor.hasHeadImage) {
|
|
171
|
/*if($info.professor.hasHeadImage) {
|
230
|
172
|
document.getElementById('proHead').src = "/images/head/" + $info.professorId + "_l.jpg";
|
231
|
|
}
|
|
173
|
}*/
|
232
|
174
|
artical_topic.innerText = $info.articleTitle;
|
233
|
175
|
|
234
|
176
|
//title标题栏
|
|
@ -261,7 +203,95 @@
|
261
|
203
|
|
262
|
204
|
}
|
263
|
205
|
proInfoMain();
|
|
206
|
/*专家信息*/
|
|
207
|
function professor(dataUrl){
|
|
208
|
$.ajax({
|
|
209
|
url: "/ajax/professor/info/"+dataUrl,
|
|
210
|
type: 'get',
|
|
211
|
dataType: 'json',
|
|
212
|
success: function(data) {
|
|
213
|
if(data.success) {
|
|
214
|
var $data=data.data;
|
|
215
|
$("#proName").text($data.name);
|
|
216
|
var omessage=personalInformation($data);
|
|
217
|
$("#oMess").text(omessage);
|
|
218
|
var oTime = $data["createTime"].substr(0, 4) + "年" + $data.createTime.substr(4, 2) + "月" + $data.createTime.substr(6, 2) + "日" ;
|
|
219
|
$("#proRlist").html(oTime);
|
|
220
|
/*var rlist = ''
|
|
221
|
for(var n = 0; n < $data.researchAreas.length; n++) {
|
|
222
|
rlist += '<span>' + $data.researchAreas[n].caption + '</span>';
|
|
223
|
if(n != $data.researchAreas.length - 1) {
|
|
224
|
rlist += ',';
|
|
225
|
}
|
|
226
|
}
|
|
227
|
($data.researchAreas) ? $("#proRlist").html(rlist): $("#proRlist").html("");
|
|
228
|
var zlist = "";
|
|
229
|
for(var n = 0; n < $data.resources.length; n++) {
|
|
230
|
zlist += '<span>' + $data.resources[n].resourceName + '</span>';
|
|
231
|
if(n != $data.resources.length - 1) {
|
|
232
|
zlist += ',';
|
|
233
|
}
|
|
234
|
}
|
|
235
|
($data.resources) ? $("#proZlist").html(zlist) : $("#proZlist").html("");*/
|
|
236
|
}
|
|
237
|
},
|
|
238
|
});
|
|
239
|
}
|
|
240
|
/*企业信息*/
|
|
241
|
function company(dataUr){
|
|
242
|
$.ajax({
|
|
243
|
url: "/ajax/org/" + dataUr,
|
|
244
|
type: "GET",
|
|
245
|
timeout: 10000,
|
|
246
|
dataType: "json",
|
|
247
|
beforeSend: function() {},
|
|
248
|
success: function(data, textState) {
|
|
249
|
if(data.success) {
|
|
250
|
var $data = data.data;
|
|
251
|
$("#proName").text($data.name);
|
|
252
|
if($data.authStatus == 3) {
|
|
253
|
$("em").replaceWith("<em class='authiconNew authicon-com-ok' title='认证企业'></em>");
|
|
254
|
} else {
|
|
255
|
$("em").replaceWith("");
|
|
256
|
}
|
|
257
|
if($data.hasOrgLogo) {
|
|
258
|
$("#proHead").attr("src", "/images/org/" + $data.id + ".jpg");
|
|
259
|
} else {
|
|
260
|
$("#proHead").attr("src", "images/default-icon.jpg");
|
|
261
|
}
|
|
262
|
var oTime = $data["createTime"].substr(0, 4) + "年" + $data.createTime.substr(4, 2) + "月" + $data.createTime.substr(6, 2) + "日" ;
|
|
263
|
$("#proRlist").html(oTime);
|
|
264
|
}
|
|
265
|
},
|
|
266
|
error: function(XMLHttpRequest, textStats, errorThrown) {
|
|
267
|
$.MsgBox.Alert('提示', '服务器请求失败')
|
|
268
|
}
|
|
269
|
})
|
|
270
|
}
|
|
271
|
/*职位职称所在机构,部门,地址等等*/
|
|
272
|
function personalInformation($person) {
|
|
273
|
var arr1 = [$person.title, $person.office, $person.department, $person.orgName, $person.address];
|
|
274
|
var arr = new Array();
|
|
275
|
var arr2 = new Array();
|
|
276
|
var n = 0;
|
|
277
|
for(var i = 0; i < arr1.length; i++) {
|
|
278
|
if(arr1[i]) {
|
|
279
|
arr.push(arr1[i]);
|
|
280
|
if(arr1[i] == arr1[arr1.length - 1]) {
|
|
281
|
n = 1;
|
|
282
|
}
|
|
283
|
}
|
|
284
|
}
|
|
285
|
if(n == 1) {
|
|
286
|
for(var i = 0; i < arr.length - 1; i++) {
|
|
287
|
arr2.push(arr[i]);
|
|
288
|
}
|
|
289
|
return arr2.join() + " | " + arr[arr.length - 1];
|
|
290
|
} else {
|
|
291
|
return arr.join();
|
|
292
|
}
|
264
|
293
|
|
|
294
|
}
|
265
|
295
|
/*微信分享*/
|
266
|
296
|
$.ajax({
|
267
|
297
|
url: "../ajax/weixin/jsapiTicket",
|