no message

This commit is contained in:
hellcat 2025-05-01 18:49:04 +08:00
parent 5df32ca888
commit 7f6d8f955f

View File

@ -44,11 +44,18 @@ final class UserController extends BaseController
$oHuodong = Huodong::DateHit();
$sHuodongStr = $oHuodong->title."".$oHuodong->content;
$oAnn->content = str_replace("{{huodong}}", $sHuodongStr, $oAnn->content);
$oAnn->date = date("Y-m-d", strtotime($oAnn->date));
if ($oHuodong) {
$sDateStartZh = date("n月j日", strtotime($oHuodong->start_date));
$sDateEndZh = date("n月j日", strtotime($oHuodong->end_date));
$sHuodongStr = '<span style="background-color: #eccafa;">'.$oHuodong->title."".$sDateStartZh."".$sDateEndZh."期间,".$oHuodong->content.'</span>';
$oAnn->content = str_replace("{{huodong}}", $sHuodongStr, $oAnn->content);
$oAnn->date = date("Y-m-d", strtotime($oAnn->date));
} else {
$oAnn->content = str_replace("<p>{{huodong}}</p>", '', $oAnn->content);
}
return $response->write(
$this->view()