From eef23f6bbae068b894db08245be33a64bf0e4fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Tue, 12 Aug 2025 15:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/adminapi/controller/Theme.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/application/adminapi/controller/Theme.php b/application/adminapi/controller/Theme.php index 052a3f6..b7e729e 100644 --- a/application/adminapi/controller/Theme.php +++ b/application/adminapi/controller/Theme.php @@ -62,6 +62,10 @@ class Theme extends adminApi $auxiliary_color = input('auxiliary_color', ''); $file_url = input('file_url', ''); $is_active = input('is_active', ''); + $begin_time = input('begin_time', ''); + $end_time = input('end_time', ''); + $begin_time = !empty($begin_time) ? strtotime($begin_time) : 0; + $end_time = !empty($end_time) ? strtotime($end_time) : 0; $data = [ 'theme_name' => $theme_name, 'theme_color' => $theme_color, @@ -69,7 +73,9 @@ class Theme extends adminApi 'file_url' => $file_url, 'is_active' => $is_active, 'admin_id' => $admin_id, - 'createtime' => time() + 'createtime' => time(), + 'begin_time' => $begin_time, + 'end_time' => $end_time, ]; $res = db::name($this->table)->insert($data); if($res){ @@ -87,6 +93,10 @@ class Theme extends adminApi $auxiliary_color = input('auxiliary_color', ''); $file_url = input('file_url', ''); $is_active = input('is_active', ''); + $begin_time = input('begin_time', ''); + $end_time = input('end_time', ''); + $begin_time = !empty($begin_time) ? strtotime($begin_time) : 0; + $end_time = !empty($end_time) ? strtotime($end_time) : 0; $id = input('id', ''); $data = [ 'theme_name' => $theme_name, @@ -94,7 +104,9 @@ class Theme extends adminApi 'auxiliary_color' => $auxiliary_color, 'file_url' => $file_url, 'is_active' => $is_active, - 'updatetime' => time() + 'updatetime' => time(), + 'begin_time' => $begin_time, + 'end_time' => $end_time, ]; $res = db::name($this->table)->where(['id'=>$id])->update($data); if($res){