Browse Source

Merge remote-tracking branch 'origin/test'

jack 7 years ago
parent
commit
91b5239a96
10 changed files with 24 additions and 28 deletions
  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,8 +484,8 @@ $(function() {
484 484
			$(".imgtis").text("");
485 485
			imgflase = true;
486 486
		}*/
487
		if(newstitle==""){
488
			$.MsgBox.Alert('提示', '请输入文章标题')
487
		if(newstitle==""){
488
			$.MsgBox.Alert('提示', '请输入文章标题')
489 489
			return;
490 490
		}else{
491 491
			$("#aboutTit span").text("");
@ -718,4 +718,4 @@ $(function() {
718 718
		return otme;
719 719
	}
720 720

721
});
721
});

+ 5 - 8
e/a.html

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

193 190
	</body>
194 191

195
</html>
192
</html>

+ 1 - 2
e/r.html

@ -205,7 +205,6 @@ $(document).ready(function() {
205 205
						}else{
206 206
							othisName.innerHTML = mydata.organization.name;
207 207
						}
208
						
209 208
						if(mydata.organization.subject){
210 209
							othisOther.innerHTML = (mydata.organization.subject).replace(/,/, " | ");
211 210
						}
@ -274,4 +273,4 @@ $(document).ready(function() {
274 273
</script>
275 274
</body>
276 275
277
</html>
276
</html>

+ 1 - 1
js/articalIssue.js

@ -546,4 +546,4 @@ $(function() {
546 546
			}
547 547
		})
548 548
	}
549
});
549
});

+ 2 - 2
js/articalModify.js

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

718
});
718
});

+ 4 - 4
js/articalShow.js

@ -180,6 +180,7 @@ $(function() {
180 180
						$itemlist = $(itemlist);
181 181
						$("#relevantExperts").append($itemlist);
182 182
						if(data.data.title) {
183
183 184
							if(data.data.department) {
184 185
								$itemlist.find("#usertitle").text(data.data.title +" , "+ data.data.department);
185 186
							}else{
@ -194,13 +195,12 @@ $(function() {
194 195
								}
195 196
							}else{
196 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 205
						var researchAreas = data.data.researchAreas;
206 206
						if(researchAreas != ""){

+ 0 - 2
js/common.js

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

+ 2 - 2
js/discover.js

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

171 171
	
172 172

173
})
173
})

+ 5 - 3
js/information.brow.js

@ -195,6 +195,7 @@ $(function() {
195 195
				}
196 196
			}
197 197
		}
198
		var oarray=[];
198 199
		var researchAreaShow = function($datas, $datarecords) {
199 200
			if($datas != undefined && $datas.length != 0) {
200 201
				var html = [];
@ -210,11 +211,12 @@ $(function() {
210 211
						if(userid == $photos[j].id)
211 212
							isAgree++;
212 213
					}
214
					oarray[i]=$data.caption;
213 215
					if(professorId != userid) {
214 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 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 221
					} else {
220 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,7 +283,7 @@ $(function() {
281 283
						"type": "POST",
282 284
						"data": {
283 285
							"targetId": $(this).data("pid"),
284
							"targetCaption": $(this).data("caption"),
286
							"targetCaption": oarray[$(this).data("caption")],
285 287
							"opId": userid
286 288
						},
287 289
						"contentType": "application/x-www-form-urlencoded",

+ 1 - 1
js/resourceShow.js

@ -672,4 +672,4 @@ $(document).ready(function() {
672 672
	})
673 673
	
674 674
	
675
})
675
})