lizhen_gitee hace 9 meses
padre
commit
b2e1e3da83
Se han modificado 1 ficheros con 12 adiciones y 1 borrados
  1. 12 1
      application/api/controller/Lesson.php

+ 12 - 1
application/api/controller/Lesson.php

@@ -73,6 +73,16 @@ class Lesson extends Api
             }
         }
 
+        //一周
+        $week_arr = [
+            1 => '周一',
+            2 => '周二',
+            3 => '周三',
+            4 => '周四',
+            5 => '周五',
+            6 => '周六',
+            7 => '周日',
+        ];
         //本月结束日
         $endday_arr = [
             '01' => 31,
@@ -115,7 +125,8 @@ class Lesson extends Api
             $idate = $year.'-'.$month.'-'.$j;
 
             $itime = strtotime($idate);
-            $week = $this->lang == 'en' ? date('D',$itime) : '周'.date('N',$itime);
+
+            $week = $this->lang == 'en' ? date('D',$itime) : $week_arr[date('N',$itime)];
 
             $i_data = [
                 'yeah' =>$year,