更新时间戳

This commit is contained in:
yaooo 2023-11-02 17:35:10 +08:00
parent 8baaf16b88
commit c3a3a52eb1
1 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ class ProjectTask extends ApiController
} }
if($item->tid > 0){ if($item->tid > 0){
$task = Db::name('ProjectTask')->where(['id' => $item->tid])->find(); $task = Db::name('ProjectTask')->where(['id' => $item->tid])->find();
$item->task = $task['title']; $item->task = $task['title'] ?? '';
$item->project = Db::name('Project')->where(['id' => $task['project_id']])->value('name'); $item->project = Db::name('Project')->where(['id' => $task['project_id']])->value('name');
} }
$item->start_time_a = empty($item->start_time) ? '' : date('Y-m-d', $item->start_time); $item->start_time_a = empty($item->start_time) ? '' : date('Y-m-d', $item->start_time);