From c19692423dfbfc35d9651c944c91c4cb47054aed Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 24 Jun 2022 14:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E9=97=B4=E5=AF=BC=E8=88=AA=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E9=92=A9=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/Common.php | 16 ++++ app/index/view/default/public/header_nav.html | 76 ++++++++++++++++++- 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/app/index/controller/Common.php b/app/index/controller/Common.php index 3c819227d..58c82bfde 100755 --- a/app/index/controller/Common.php +++ b/app/index/controller/Common.php @@ -615,6 +615,22 @@ class Common extends BaseController // 公共搜索框内右侧 MyViewAssign('plugins_view_common_search_inside_right_data', MyEventTrigger('plugins_view_common_search_inside_right', ['hook_name'=>'plugins_view_common_search_inside_right', 'is_backend'=>false, 'user'=>$this->user])); + + // 中间导航左侧 + MyViewAssign('plugins_view_common_header_nav_left_data', MyEventTrigger('plugins_view_common_header_nav_left', ['hook_name'=>'plugins_view_common_header_nav_left', 'is_backend'=>false, 'user'=>$this->user])); + + // 中间导航搜索内部 + MyViewAssign('plugins_view_common_header_nav_search_inside_data', MyEventTrigger('plugins_view_common_header_nav_search_inside', ['hook_name'=>'plugins_view_common_header_nav_search_inside', 'is_backend'=>false, 'user'=>$this->user])); + + // 中间导航内容内部顶部 + MyViewAssign('plugins_view_common_header_nav_content_inside_top_data', MyEventTrigger('plugins_view_common_header_nav_content_inside_top', ['hook_name'=>'plugins_view_common_header_nav_content_inside_top', 'is_backend'=>false, 'user'=>$this->user])); + + // 中间导航内容内部底部 + MyViewAssign('plugins_view_common_header_nav_content_inside_bottom_data', MyEventTrigger('plugins_view_common_header_nav_content_inside_bottom', ['hook_name'=>'plugins_view_common_header_nav_content_inside_bottom', 'is_backend'=>false, 'user'=>$this->user])); + + // 中间导航右侧 + MyViewAssign('plugins_view_common_header_nav_right_data', MyEventTrigger('plugins_view_common_header_nav_right', ['hook_name'=>'plugins_view_common_header_nav_right', 'is_backend'=>false, 'user'=>$this->user])); + // 公共表格钩子名称动态处理 $current = 'plugins_view_index_'.$this->controller_name; diff --git a/app/index/view/default/public/header_nav.html b/app/index/view/default/public/header_nav.html index 16dd8b3a1..85c39817c 100755 --- a/app/index/view/default/public/header_nav.html +++ b/app/index/view/default/public/header_nav.html @@ -1,19 +1,37 @@
+ + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}} +
+ plugins_view_common_header_nav_left +
+ {{/if}} + {{if !empty($plugins_view_common_header_nav_left_data) and is_array($plugins_view_common_header_nav_left_data)}} + {{foreach $plugins_view_common_header_nav_left_data as $hook}} + {{if is_string($hook) or is_int($hook)}} + {{$hook|raw}} + {{/if}} + {{/foreach}} + {{/if}} + + +

{{:MyC('home_seo_site_title')}}

+
全部分类
+
+ + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}} +
+ plugins_view_common_header_nav_content_inside_top +
+ {{/if}} + {{if !empty($plugins_view_common_header_nav_content_inside_top_data) and is_array($plugins_view_common_header_nav_content_inside_top_data)}} + {{foreach $plugins_view_common_header_nav_content_inside_top_data as $hook}} + {{if is_string($hook) or is_int($hook)}} + {{$hook|raw}} + {{/if}} + {{/foreach}} + {{/if}} + {{if empty($user)}} + + + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}} +
+ plugins_view_common_header_nav_content_inside_bottom +
+ {{/if}} + {{if !empty($plugins_view_common_header_nav_content_inside_bottom_data) and is_array($plugins_view_common_header_nav_content_inside_bottom_data)}} + {{foreach $plugins_view_common_header_nav_content_inside_bottom_data as $hook}} + {{if is_string($hook) or is_int($hook)}} + {{$hook|raw}} + {{/if}} + {{/foreach}} + {{/if}}
+ + + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}} +
+ plugins_view_common_header_nav_right +
+ {{/if}} + {{if !empty($plugins_view_common_header_nav_right_data) and is_array($plugins_view_common_header_nav_right_data)}} + {{foreach $plugins_view_common_header_nav_right_data as $hook}} + {{if is_string($hook) or is_int($hook)}} + {{$hook|raw}} + {{/if}} + {{/foreach}} + {{/if}}
\ No newline at end of file