diff --git a/docs/DEVELOPMENT_LOG.md b/docs/DEVELOPMENT_LOG.md index f4a329b..827a374 100644 --- a/docs/DEVELOPMENT_LOG.md +++ b/docs/DEVELOPMENT_LOG.md @@ -113,6 +113,35 @@ - is_develop:`true`(config/shopxo.php 第41行) - 自定义侧边栏配置:`config/vrt_custom_menu.php`(菜单入口,不依赖插件系统) +### 3.3 自定义侧边栏快速入口(2026-04-16) + +ShopXO 后台 sidebar 菜单通过 `AdminPowerService.php` 的 `AdminPowerMenuData()` 生成(第 598 行 return 前)。 + +**配置文件:** `shopxo/config/vrt_custom_menu.php` + +**机制:** 直接 include 配置文件,遍历 `$custom_menu_config['menus']`,追加到 `$admin_left_menu[]`。菜单项的 `icon` 字段只填图标名(无需 `iconfont` 前缀,模板会自动加)。 + +**图标来源:** `shopxo/public/static/common/iconfont/iconfont.css`,选 534 个中的任意 `.icon-xxx:before` 名称。 + +**示例配置:** +```php +return [ + 'menus' => [ + [ + 'id' => 'my-test-plugin-menu', + 'name' => '我的测试插件', + 'icon' => 'icon-label', // 模板自动渲染为 iconfont icon-label + 'url' => '/adminufgeyw.php?s=plugins/index/pluginsname/my_test_plugin/pluginscontrol/admin/pluginsaction/index.html', + 'control' => 'plugins', + 'action' => 'index', + 'is_show' => 1, + ], + ], +]; +``` + +**生效方式:** 修改配置文件后,重启 PHP 容器即可(`docker restart shopxo-php`)。 + ### 3.3 后台权限修复 admin 用户(role_id=1)默认缺少插件权限。手动写入 38 条权限到 vrt_role_power: diff --git a/shopxo/.gitignore b/shopxo/.gitignore new file mode 100755 index 0000000..ec22ed4 --- /dev/null +++ b/shopxo/.gitignore @@ -0,0 +1,11 @@ +*.html.php +.DS_Store +.ide +*.log +*.lock +.tea +.idea +.env +*.htaccess +*payment_*_respond.php +*payment_*_notify.php \ No newline at end of file