lizhen_gitee преди 1 година
родител
ревизия
ef678cc91f
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 10 0
      application/api/controller/Usercenter.php

+ 10 - 0
application/api/controller/Usercenter.php

@@ -546,6 +546,16 @@ class Usercenter extends Api
             ->order('order.createtime desc')
             ->select();
         $lesson = $this->list_lang($list,['name']);
+        if(!empty($list)){
+            foreach($list as $key => &$val){
+                //日期
+                if($this->lang == 'zh-cn'){
+                    $val['showtime_text'] = date('m月d,Y',$val['starttime']).'-'.date('m月d,Y',$val['endtime']);
+                }else{
+                    $val['showtime_text'] = date('M d,Y',$val['starttime']).'-'.date('M d,Y',$val['endtime']);
+                }
+            }
+        }
 
         //
         $result = [