作者 sgj
1 个管道 的构建 失败 耗费 6 秒

报名后逻辑修改

... ... @@ -649,7 +649,7 @@ class ActivityController extends AdminBaseController
->where($map)
->select()
->toArray();
/* dump($join);*/
/*dump($join);*/
//dump(get_image_path('https://volunteer.cnpu.org/upload/20190112/9bd2840928f0acee61ce6c906cda32c3.jpg'));
foreach ($join as $k=>$v){
... ... @@ -660,65 +660,65 @@ class ActivityController extends AdminBaseController
if (!empty($v['sgin_time'])){
$join[$k]['sgin_time']=date('Y-m-d H:i:s',$v['sgin_time']);
}
$join[$k]['work_content']=\db('work')->where('id',$v['work_content'])->value('name');
$join[$k]['work_content']=\db('work')->where('id',$v['work_content'])->value('name');
$join[$k]['photo']=get_image_path($v['photo']);
if (!empty($v['select_time'])){
$select[$k]=json_decode($v['select_time'],true);
foreach ($select[$k] as $k1=>$v1){
$date[$k]['time'][$k1]=$v1['date'].' '.$v1['time'];
}
$date[$k]['select']=implode(',',$date[$k]['time']);
$join[$k]['select']=implode(',',$date[$k]['time']);
}else{
$join[$k]['apply_stay']='';
}
if (!empty($v['apply_stay'])){
$select[$k]=json_decode($v['apply_stay'],true);
foreach ($select[$k] as $k1=>$v1){
$date[$k]['time'][$k1]=$v1['date'];
}
$date[$k]['select']=implode(',',$date[$k]['time']);
$join[$k]['stay']=implode(',',$date[$k]['time']);
}else{
$join[$k]['apply_stay']='';
}
$join[$k]['photo']=get_image_path($v['photo']);
if (!empty($v['apply_food'])){
$select[$k]=json_decode($v['apply_food'],true);
foreach ($select[$k] as $k1=>$v1){
$date[$k]['time'][$k1]=$v1['date'].' '.$v1['time'];
}
$date[$k]['select']=implode(',',$date[$k]['time']);
$join[$k]['food']=implode(',',$date[$k]['time']);
}else{
$join[$k]['apply_food']='';
}
switch ($v['status']){
case 0:
$data['status']='未审核';
$join[$k]['status']='未审核';
break;
case 1:
$data['status']='已通过';
$join[$k]['status']='已通过';
break;
case 2:
$data['status']='未通过';
$join[$k]['status']='未通过';
break;
case 3:
$data['status']='已签到';
$join[$k]['status']='已提交工作汇报';
break;
}
switch ($v['type']){
case 1:
$data['type']='线上';
$join[$k]['type']='线上';
break;
case 2:
$data['type']='线下';
$join[$k]['type']='线下';
break;
case 3:
$data['type']='线上及线下';
$join[$k]['type']='线上及线下';
break;
}
... ... @@ -729,11 +729,11 @@ class ActivityController extends AdminBaseController
/* ['图片', 15, 'photo', 2,200],*/
['参与方式', 15, 'type', 1],
['审核状态', 15, 'status', 1],
['选择时间', 15, 'select_time', 1],
['申请入住', 15, 'apply_stay', 1],
['申请用餐', 15, 'apply_food', 1],
['工作报告', 15, 'work_report', 1],
['拒绝原因', 15, 'refund_reason', 1],
['选择时间', 30, 'select', 1],
['申请入住', 30, 'stay', 1],
['申请用餐', 30, 'food', 1],
['工作报告', 50, 'work_report', 1],
['拒绝原因', 20, 'refund_reason', 1],
];
$Excel = new Excel();
$letter = $Excel->excelAcross(count($title));
... ...