This commit is contained in:
pushuo 2022-07-06 16:36:25 +08:00
parent 70d01b7fa2
commit d2a135f275
3 changed files with 9 additions and 6 deletions

View File

@ -19,7 +19,7 @@ class Header extends Component
$this->addLink('订单管理', admin_route('orders.index'), equal_route('admin.orders.index'));
$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('home.index'), equal_route('admin.promotions.index'));
$this->addLink('插件管理', admin_route('plugins.index'), equal_route('admin.plugins.index'));
$this->addLink('系统设置', admin_route('home.index'), equal_route('admin.settings.index'));
}

View File

@ -27,20 +27,23 @@ class Sidebar extends Component
public function render()
{
$routeName = request()->route()->getName();
if (Str::startsWith($routeName, ['admin.products.', 'admin.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.customers.', 'admin.customer_groups.'])) {
$this->addLink('会员管理', admin_route('customers.index'), 'fa fa-tachometer-alt', false);
$this->addLink('用户组', admin_route('customer_groups.index'), 'fa fa-tachometer-alt', false);
$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.orders.'])) {
$this->addLink('订单列表', admin_route('orders.index'), 'fa fa-tachometer-alt', true);
$this->addLink('订单列表', admin_route('orders.index'), 'fa fa-tachometer-alt', $routeName == 'admin.orders.index');
}
return view('admin::components.sidebar');

View File

@ -1,6 +1,6 @@
@extends('admin::layouts.master')
@section('title', '顾客管理')
@section('title', '用户组')
@section('content')
<div id="customer-app" class="card" v-cloak>