diff --git a/plugins/HeaderMenu/Bootstrap.php b/plugins/HeaderMenu/Bootstrap.php index 19c5db29..34b1739a 100644 --- a/plugins/HeaderMenu/Bootstrap.php +++ b/plugins/HeaderMenu/Bootstrap.php @@ -14,6 +14,15 @@ namespace Plugin\HeaderMenu; class Bootstrap { public function boot() + { + $this->addHeaderMenu(); + } + + + /** + * 在网页头部添加二级菜单链接 + */ + private function addHeaderMenu() { add_filter('header.categories', function ($data) { $data[] = [ diff --git a/plugins/HeaderMenu/Views/latest_products.blade.php b/plugins/HeaderMenu/Views/latest_products.blade.php index f4c42b44..cb5c1a64 100644 --- a/plugins/HeaderMenu/Views/latest_products.blade.php +++ b/plugins/HeaderMenu/Views/latest_products.blade.php @@ -4,10 +4,11 @@