= 6) { //判断是否是周末 $type = 1; } return $type; } protected static function timeTypeCheck($dayType, $time) { $timeNew = intval(date("His", $time)); if ($dayType == 0) { //工作日 if ($timeNew < 70000) { $type = 0; } else if ($timeNew >= 70000 && $timeNew <= 90000) { $type = 1; } else if ($timeNew < 170000) { $type = 2; } else if ($timeNew >= 170000 && $timeNew <= 190000) { $type = 3; } else { $type = 4; } } else { //非工作日 if ($timeNew < 70000) { $type = 0; } else if ($timeNew >= 80000 && $timeNew <= 200000) { $type = 5; } else { $type = 4; } } return $type; } }