Browse Source

修改文章时定时发布显示的默认时间

luyanan 7 years ago
parent
commit
bef5944f3d

+ 26 - 0
articalModify.html

@ -198,6 +198,32 @@ $(function () {
198 198
    	autoclose: true,
199 199
       // todayBtn: true
200 200
    });
201
    function getNowFormatDate() {
202
	    var date = new Date();
203
	    var seperator1 = "-";
204
	    var seperator2 = ":";
205
	    var month = date.getMonth() + 1;
206
	    var strDate = date.getDate();
207
	    var getHours = date.getHours();
208
	    var getMinutes = date.getMinutes();
209
	    if (month >= 1 && month <= 9) {
210
	        month = "0" + month;
211
	    }
212
	    if (strDate >= 0 && strDate <= 9) {
213
	        strDate = "0" + strDate;
214
	    }
215
	    if (getMinutes >= 0 && getMinutes <= 9) {
216
	        getMinutes = "0" + getMinutes;
217
	    }
218
	     if (getHours >= 0 && getHours <= 9) {
219
	        getHours = "0" + getHours;
220
	    }
221
	    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
222
	            + " " + getHours + seperator2 + getMinutes
223
	           
224
	    return currentdate;
225
	}
226
    $(".form_datetime").val(getNowFormatDate(currentdate));
201 227
});
202 228
//Model模态框打开关闭
203 229


+ 26 - 0
cmp-portal/articalModify.html

@ -213,6 +213,32 @@ $(function () {
213 213
    	autoclose: true,
214 214
        //todayBtn: true
215 215
    });
216
    function getNowFormatDate() {
217
	    var date = new Date();
218
	    var seperator1 = "-";
219
	    var seperator2 = ":";
220
	    var month = date.getMonth() + 1;
221
	    var strDate = date.getDate();
222
	    var getHours = date.getHours();
223
	    var getMinutes = date.getMinutes();
224
	    if (month >= 1 && month <= 9) {
225
	        month = "0" + month;
226
	    }
227
	    if (strDate >= 0 && strDate <= 9) {
228
	        strDate = "0" + strDate;
229
	    }
230
	    if (getMinutes >= 0 && getMinutes <= 9) {
231
	        getMinutes = "0" + getMinutes;
232
	    }
233
	     if (getHours >= 0 && getHours <= 9) {
234
	        getHours = "0" + getHours;
235
	    }
236
	    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
237
	            + " " + getHours + seperator2 + getMinutes
238
	           
239
	    return currentdate;
240
	}
241
    $(".form_datetime").val(getNowFormatDate(currentdate));
216 242
});
217 243
//Model模态框打开关闭
218 244


+ 1 - 1
cmp-portal/css/cmpindex.css

@ -549,6 +549,6 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
549 549
550 550
/*发布相关页面回到顶部*/
551 551
.footer_tools{position:fixed;z-index:1070;left:50%;margin-left:562px;bottom:20px;}
552
#scrollUp{display:none;width:52px;height:52px;background-image:url(../../images/g_resource_button_dingbu_hig.png);background-position:center;background-size:cover;opacity: .6;}
552
#scrollUp{display:none;width:52px;height:52px;background-image:url(../../images/../images/bottom_button_dingbu_hig.png);background-position:center;background-size:cover;opacity: .8;}
553 553
#scrollUp:hover{opacity:1;}
554 554

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

@ -538,7 +538,7 @@ $(function() {
538 538
	
539 539
	//定时文章发布
540 540
	$("#setTimeIssue").on("click", function() {
541
		$(".form_datetime").val(timeGeshi(modifyTimeval));
541
		//$(".form_datetime").val(timeGeshi(modifyTimeval));
542 542
		noTitleImg();
543 543
		if(titleflase) {
544 544
			$(".blackcover2").fadeIn();

+ 1 - 1
js/articalModify.js

@ -538,7 +538,7 @@ $(function() {
538 538
	
539 539
	//定时文章发布
540 540
	$("#setTimeIssue").on("click", function() {
541
		$(".form_datetime").val(timeGeshi(modifyTimeval));
541
		//$(".form_datetime").val(timeGeshi(modifyTimeval));
542 542
		noTitleImg();
543 543
		if(titleflase) {
544 544
			$(".blackcover2").fadeIn();