diff --git a/admin/controllers/app/liche/Cms.php b/admin/controllers/app/liche/Cms.php index e9109d7a..69066833 100755 --- a/admin/controllers/app/liche/Cms.php +++ b/admin/controllers/app/liche/Cms.php @@ -68,6 +68,8 @@ class Cms extends HD_Controller $covers[] = build_qiniu_image_url($val); } $row['btn_type'] = $json['btn_type'] ? $json['btn_type'] : 1; + $row['bg_img'] = $json['bg_img'] ? $json['bg_img'] : ''; + $row['bg_img_src'] = $json['bg_img'] ? build_qiniu_image_url($json['bg_img']) : ''; $row['link'] = $row['url']; $row['s_time'] = date('Y-m-d H:i:s', $row['s_time']); $row['e_time'] = date('Y-m-d H:i:s', $row['e_time']); @@ -119,7 +121,8 @@ class Cms extends HD_Controller ]; $json = array(); - $input['btn_type'] = $json['btn_type'] = $input['btn_type']; + $input['btn_type'] && $json['btn_type'] = $input['btn_type']; + $input['bg_img'] && $json['bg_img'] = $input['bg_img']; if($json){ $insert['jsondata'] = json_encode($json, JSON_UNESCAPED_UNICODE); } @@ -148,7 +151,8 @@ class Cms extends HD_Controller $cover = !empty($input['cover']) ? str_replace('https://qimg.haodian.cn/', '', $input['cover']) : $input['cover']; $input['link'] = $input['link'] . trim($input['param']); - $input['btn_type'] = $json['btn_type'] = $input['btn_type']; + $input['btn_type'] && $json['btn_type'] = $input['btn_type']; + $input['bg_img'] && $json['bg_img'] = $input['bg_img']; $upd = [ 'title' => $input['title'] ? $input['title'] : '', 'url' => $input['link'] ? $input['link'] : '', diff --git a/admin/views/app/liche/cms/edit.php b/admin/views/app/liche/cms/edit.php index ff2616fd..e2e0269a 100755 --- a/admin/views/app/liche/cms/edit.php +++ b/admin/views/app/liche/cms/edit.php @@ -65,6 +65,23 @@