优化:主题功能调整
This commit is contained in:
@@ -62,6 +62,10 @@ class Theme extends adminApi
|
|||||||
$auxiliary_color = input('auxiliary_color', '');
|
$auxiliary_color = input('auxiliary_color', '');
|
||||||
$file_url = input('file_url', '');
|
$file_url = input('file_url', '');
|
||||||
$is_active = input('is_active', '');
|
$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 = [
|
$data = [
|
||||||
'theme_name' => $theme_name,
|
'theme_name' => $theme_name,
|
||||||
'theme_color' => $theme_color,
|
'theme_color' => $theme_color,
|
||||||
@@ -69,7 +73,9 @@ class Theme extends adminApi
|
|||||||
'file_url' => $file_url,
|
'file_url' => $file_url,
|
||||||
'is_active' => $is_active,
|
'is_active' => $is_active,
|
||||||
'admin_id' => $admin_id,
|
'admin_id' => $admin_id,
|
||||||
'createtime' => time()
|
'createtime' => time(),
|
||||||
|
'begin_time' => $begin_time,
|
||||||
|
'end_time' => $end_time,
|
||||||
];
|
];
|
||||||
$res = db::name($this->table)->insert($data);
|
$res = db::name($this->table)->insert($data);
|
||||||
if($res){
|
if($res){
|
||||||
@@ -87,6 +93,10 @@ class Theme extends adminApi
|
|||||||
$auxiliary_color = input('auxiliary_color', '');
|
$auxiliary_color = input('auxiliary_color', '');
|
||||||
$file_url = input('file_url', '');
|
$file_url = input('file_url', '');
|
||||||
$is_active = input('is_active', '');
|
$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', '');
|
$id = input('id', '');
|
||||||
$data = [
|
$data = [
|
||||||
'theme_name' => $theme_name,
|
'theme_name' => $theme_name,
|
||||||
@@ -94,7 +104,9 @@ class Theme extends adminApi
|
|||||||
'auxiliary_color' => $auxiliary_color,
|
'auxiliary_color' => $auxiliary_color,
|
||||||
'file_url' => $file_url,
|
'file_url' => $file_url,
|
||||||
'is_active' => $is_active,
|
'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);
|
$res = db::name($this->table)->where(['id'=>$id])->update($data);
|
||||||
if($res){
|
if($res){
|
||||||
|
|||||||
Reference in New Issue
Block a user