Browse Source

赠送课程

lizhen_gitee 1 năm trước cách đây
mục cha
commit
c9ef073688
1 tập tin đã thay đổi với 13 bổ sung2 xóa
  1. 13 2
      application/api/controller/Usercenter.php

+ 13 - 2
application/api/controller/Usercenter.php

@@ -33,9 +33,9 @@ class Usercenter extends Api
             foreach($list as $key => &$val){
                 //日期
                 if($this->lang == 'zh-cn'){
-                    $val['time_text'] = date('m月d,Y',$val['starttime']).'-'.date('m月d,Y',$val['starttime']);
+                    $val['time_text'] = date('m月d,Y',$val['starttime']).'-'.date('m月d,Y',$val['endtime']);
                 }else{
-                    $val['time_text'] = date('M d,Y',$val['starttime']).'-'.date('M d,Y',$val['starttime']);
+                    $val['time_text'] = date('M d,Y',$val['starttime']).'-'.date('M d,Y',$val['endtime']);
                 }
                 //是否有延期按钮
                 $val['expired'] = 0;
@@ -65,6 +65,17 @@ class Usercenter extends Api
 
         $list = $this->list_lang($list,['name','package_name']);
 
+        foreach($list as $key => &$order){
+            //日期
+            if($this->lang == 'zh-cn'){
+                $order['showtime_text'] = date('m月d,Y',$order['starttime']).'-'.date('m月d,Y',$order['endtime']);
+            }else{
+                $order['showtime_text'] = date('M d,Y',$order['starttime']).'-'.date('M d,Y',$order['endtime']);
+            }
+            
+            $order['remark'] = '购买套餐赠送';
+        }
+
         $this->success(1,$list);
     }