From 81817fbfaf5e1daade27d24692f66adcfb8e47d9 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Mon, 27 Feb 2023 09:49:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=B7=A5=E4=BD=9C=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E5=91=A8=E6=8A=A5=E6=A8=A1=E6=9D=BF=E6=B7=BB=E5=8A=A0=E4=B8=8B?= =?UTF-8?q?=E5=91=A8=E6=8B=9F=E5=AE=9A=E8=AE=A1=E5=88=92=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/ReportController.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/ReportController.php b/app/Http/Controllers/Api/ReportController.php index 046f926a8..db479bbb5 100755 --- a/app/Http/Controllers/Api/ReportController.php +++ b/app/Http/Controllers/Api/ReportController.php @@ -340,14 +340,19 @@ class ReportController extends AbstractController } else { $title = $user->nickname . "的日报[" . $start_time->format("Y/m/d") . "]"; } + // 生成内容 + $content = '

' . Base::Lang('已完成工作') . '

    ' . + $completeContent . '

' . + Base::Lang('未完成的工作') . '

    ' . + $unfinishedContent . '
'; + if ($type === Report::WEEKLY) { + $content .= "

" . Base::Lang("下周拟定计划") . "[" . $start_time->addWeek()->format("m/d") . "-" . $end_time->addWeek()->format("m/d") . "]

  1.  
"; + } $data = [ "time" => $start_time->toDateTimeString(), "sign" => $sign, "title" => $title, - "content" => '

' . Base::Lang('已完成工作') . '

    ' . - $completeContent . '

' . - Base::Lang('未完成的工作') . '

    ' . - $unfinishedContent . '
', + "content" => $content, "complete_task" => $complete_task, "unfinished_task" => $unfinished_task, ];