diff --git a/beike/Admin/Http/Controllers/SettingController.php b/beike/Admin/Http/Controllers/SettingController.php index 25847ab1..7211266d 100644 --- a/beike/Admin/Http/Controllers/SettingController.php +++ b/beike/Admin/Http/Controllers/SettingController.php @@ -25,7 +25,8 @@ class SettingController extends Controller public function index() { $settings = SystemSettingRepo::getList(); - dd($settings); + + return view('admin::pages.setting', ['settings' => $settings]); } @@ -47,5 +48,7 @@ class SettingController extends Controller ]; SettingRepo::createOrUpdate($data); } + + return json_success("修改成功"); } } diff --git a/beike/Admin/View/Components/Header.php b/beike/Admin/View/Components/Header.php index 30080f32..7971d686 100644 --- a/beike/Admin/View/Components/Header.php +++ b/beike/Admin/View/Components/Header.php @@ -20,8 +20,8 @@ class Header extends Component $this->addLink('商品管理', admin_route('products.index'), equal_route('admin.products.index')); $this->addLink('会员管理', admin_route('customers.index'), equal_route('admin.customers.index')); // $this->addLink('营销管理', admin_route('home.index'), equal_route('admin.promotions.index')); - $this->addLink('插件管理', admin_route('plugins.index'), equal_route('admin.plugins.index')); - $this->addLink('首页装修', admin_route('design.index'), equal_route('admin.design.index')); + // $this->addLink('插件管理', admin_route('plugins.index'), equal_route('admin.plugins.index')); + // $this->addLink('首页装修', admin_route('design.index'), equal_route('admin.design.index')); $this->addLink('系统设置', admin_route('settings.index'), equal_route('admin.settings.index')); } diff --git a/beike/Admin/View/Components/Sidebar.php b/beike/Admin/View/Components/Sidebar.php index 126fc458..acdfe22e 100644 --- a/beike/Admin/View/Components/Sidebar.php +++ b/beike/Admin/View/Components/Sidebar.php @@ -27,35 +27,42 @@ class Sidebar extends Component public function render() { $routeName = request()->route()->getName(); - if (Str::startsWith($routeName, ['admin.products.', 'admin.categories.'])) { + if (Str::startsWith($routeName, [admin_name() . '.products.', admin_name() . '.categories.'])) { $this->addLink('商品分类', admin_route('categories.index'), 'fa fa-tachometer-alt', false); $this->addLink('商品列表', admin_route('products.index'), 'fa fa-tachometer-alt', false); $this->addLink('回收站', admin_route('products.index', ['trashed' => 1]), 'fa fa-tachometer-alt', false); } - if (Str::startsWith($routeName, ['admin.plugins.'])) { - $this->addLink('插件列表', admin_route('categories.index'), 'fa fa-tachometer-alt', $routeName == 'admin.plugins.index'); + // if (Str::startsWith($routeName, [admin_name() . '.plugins.'])) { + // $this->addLink('插件列表', admin_route('categories.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.plugins.index'); + // } + + if (Str::startsWith($routeName, [admin_name() . '.customers.', admin_name() . '.customer_groups.'])) { + $this->addLink('会员管理', admin_route('customers.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.customers.index'); + $this->addLink('用户组', admin_route('customer_groups.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.customer_groups.index'); } - if (Str::startsWith($routeName, ['admin.customers.', 'admin.customer_groups.'])) { - $this->addLink('会员管理', admin_route('customers.index'), 'fa fa-tachometer-alt', $routeName == 'admin.customers.index'); - $this->addLink('用户组', admin_route('customer_groups.index'), 'fa fa-tachometer-alt', $routeName == 'admin.customer_groups.index'); + if (Str::startsWith($routeName, [admin_name() . '.orders.'])) { + $this->addLink('订单列表', admin_route('orders.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.orders.index'); } - if (Str::startsWith($routeName, ['admin.orders.'])) { - $this->addLink('订单列表', admin_route('orders.index'), 'fa fa-tachometer-alt', $routeName == 'admin.orders.index'); + if (Str::startsWith($routeName, [admin_name() . '.settings.', admin_name() . '.plugins.'])) { + $this->addLink('系统设置', admin_route('settings.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.settings.index'); + $this->addLink('插件列表', admin_route('plugins.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.plugins.index'); + $this->addLink('首页装修', admin_route('design.index'), 'fa fa-tachometer-alt', $routeName == admin_name() . '.design.index', true); } return view('admin::components.sidebar'); } - public function addLink($title, $url, $icon, $active) + public function addLink($title, $url, $icon, $active, $new_window = false) { $this->links[] = [ 'title' => $title, 'url' => $url, 'icon' => $icon, - 'active' => $active + 'active' => $active, + 'new_window' => $new_window ?? false ]; } } diff --git a/public/build/beike/admin/css/app.css b/public/build/beike/admin/css/app.css index a53977e3..3f96e7be 100644 --- a/public/build/beike/admin/css/app.css +++ b/public/build/beike/admin/css/app.css @@ -110,6 +110,46 @@ body { width: calc(100% - 1000px); } +.h-min-100 { + min-height: 100px; +} + +.h-min-200 { + min-height: 200px; +} + +.h-min-300 { + min-height: 300px; +} + +.h-min-400 { + min-height: 400px; +} + +.h-min-500 { + min-height: 500px; +} + +.h-min-600 { + min-height: 600px; +} + +.h-min-700 { + min-height: 700px; +} + +.h-min-800 { + min-height: 800px; +} + +.h-min-900 { + min-height: 900px; +} + +.h-min-1000 { + min-height: 1000px; +} + .font-size-12 { font-size: 12px; } diff --git a/resources/beike/admin/css/_global.scss b/resources/beike/admin/css/_global.scss index df5bcf6b..d74259d1 100644 --- a/resources/beike/admin/css/_global.scss +++ b/resources/beike/admin/css/_global.scss @@ -36,6 +36,13 @@ body { } } +// 生成 100 200 300 ... 1000 的最小高度 +@for $i from 1 through 10 { + .h-min-#{$i}00 { + min-height: #{$i}00px; + } +} + .font-size-12 { font-size: 12px; } diff --git a/resources/beike/admin/views/components/sidebar.blade.php b/resources/beike/admin/views/components/sidebar.blade.php index 5fe089d9..88ebe1c1 100644 --- a/resources/beike/admin/views/components/sidebar.blade.php +++ b/resources/beike/admin/views/components/sidebar.blade.php @@ -2,7 +2,7 @@ diff --git a/resources/beike/admin/views/pages/setting.blade.php b/resources/beike/admin/views/pages/setting.blade.php new file mode 100644 index 00000000..c64734ee --- /dev/null +++ b/resources/beike/admin/views/pages/setting.blade.php @@ -0,0 +1,128 @@ +@extends('admin::layouts.master') + +@section('title', '插件编辑') + +@push('header') + + {{-- --}} +@endpush + +@section('content') +
+
+ +
+ + +
@{{ column.description }}
+
+ + + +
@{{ column.description }}
+
+ + + + + + +
@{{ column.description }}
+
+ + +
@{{ column.description }}
+
+
+ + 提交 + +
+
+
+@endsection + +@push('footer') + + + +@endpush + + +