jack 7 years ago
parent
commit
78ef5d1400
3 changed files with 15 additions and 12 deletions
  1. 0 1
      js/articalIssue.js
  2. 11 8
      js/common.js
  3. 4 3
      patentShow.html

+ 0 - 1
js/articalIssue.js

@ -452,7 +452,6 @@ $(function() {
452 452
			"data": $data,
453 453
			"traditional": true, //传数组必须加这个
454 454
			"success": function(data) {
455
				console.log(data);
456 455
				if(data.success) {
457 456
					$("#hidearticleId").val(data.data);
458 457
					location.href = "articalList.html";

+ 11 - 8
js/common.js

@ -517,6 +517,7 @@ $(".msgContbox textarea").focus(function() {
517 517
518 518
//时间显示规则
519 519
function commenTime(startTime) {
520
	console.log(startTime)
520 521
	var nowTimg = new Date();
521 522
	var startdate = new Date();
522 523
	startdate.setFullYear(parseInt(startTime.substring(0, 4)));
@ -534,13 +535,15 @@ function commenTime(startTime) {
534 535
		return minutes + "分钟前";
535 536
	} else if(date3 >= 3600000 && date3 < 86400000) {
536 537
		return hours + "小时前";
537
	} else if(date3 >= 86400000 && date3 < 172800000) {
538
		return "昨天 " + startTime.substring(8, 10) + ":" + startTime.substring(10, 12);
538
	} else if(date3 >= 86400000) {
539 539
540
	} else if(date3 >= 172800000 && date3 < 31536000000) {
541
		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);
542
	} else {
543
		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);
540
		if(nowTimg.getFullYear() == startTime.substring(0, 4)) {
541
542
			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);
543
		} else {
544
545
			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);
546
		}
544 547
	}
545 548
}
546 549
/*时间转换*/
@ -797,7 +800,7 @@ function hotKey(sel, num) {
797 800
	})
798 801
	if(num == 1) {
799 802
		return;
800
	}else{
803
	} else {
801 804
		/*添加*/
802 805
		$(".addButton").click(function() {
803 806
			var oValue = $(this).siblings("input").val().trim();
@ -828,5 +831,5 @@ function hotKey(sel, num) {
828 831
			$(this).siblings(".keydrop").find("ul").html("");
829 832
		})
830 833
	}
831
	
834
832 835
}

+ 4 - 3
patentShow.html

@ -90,7 +90,8 @@
90 90
			.author .authorList li {
91 91
				padding:20px;
92 92
				border:1px solid #e5e5e5;
93
				
93
    			height:50px;
94
    			width:50%;
94 95
			}
95 96
			.author .authorList li div{
96 97
				float:left;
@ -103,7 +104,7 @@
103 104
    				border: 1px solid #999;
104 105
    				background-position: center;
105 106
				}
106
			
107
			.author .authorList li 
107 108
		</style>
108 109
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
109 110
	</head>
@ -163,7 +164,7 @@
163 164
									<div class="prohead"></div>
164 165
									<div>
165 166
										<p class="h1Font"><span>张大大</span><em class="authiconNew authicon-pro" title="科袖认证专家"></em></p>
166
										<p>教授级高工,董事长兼,北京科袖科技有限公司</p>
167
										<p >教授级高工,董事长兼,北京科袖科技有限公司</p>
167 168
									</div>
168 169
								</li>
169 170
							</ul>