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

+ 11 - 8
js/common.js

517
517
518
//时间显示规则
518
//时间显示规则
519
function commenTime(startTime) {
519
function commenTime(startTime) {
520
	console.log(startTime)
520
	var nowTimg = new Date();
521
	var nowTimg = new Date();
521
	var startdate = new Date();
522
	var startdate = new Date();
522
	startdate.setFullYear(parseInt(startTime.substring(0, 4)));
523
	startdate.setFullYear(parseInt(startTime.substring(0, 4)));
534
		return minutes + "分钟前";
535
		return minutes + "分钟前";
535
	} else if(date3 >= 3600000 && date3 < 86400000) {
536
	} else if(date3 >= 3600000 && date3 < 86400000) {
536
		return hours + "小时前";
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
	})
800
	})
798
	if(num == 1) {
801
	if(num == 1) {
799
		return;
802
		return;
800
	}else{
803
	} else {
801
		/*添加*/
804
		/*添加*/
802
		$(".addButton").click(function() {
805
		$(".addButton").click(function() {
803
			var oValue = $(this).siblings("input").val().trim();
806
			var oValue = $(this).siblings("input").val().trim();
828
			$(this).siblings(".keydrop").find("ul").html("");
831
			$(this).siblings(".keydrop").find("ul").html("");
829
		})
832
		})
830
	}
833
	}
831
	
834
832
}
835
}

+ 4 - 3
patentShow.html

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