diff --git a/handler/video.go b/handler/video.go index 5246d4f..341e005 100644 --- a/handler/video.go +++ b/handler/video.go @@ -160,6 +160,10 @@ func GetVideoList(c *gin.Context) { const layout = "2006-01-02 15:04:05" tm1 := time.Unix(gvl_req.StartTime, 0).Format(layout) tm2 := time.Unix(gvl_req.EndTime, 0).Format(layout) + if gvl_req.StartTime == 0 || gvl_req.EndTime == 0 { + tm1 = "" + tm2 = "" + } videos := service.GetVideoList(int(id.(float64)), tm1, tm2, gvl_req.Hour) c.JSON(http.StatusOK, gin.H{"data": videos, "code": proto.SuccessCode, "message": "success"}) } else {