作者 王智

文档修改

@@ -10960,7 +10960,6 @@ class Algorithm extends Api @@ -10960,7 +10960,6 @@ class Algorithm extends Api
10960 { 10960 {
10961 //获取用户出生年份 10961 //获取用户出生年份
10962 $UserYear = date('Y', $TimeStamp); 10962 $UserYear = date('Y', $TimeStamp);
10963 - dump($UserYear);  
10964 //季节时段六个配置时间戳 10963 //季节时段六个配置时间戳
10965 $FirstStar = strtotime(date($UserYear . '-1-21')); 10964 $FirstStar = strtotime(date($UserYear . '-1-21'));
10966 $FirstEnd = strtotime(date($UserYear . '-3-20')); 10965 $FirstEnd = strtotime(date($UserYear . '-3-20'));
@@ -10974,45 +10973,82 @@ class Algorithm extends Api @@ -10974,45 +10973,82 @@ class Algorithm extends Api
10974 $FifthEnd = strtotime(date($UserYear . '-11-20')); 10973 $FifthEnd = strtotime(date($UserYear . '-11-20'));
10975 $SixthStar = strtotime(date($UserYear . '-11-21')); 10974 $SixthStar = strtotime(date($UserYear . '-11-21'));
10976 $SixthEnd = strtotime(date($UserYear + 1 . '-1-20')); 10975 $SixthEnd = strtotime(date($UserYear + 1 . '-1-20'));
10977 - dump($TimeStamp);  
10978 - dump($SixthStar);  
10979 - dump($SixthEnd);  
10980 - if ($TimeStamp > $FirstStar && $TimeStamp < $FirstEnd) {  
10981 - $EighthVPK = [  
10982 - 'V' => 3,  
10983 - 'P' => 1,  
10984 - 'K' => 2  
10985 - ];  
10986 - } elseif ($TimeStamp > $SecondStar && $TimeStamp < $SecondEnd) {  
10987 - $EighthVPK = [  
10988 - 'V' => 1,  
10989 - 'P' => 1,  
10990 - 'K' => 3  
10991 - ];  
10992 - } elseif ($TimeStamp > $ThirdStar && $TimeStamp < $ThirdEnd) {  
10993 - $EighthVPK = [  
10994 - 'V' => 3,  
10995 - 'P' => 1,  
10996 - 'K' => 1  
10997 - ];  
10998 - } elseif ($TimeStamp > $FourthStar && $TimeStamp < $FourthEnd) {  
10999 - $EighthVPK = [  
11000 - 'V' => 3,  
11001 - 'P' => 2,  
11002 - 'K' => 1  
11003 - ];  
11004 - } elseif ($TimeStamp > $FifthStar && $TimeStamp < $FifthEnd) {  
11005 - $EighthVPK = [  
11006 - 'V' => 1,  
11007 - 'P' => 3,  
11008 - 'K' => 1  
11009 - ];  
11010 - } elseif ($TimeStamp > $SixthStar && $TimeStamp < $SixthEnd) {  
11011 - $EighthVPK = [  
11012 - 'V' => 3,  
11013 - 'P' => 1,  
11014 - 'K' => 1  
11015 - ]; 10976 + if ($TimeStamp > 1) {
  10977 + if ($TimeStamp > $FirstStar && $TimeStamp < $FirstEnd) {
  10978 + $EighthVPK = [
  10979 + 'V' => 3,
  10980 + 'P' => 1,
  10981 + 'K' => 2
  10982 + ];
  10983 + } elseif ($TimeStamp > $SecondStar && $TimeStamp < $SecondEnd) {
  10984 + $EighthVPK = [
  10985 + 'V' => 1,
  10986 + 'P' => 1,
  10987 + 'K' => 3
  10988 + ];
  10989 + } elseif ($TimeStamp > $ThirdStar && $TimeStamp < $ThirdEnd) {
  10990 + $EighthVPK = [
  10991 + 'V' => 3,
  10992 + 'P' => 1,
  10993 + 'K' => 1
  10994 + ];
  10995 + } elseif ($TimeStamp > $FourthStar && $TimeStamp < $FourthEnd) {
  10996 + $EighthVPK = [
  10997 + 'V' => 3,
  10998 + 'P' => 2,
  10999 + 'K' => 1
  11000 + ];
  11001 + } elseif ($TimeStamp > $FifthStar && $TimeStamp < $FifthEnd) {
  11002 + $EighthVPK = [
  11003 + 'V' => 1,
  11004 + 'P' => 3,
  11005 + 'K' => 1
  11006 + ];
  11007 + } elseif ($TimeStamp > $SixthStar && $TimeStamp < $SixthEnd) {
  11008 + $EighthVPK = [
  11009 + 'V' => 3,
  11010 + 'P' => 1,
  11011 + 'K' => 1
  11012 + ];
  11013 + }
  11014 + } else {
  11015 + if ($TimeStamp < $FirstStar && $TimeStamp > $FirstEnd) {
  11016 + $EighthVPK = [
  11017 + 'V' => 3,
  11018 + 'P' => 1,
  11019 + 'K' => 2
  11020 + ];
  11021 + } elseif ($TimeStamp < $SecondStar && $TimeStamp > $SecondEnd) {
  11022 + $EighthVPK = [
  11023 + 'V' => 1,
  11024 + 'P' => 1,
  11025 + 'K' => 3
  11026 + ];
  11027 + } elseif ($TimeStamp < $ThirdStar && $TimeStamp > $ThirdEnd) {
  11028 + $EighthVPK = [
  11029 + 'V' => 3,
  11030 + 'P' => 1,
  11031 + 'K' => 1
  11032 + ];
  11033 + } elseif ($TimeStamp < $FourthStar && $TimeStamp > $FourthEnd) {
  11034 + $EighthVPK = [
  11035 + 'V' => 3,
  11036 + 'P' => 2,
  11037 + 'K' => 1
  11038 + ];
  11039 + } elseif ($TimeStamp < $FifthStar && $TimeStamp > $FifthEnd) {
  11040 + $EighthVPK = [
  11041 + 'V' => 1,
  11042 + 'P' => 3,
  11043 + 'K' => 1
  11044 + ];
  11045 + } elseif ($TimeStamp < $SixthStar && $TimeStamp > $SixthEnd) {
  11046 + $EighthVPK = [
  11047 + 'V' => 3,
  11048 + 'P' => 1,
  11049 + 'K' => 1
  11050 + ];
  11051 + }
11016 } 11052 }
11017 return $EighthVPK; 11053 return $EighthVPK;
11018 } 11054 }