From d87018d8a1269939de688070f9d6349e34de3b33 Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Mon, 14 Nov 2022 10:24:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=AF=BC=E8=88=AA):=20=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E8=83=8C=E6=99=AF=20=E5=90=8E=E5=8F=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BB=9F=E4=B8=80=E4=B8=80=E4=B8=AA=E5=9C=B0?= =?UTF-8?q?=E6=96=B9=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/extra/base.php | 4 +++- view/manager/config/base.html | 12 ++++++++++++ view/public/menu.html | 26 +++++++++++++------------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/config/extra/base.php b/config/extra/base.php index 3d91c74..1d841e8 100755 --- a/config/extra/base.php +++ b/config/extra/base.php @@ -2,8 +2,10 @@ return array ( 'company_name' => '鄂尔多斯市中正物业管理有限公司', 'image' => '', - 'img_logo' => '/storage/20221009/63423cf817221.png', + 'img_logo' => '/storage/20221103/6363180ef2e94.png', 'img_logo_m' => '/storage/20221009/63423cf817221.png', + 'img_bg_pc' => '', + 'img_bg_mobile' => '', 'tel' => '400-000-00001', 'landline' => '400-852-1199', 'email' => 'zzwy@bymk.net', diff --git a/view/manager/config/base.html b/view/manager/config/base.html index 86f5e97..cf38467 100755 --- a/view/manager/config/base.html +++ b/view/manager/config/base.html @@ -21,6 +21,18 @@ {:widget('manager.upload/image',['append' => '_logo_m','src' => $item.img_logo_m??'', 'imgSize' => '200px x 80px', 'className'=>'uploadImgShow2'])} +
+ +
+ {:widget('manager.upload/image',['append' => '_bg_pc','src' => $item.img_bg_pc??'', 'imgSize' => '1920px x 90px', 'className'=>'uploadImgShow2'])} +
+
+
+ +
+ {:widget('manager.upload/image',['append' => '_bg_mobile','src' => $item.img_bg_mobile??'', 'imgSize' => '750px x 90px', 'className'=>'uploadImgShow2'])} +
+
diff --git a/view/public/menu.html b/view/public/menu.html index cdf3aa9..883e53e 100755 --- a/view/public/menu.html +++ b/view/public/menu.html @@ -1,21 +1,21 @@ {php} -use app\model\Category; +//use app\model\Category; // 一级栏目的banner -$firstCategoryId = Category::firstGradeId($category['path'], $category['id']); +//$firstCategoryId = Category::firstGradeId($category['path'], $category['id']); -if ($firstCategoryId == $category['id']) { -$bg_pc = $category['bg']; -$bg_mobile = $category['bg_mobile']; -} else { -$firstCategory = Category::where('id', $firstCategoryId)->field('id,title,bg,bg_mobile')->find(); -$bg_pc = $firstCategory['bg']; -$bg_mobile = $firstCategory['bg_mobile']; -} +//if ($firstCategoryId == $category['id']) { +//$bg_pc = $category['bg']; +//$bg_mobile = $category['bg_mobile']; +//} else { +//$firstCategory = Category::where('id', $firstCategoryId)->field('id,title,bg,bg_mobile')->find(); +//$bg_pc = $firstCategory['bg']; +//$bg_mobile = $firstCategory['bg_mobile']; +//} -$bgImg = $isMobile? $bg_mobile : $bg_pc; +$bgImg = $isMobile? $system['img_bg_mobile'] : $system['img_bg_pc']; $bgImg = trim($bgImg); -$defaultBg = request()->controller() == 'Index' ? '' : '/static/web/images/public/header-bg.jpg'; -$bgImg = $bgImg ?: $defaultBg; +$defaultBg = '/static/web/images/public/header-bg.jpg'; +$bgImg = request()->controller() == 'Index' ? '' : ($bgImg ?: $defaultBg); {/php}