renshen eb0f246765 财务经营风险管控:网页端不再重复显示目录页签
- 目录内页签(店铺违规信息预警/预览统计/流程统计)只在钉钉单页入口(?focus=1 或钉钉 UA)显示
- 网页端已有左侧菜单和已打开页面标签栏,页面内只保留内容本身
- 单页模式判断抽到 FocusMode,与布局共用
2026-10-19 14:56:08 +08:00

116 lines
4.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html dir="{{ language()->direction() }}" lang="{{ app()->getLocale() }}">
@php
// 钉钉工作台「财务系统」入口:在「财务经营风险管控」目录下隐藏全局菜单,
// 只保留该目录自己的页签(店铺违规信息预警 / 流程统计…),
// 让钉钉里点进来就只是这一块内容;网页端登录(非钉钉容器)不受影响。
// 也支持显式 ?focus=1,便于以后给别的入口做同样的单页模式。
// 路由参数在部分上下文取不到时退回按路径段判断(与目录表同一套兼容写法)。
$focusEntry = \App\Utilities\FocusMode::activeFor();
@endphp
<x-layouts.admin.head>
@if (! empty($metaTitle))
<x-slot name="metaTitle">
{!! !empty($metaTitle->attributes->has('title')) ? $metaTitle->attributes->get('title') : $metaTitle !!}
</x-slot>
@endif
<x-slot name="title">
{!! !empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
</x-slot>
</x-layouts.admin.head>
@mobile
<body class="bg-body">
@elsemobile
<body class="bg-body overflow-y-overlay">
@endmobile
@stack('body_start')
@unless ($focusEntry)
<x-layouts.admin.menu />
@endunless
<!-- loading component will add this line -->
<div class="main-content {{ $focusEntry ? '' : 'xl:ltr:ml-64 xl:rtl:mr-64' }} transition-all ease-in-out" id="panel">
<div id="main-body">
<div class="container">
{{-- 已打开页面标签栏放在页面标题那一行上面(更靠近顶部,方便切换)。 --}}
@unless ($focusEntry)
@include('business.pages.partials.open-page-tabs')
@endunless
<x-layouts.admin.header>
<x-slot name="title">
{!! ! empty($title->attributes->has('title')) ? $title->attributes->get('title') : $title !!}
</x-slot>
@if (! empty($status))
<x-slot name="status">
{!! $status !!}
</x-slot>
@endif
@if (! empty($info))
<x-slot name="info">
{!! $info !!}
</x-slot>
@endif
@if (! empty($favorite) || (! empty($favorite) && $favorite->attributes->has('title')))
@if (! $favorite->attributes->has('title'))
<x-slot name="favorite">
{!! $favorite !!}
</x-slot>
@else
@php
$favorite = [
'title' => $favorite->attributes->get('title'),
'icon' => $favorite->attributes->get('icon'),
'route' => !empty($favorite->attributes->has('route')) ? $favorite->attributes->get('route') : '',
'url' => !empty($favorite->attributes->has('url')) ? $favorite->attributes->get('url') : '',
];
@endphp
<x-slot name="favorite">
<x-menu.favorite
:title="$favorite['title']"
:icon="$favorite['icon']"
:route="$favorite['route']"
:url="$favorite['url']"
/>
</x-slot>
@endif
@endif
<x-slot name="buttons">
{!! $buttons ?? '' !!}
</x-slot>
<x-slot name="moreButtons">
{!! $moreButtons ?? '' !!}
</x-slot>
</x-layouts.admin.header>
<x-layouts.admin.content>
<livewire:notification.browser />
<x-layouts.admin.notifications />
{!! $content !!}
</x-layouts.admin.content>
<x-layouts.admin.footer />
</div>
</div>
</div>
@stack('body_end')
<x-layouts.admin.scripts />
</body>
</html>