jack 7 vuotta sitten
vanhempi
commit
d6945fab0f
4 muutettua tiedostoa jossa 41 lisäystä ja 2 poistoa
  1. 1 1
      cmp-portal/cmp-updateinfo.html
  2. 10 0
      cmp-portal/js/cmp-updateinfo.js
  3. 29 0
      e/a.html
  4. 1 1
      js/resourceShow.js

+ 1 - 1
cmp-portal/cmp-updateinfo.html

@ -146,7 +146,7 @@
146 146
										<li>
147 147
											<span class="col-w-2 lableSpan">联系电话:</span>
148 148
											<div class="col-w-5">
149
												<input type="tel" class="frmcontype" placeholder="请填写办公电话" />
149
												<input type="tel" class="frmcontype" placeholder="请填写办公电话" id="phone"/>
150 150
											</div>
151 151
										</li>
152 152
										<li>

+ 10 - 0
cmp-portal/js/cmp-updateinfo.js

@ -238,6 +238,16 @@ $(document).ready(function() {
238 238
				if($("#cmpAddress").val().trim().length>20) {
239 239
					$.MsgBox.Alert('提示', '企业地址 20个字之内!');
240 240
						return;
241
				}else{
242
					$info.addr=$("#cmpAddress").val();
243
				}
244
			}
245
			if($("#phone").val().trim()) {
246
				if($("#phone").val().trim().length>50) {
247
					$.MsgBox.Alert('提示', '办公电话50个字之内!');
248
						return;
249
				}else{
250
					$info.contactNum=$("#cmpAddress").val();
241 251
				}
242 252
			}
243 253
			$info.descp = $("textarea").val();

+ 29 - 0
e/a.html

@ -110,6 +110,7 @@
110 110
						console.log($data);
111 111
						document.getElementById("articleName").innerHTML = $data.articleTitle;
112 112
						shareTitle=$data.articleTitle;
113
						$("#oTime").text(commenTime($data.createTime))
113 114
						document.title=$data.articleTitle;
114 115
						stt = $data.articleImg.substring(0, 9);
115 116
						imgUrl="http://www.ekexiu.com/data/article/" + stt + $data.articleId + "_s.jpg";
@ -274,6 +275,34 @@
274 275

275 276
					}
276 277
				});
278
			function commenTime(startTime){
279
	var nowTimg =  new Date();
280
	var startdate = new Date(); 
281
	startdate.setFullYear(parseInt(startTime.substring(0,4)));
282
	startdate.setMonth(parseInt(startTime.substring(4,6))-1);
283
	startdate.setDate(parseInt(startTime.substring(6,8)));
284
	startdate.setHours(parseInt(startTime.substring(8,10)));
285
	startdate.setMinutes(parseInt(startTime.substring(10,12)));
286
	startdate.setSeconds(parseInt(startTime.substring(12,14)));
287
	var date3=nowTimg.getTime()-startdate.getTime();  //时间差的毫秒数
288
    var hours = parseInt((date3 % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
289
    var minutes = parseInt((date3 % (1000 * 60 * 60)) / (1000 * 60));
290
    if(date3 < 60000){
291
    	return "刚刚";
292
    }else if(date3 >= 60000 && date3 < 3600000){
293
    	return minutes + "分钟前";
294
    }else if(date3 >= 3600000 && date3 < 86400000){
295
    	return hours + "小时前";
296
    }else if(date3 >= 86400000 && date3 < 172800000){
297
    	return "昨天 " + startTime.substring(8,10) + ":" +startTime.substring(10,12);
298
    	
299
    }else if(date3 >= 172800000 && date3 < 31536000000){
300
    	return startTime.substring(4,6).replace(/\b(0+)/gi, "") + "月" + startTime.substring(6,8).replace(/\b(0+)/gi, "") + "日 " + startTime.substring(8,10) + ":" + startTime.substring(10,12);
301
    }
302
    else{
303
    	return startTime.substring(0,4)  + "年" + startTime.substring(4,6).replace(/\b(0+)/gi, "") + "月" + startTime.substring(6,8).replace(/\b(0+)/gi, "") + "日 " + startTime.substring(8,10) + ":" + startTime.substring(10,12);
304
    }
305
}
277 306
			})
278 307
		</script>
279 308


+ 1 - 1
js/resourceShow.js

@ -176,7 +176,7 @@ $(document).ready(function() {
176 176
				"rel": '../images/default-resource.jpg'
177 177
			});
178 178
		}
179
		$("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + weibotitle + "&url=" + weibourl + "&pic=" + weibopic + "&ralateUid=6242830109&searchPic=false&style=simple");
179
		$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+encodeURIComponent(weibotitle)+"&url="+encodeURIComponent(weibourl)+"&pic="+encodeURIComponent(weibopic)+"&content=utf-8"+"&ralateUid=6242830109&searchPic=false&style=simple");
180 180
	}
181 181
	/*点击名字及头像跳转个人浏览页面*/
182 182
	$("#nameS,#headImg").click(function() {