Browse Source

搜索时间

wangshan 5 years ago
parent
commit
babd04d2e3

+ 1 - 1
src/jfw/front/swordfish.go

@@ -687,7 +687,7 @@ func getBidSearchQuery(area, publishtime, subtype string) string {
 			starttime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Unix())
 		} else if publishtime == "thisyear" { //去年
 			starttime = fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Unix())
-			endtime = fmt.Sprint(time.Date(now.Year(), 1, 1, 0, 0, 0, 0, time.Local).Unix())
+			endtime = fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Unix())
 		} else {
 			starttime = strings.Split(publishtime, "_")[0]
 			endtime = strings.Split(publishtime, "_")[1]

+ 1 - 1
src/jfw/front/ws_dataExport.go

@@ -374,7 +374,7 @@ func (w *WsDataExport) SearchExport() error {
 		publishtime = fmt.Sprintf("%s_%d", starttime, now.Unix())
 	} else if publishtime == "thisyear" { //去年
 		starttime := fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Unix())
-		endtime := fmt.Sprint(time.Date(now.Year(), 1, 1, 0, 0, 0, 0, time.Local).Unix())
+		endtime := fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Unix())
 		publishtime = fmt.Sprintf("%s_%s", starttime, endtime)
 	}
 

+ 1 - 1
src/jfw/modules/app/src/app/front/swordfish.go

@@ -92,7 +92,7 @@ func getBidSearchQuery(area, publishtime, subtype string) string {
 			starttime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Unix())
 		} else if publishtime == "thisyear" { //去年
 			starttime = fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Unix())
-			endtime = fmt.Sprint(time.Date(now.Year(), 1, 1, 0, 0, 0, 0, time.Local).Unix())
+			endtime = fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Unix())
 		} else {
 			starttime = strings.Split(publishtime, "_")[0]
 			endtime = strings.Split(publishtime, "_")[1]

+ 1 - 1
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -370,7 +370,7 @@ func (w *WsDataExport) SearchExport() error {
 		publishtime = fmt.Sprintf("%s_%d", starttime, now.Unix())
 	} else if publishtime == "thisyear" { //去年
 		starttime := fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Unix())
-		endtime := fmt.Sprint(time.Date(now.Year(), 1, 1, 0, 0, 0, 0, time.Local).Unix())
+		endtime := fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Unix())
 		publishtime = fmt.Sprintf("%s_%s", starttime, endtime)
 	}
 

+ 2 - 0
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -532,6 +532,7 @@
 			}
 	        //时间
 	        if(filter["publishtime"]!=""){
+				console.log(filter["publishtime"])
 				var timeflag = true;
 				$(".chooseTime ul>li").each(function(i,e){
 					var temp = $(e).find("span").attr("data-value");
@@ -549,6 +550,7 @@
 						localStorage.date = filter["publishtime"];
 			            localStorage.removeItem("export_starttime");
 			            localStorage.removeItem("export_endtime");
+						localStorage.index = i;
 						timeflag = false;
 					}
 				})

+ 1 - 0
src/web/templates/weixin/dataExport/dataExport.html

@@ -502,6 +502,7 @@
 						localStorage.date = filter["publishtime"];
 			            localStorage.removeItem("export_starttime");
 			            localStorage.removeItem("export_endtime");
+						localStorage.index = i;
 						timeflag = false;
 					}
 				})