Просмотр исходного кода

Merge remote-tracking branch 'origin/test'

jack лет назад: 7
Родитель
Сommit
91b5239a96
10 измененных файлов с 24 добавлено и 28 удалено
  1. 3 3
      cmp-portal/js/articalModify.js
  2. 5 8
      e/a.html
  3. 1 2
      e/r.html
  4. 1 1
      js/articalIssue.js
  5. 2 2
      js/articalModify.js
  6. 4 4
      js/articalShow.js
  7. 0 2
      js/common.js
  8. 2 2
      js/discover.js
  9. 5 3
      js/information.brow.js
  10. 1 1
      js/resourceShow.js

+ 3 - 3
cmp-portal/js/articalModify.js

484
			$(".imgtis").text("");
484
			$(".imgtis").text("");
485
			imgflase = true;
485
			imgflase = true;
486
		}*/
486
		}*/
487
		if(newstitle==""){
488
			$.MsgBox.Alert('提示', '请输入文章标题')
487
		if(newstitle==""){
488
			$.MsgBox.Alert('提示', '请输入文章标题')
489
			return;
489
			return;
490
		}else{
490
		}else{
491
			$("#aboutTit span").text("");
491
			$("#aboutTit span").text("");
718
		return otme;
718
		return otme;
719
	}
719
	}
720

720

721
});
721
});

+ 5 - 8
e/a.html

122
					articleMess: function($data) {
122
					articleMess: function($data) {
123
						console.log($data);
123
						console.log($data);
124
						document.getElementById("articleName").innerHTML = $data.articleTitle;
124
						document.getElementById("articleName").innerHTML = $data.articleTitle;
125
						$("#oTime").text(commenTime($data.createTime))
125
						shareTitle=$data.articleTitle;
126
						shareTitle=$data.articleTitle;
126
						$("#oTime").text(commenTime($data.createTime))
127
						$("#oTime").text(commenTime($data.createTime))
127
						document.title=$data.articleTitle;
128
						document.title=$data.articleTitle;
130
						console.log(stt)
131
						console.log(stt)
131
						if($data.articleContent) {
132
						if($data.articleContent) {
132
							document.getElementById("articleContent").innerHTML = $data.articleContent;
133
							document.getElementById("articleContent").innerHTML = $data.articleContent;
133
							
134
							descContent=document.getElementById("articleContent").innerText;
134
							descContent=document.getElementById("articleContent").innerText;
135
							console.log($data.articleContent)
135
							console.log($data.articleContent)
136
							console.log(descContent)
136
							console.log(descContent)
137
						}
137
						}
138
						if($data.subject) {
138
						if($data.subject) {
139
							document.getElementsByClassName("tagList")[0].style.display = "block";
139
							document.getElementsByClassName("tagList")[0].style.display = "block";
170
							document.getElementById('name').innerHTML = $data.forShort;
170
							document.getElementById('name').innerHTML = $data.forShort;
171
						}else{
171
						}else{
172
							document.getElementById('name').innerHTML = $data.name;
172
							document.getElementById('name').innerHTML = $data.name;
173
						}
174
						document.getElementById("messImg").classList.add("cmpHead");
175
						document.getElementById("messImg").innerHTML='<div class="boxBlock" style="width:50px;height:50px;"><img class="boxBlockimg" id="companyImg" src="../images/default-icon.jpg"></div>'
173
						}
176
						if($data.hasOrgLogo) {
174
						if($data.hasOrgLogo) {
177
							document.getElementById("companyImg").src= "/images/org/" + $data.id + ".jpg";
175
							document.getElementById("companyImg").src= "/images/org/" + $data.id + ".jpg";
178
						}
176
						}
185
				oArticleModule.oAjaxGet("../ajax/article/query", {
183
				oArticleModule.oAjaxGet("../ajax/article/query", {
186
					articleId: oArticleModule.articleId
184
					articleId: oArticleModule.articleId
187
				}, "get", oArticleModule.articleMess);
185
				}, "get", oArticleModule.articleMess);
188
				
189
				shareWays();//分享方式
186
				shareWays();//分享方式
190
			})
187
			})
191
		</script>
188
		</script>
192

189

193
	</body>
190
	</body>
194

191

195
</html>
192
</html>

+ 1 - 2
e/r.html

205
						}else{
205
						}else{
206
							othisName.innerHTML = mydata.organization.name;
206
							othisName.innerHTML = mydata.organization.name;
207
						}
207
						}
208
						
209
						if(mydata.organization.subject){
208
						if(mydata.organization.subject){
210
							othisOther.innerHTML = (mydata.organization.subject).replace(/,/, " | ");
209
							othisOther.innerHTML = (mydata.organization.subject).replace(/,/, " | ");
211
						}
210
						}
274
</script>
273
</script>
275
</body>
274
</body>
276
275
277
</html>
276
</html>

+ 1 - 1
js/articalIssue.js

546
			}
546
			}
547
		})
547
		})
548
	}
548
	}
549
});
549
});

+ 2 - 2
js/articalModify.js

482
			imgflase = true;
482
			imgflase = true;
483
		}*/
483
		}*/
484
		if(newstitle==""){
484
		if(newstitle==""){
485
			$.MsgBox.Alert('提示', '请输入文章标题')
485
			$.MsgBox.Alert('提示', '请输入文章标题')
486
			return;
486
			return;
487
		}else{
487
		}else{
488
			$("#aboutTit span").text("");
488
			$("#aboutTit span").text("");
715
		return otme;
715
		return otme;
716
	}
716
	}
717

717

718
});
718
});

+ 4 - 4
js/articalShow.js

180
						$itemlist = $(itemlist);
180
						$itemlist = $(itemlist);
181
						$("#relevantExperts").append($itemlist);
181
						$("#relevantExperts").append($itemlist);
182
						if(data.data.title) {
182
						if(data.data.title) {
183
183
							if(data.data.department) {
184
							if(data.data.department) {
184
								$itemlist.find("#usertitle").text(data.data.title +" , "+ data.data.department);
185
								$itemlist.find("#usertitle").text(data.data.title +" , "+ data.data.department);
185
							}else{
186
							}else{
194
								}
195
								}
195
							}else{
196
							}else{
196
								if(data.data.department) {
197
								if(data.data.department) {
197
									$itemlist.find("#usertitle").text(data.data.department);
198
									$itemlist.find("#usertitle").text(data.data.department);
198
								}
199
								}
199
							}
200
							}
200
						}
201
						}
201
						$itemlist.find("#userName").text(data.data.name);
202
						
203
						$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
202
						$itemlist.find("#userName").text(data.data.name);				
203
						$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
204
						/*获取研究方向信息*/
204
						/*获取研究方向信息*/
205
						var researchAreas = data.data.researchAreas;
205
						var researchAreas = data.data.researchAreas;
206
						if(researchAreas != ""){
206
						if(researchAreas != ""){

+ 0 - 2
js/common.js

514
}).blur(function() {
514
}).blur(function() {
515
	$(this).parent().css("border-color", "#E5E5E5");
515
	$(this).parent().css("border-color", "#E5E5E5");
516
})
516
})
517
518
//时间显示规则
517
//时间显示规则
519
function commenTime(startTime) {
518
function commenTime(startTime) {
520
	//console.log(startTime)
521
	var nowTimg = new Date();
519
	var nowTimg = new Date();
522
	var startdate = new Date();
520
	var startdate = new Date();
523
	startdate.setFullYear(parseInt(startTime.substring(0, 4)));
521
	startdate.setFullYear(parseInt(startTime.substring(0, 4)));

+ 2 - 2
js/discover.js

143
					if(data.data.forShort) {
143
					if(data.data.forShort) {
144
						$itemlist.find("#nameSpan").text(data.data.forShort);
144
						$itemlist.find("#nameSpan").text(data.data.forShort);
145
					}else{
145
					}else{
146
						$itemlist.find("#nameSpan").text(data.data.name);
146
						$itemlist.find("#nameSpan").text(data.data.name);
147
					}
147
					}
148
					$itemlist.find("#userimg").attr("style", "background:#fff");
148
					$itemlist.find("#userimg").attr("style", "background:#fff");
149
					$itemlist.find("#userimg").html('<div class="boxBlock"><img class="boxBlockimg companyImg" src=""></div>');
149
					$itemlist.find("#userimg").html('<div class="boxBlock"><img class="boxBlockimg companyImg" src=""></div>');
170

170

171
	
171
	
172

172

173
})
173
})

+ 5 - 3
js/information.brow.js

195
				}
195
				}
196
			}
196
			}
197
		}
197
		}
198
		var oarray=[];
198
		var researchAreaShow = function($datas, $datarecords) {
199
		var researchAreaShow = function($datas, $datarecords) {
199
			if($datas != undefined && $datas.length != 0) {
200
			if($datas != undefined && $datas.length != 0) {
200
				var html = [];
201
				var html = [];
210
						if(userid == $photos[j].id)
211
						if(userid == $photos[j].id)
211
							isAgree++;
212
							isAgree++;
212
					}
213
					}
214
					oarray[i]=$data.caption;
213
					if(professorId != userid) {
215
					if(professorId != userid) {
214
						if(isAgree) {
216
						if(isAgree) {
215
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus ' data-pid='" + $data.professorId + "' data-caption='" + $data.caption + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" + $data.caption + "'>";
217
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus ' data-pid='" + $data.professorId + "' data-caption='" + i + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" +$data.caption + "'>";
216
						} else {
218
						} else {
217
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus' style=' background-position-y:-26px' data-pid='" + $data.professorId + "' data-caption='" + $data.caption + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" + $data.caption + "'>";
219
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus' style=' background-position-y:-26px' data-pid='" + $data.professorId + "' data-caption='" + i + "' data-isagree='" + isAgree + "' ></span><div class='like-num favorBox' caption='" + $data.caption + "'>";
218
						}
220
						}
219
					} else {
221
					} else {
220
						var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num favorBox' caption='" + $data.caption + "'>";
222
						var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse favorBox' caption='" + $data.caption + "'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num favorBox' caption='" + $data.caption + "'>";
281
						"type": "POST",
283
						"type": "POST",
282
						"data": {
284
						"data": {
283
							"targetId": $(this).data("pid"),
285
							"targetId": $(this).data("pid"),
284
							"targetCaption": $(this).data("caption"),
286
							"targetCaption": oarray[$(this).data("caption")],
285
							"opId": userid
287
							"opId": userid
286
						},
288
						},
287
						"contentType": "application/x-www-form-urlencoded",
289
						"contentType": "application/x-www-form-urlencoded",

+ 1 - 1
js/resourceShow.js

672
	})
672
	})
673
	
673
	
674
	
674
	
675
})
675
})