细节优化
parent
84b15cf1d4
commit
ae6e9e31f2
|
|
@ -75,8 +75,8 @@ class Common extends BaseController
|
|||
protected $system_type;
|
||||
|
||||
// 主题颜色key
|
||||
protected $admin_color_value_key = 'admin_color_value';
|
||||
protected $admin_color_value = 0;
|
||||
protected $theme_color_value_key = 'admin_theme_color_value';
|
||||
protected $theme_color_value = 0;
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
|
|
@ -300,16 +300,16 @@ class Common extends BaseController
|
|||
$assign['env_max_input_vars_count'] = SystemService::EnvMaxInputVarsCount();
|
||||
|
||||
// 主题配色
|
||||
$this->admin_color_value = intval(MyCookie($this->admin_color_value_key));
|
||||
if($this->admin_color_value == 1)
|
||||
$this->theme_color_value = intval(MyCookie($this->theme_color_value_key));
|
||||
if($this->theme_color_value == 1)
|
||||
{
|
||||
$assign['admin_color_name'] = '普通白色';
|
||||
$assign['admin_color_url'] = MyUrl('admin/index/color', ['value'=>0]);
|
||||
$assign['theme_color_name'] = '普通白色';
|
||||
$assign['theme_color_url'] = MyUrl('admin/index/color', ['value'=>0]);
|
||||
} else {
|
||||
$assign['admin_color_name'] = '夜间深色';
|
||||
$assign['admin_color_url'] = MyUrl('admin/index/color', ['value'=>1]);
|
||||
$assign['theme_color_name'] = '夜间深色';
|
||||
$assign['theme_color_url'] = MyUrl('admin/index/color', ['value'=>1]);
|
||||
}
|
||||
$assign['admin_color_value'] = $this->admin_color_value;
|
||||
$assign['theme_color_value'] = $this->theme_color_value;
|
||||
|
||||
// 页面语言
|
||||
$assign['lang_data'] = SystemService::PageViewLangData();
|
||||
|
|
|
|||
|
|
@ -158,9 +158,9 @@ class Index extends Common
|
|||
// 是否指定配色(0默认白色、1黑色)
|
||||
if(isset($this->data_request['value']) && $this->data_request['value'] == 1)
|
||||
{
|
||||
MyCookie($this->admin_color_value_key, 1);
|
||||
MyCookie($this->theme_color_value_key, 1);
|
||||
} else {
|
||||
MyCookie($this->admin_color_value_key, null);
|
||||
MyCookie($this->theme_color_value_key, null);
|
||||
}
|
||||
// 跳转首页
|
||||
return MyRedirect(MyUrl('admin/index/index'));
|
||||
|
|
|
|||
|
|
@ -69,35 +69,36 @@
|
|||
{{/if}}
|
||||
|
||||
<!-- 主题配色 -->
|
||||
{{if isset($admin_color_value) and $admin_color_value eq 1}}
|
||||
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/admin/{{$default_theme}}/css/color/black.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
{{if isset($theme_color_value) and $theme_color_value eq 1}}
|
||||
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/css/color/black.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
{{/if}}
|
||||
|
||||
<script type="text/javascript">
|
||||
// 基础配置
|
||||
var __system_type__ = '{{$system_type}}';
|
||||
var __root__ = '{{$public_host}}';
|
||||
var __my_http__ = '{{$my_http}}';
|
||||
var __my_url__ = '{{$my_url}}';
|
||||
var __my_public_url__ = '{{$my_public_url}}';
|
||||
var __public__ = '{{$public_host}}';
|
||||
var __default_theme__ = '{{$default_theme}}';
|
||||
var __attachment_host__ = '{{$attachment_host}}';
|
||||
var __seo_url_suffix__ = '{{:MyC("home_seo_url_html_suffix", "html", true)}}';
|
||||
var __currency_symbol__ = '{{$currency_symbol}}';
|
||||
var __is_mobile__ = '{{if IsMobile()}}1{{else}}0{{/if}}';
|
||||
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
|
||||
var __map_view_url__ = '{{:MyUrl("admin/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
{{if !empty($k) and isset($v) and !is_array($v)}}
|
||||
var lang_{{$k}} = '{{$v}}';
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</script>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
// 基础配置
|
||||
var __system_type__ = '{{$system_type}}';
|
||||
var __root__ = '{{$public_host}}';
|
||||
var __my_http__ = '{{$my_http}}';
|
||||
var __my_url__ = '{{$my_url}}';
|
||||
var __my_public_url__ = '{{$my_public_url}}';
|
||||
var __public__ = '{{$public_host}}';
|
||||
var __default_theme__ = '{{$default_theme}}';
|
||||
var __attachment_host__ = '{{$attachment_host}}';
|
||||
var __seo_url_suffix__ = '{{:MyC("home_seo_url_html_suffix", "html", true)}}';
|
||||
var __currency_symbol__ = '{{$currency_symbol}}';
|
||||
var __is_mobile__ = '{{if IsMobile()}}1{{else}}0{{/if}}';
|
||||
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
|
||||
var __map_view_url__ = '{{:MyUrl("admin/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
{{if !empty($k) and isset($v) and !is_array($v)}}
|
||||
var lang_{{$k}} = '{{$v}}';
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</script>
|
||||
<body>
|
||||
{{if $module_name.$controller_name.$action_name neq 'adminindexindex'}}
|
||||
{{include file="public/page_loading" /}}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
<div class="am-collapse am-topbar-collapse" id="topbar-collapse">
|
||||
<ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
|
||||
<li class="am-dropdown">
|
||||
<a href="{{$admin_color_url}}">
|
||||
<a href="{{$theme_color_url}}">
|
||||
<i class="am-icon-adjust"></i>
|
||||
<span>{{$admin_color_name}}</span>
|
||||
<span>{{$theme_color_name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{if AdminIsPower('cache', 'statusupdate')}}
|
||||
|
|
@ -25,19 +25,19 @@
|
|||
</li>
|
||||
{{/if}}
|
||||
|
||||
<li class="am-dropdown">
|
||||
<a href="{{$home_url}}" target="_blank">
|
||||
<i class="am-icon-home"></i>
|
||||
<span>查看首页</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="am-dropdown am-hide-sm-only">
|
||||
<a href="javascript:;" class="fullscreen-event" data-fulltext-open="开启全屏" data-fulltext-exit="退出全屏">
|
||||
<i class="am-icon-arrows-alt"></i>
|
||||
<span class="fullscreen-text">开启全屏</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="am-dropdown">
|
||||
<a href="{{$home_url}}" target="_blank">
|
||||
<i class="am-icon-home"></i>
|
||||
<span>查看首页</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="am-dropdown common-nav-top" data-am-dropdown data-am-dropdown-toggle>
|
||||
<a class="am-dropdown-toggle" href="javascript:;">
|
||||
|
|
|
|||
|
|
@ -70,6 +70,20 @@
|
|||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 公共header内钩子 -->
|
||||
{{if !empty($plugins_common_header_data) and is_array($plugins_common_header_data)}}
|
||||
{{foreach $plugins_common_header_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
<!-- 主题配色 -->
|
||||
{{if isset($theme_color_value) and $theme_color_value eq 1}}
|
||||
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/css/color/black.css?v={{:MyC('home_static_cache_version')}}" />
|
||||
{{/if}}
|
||||
|
||||
<script type="text/javascript">
|
||||
// 基础配置
|
||||
|
|
@ -98,15 +112,6 @@
|
|||
{{/foreach}}
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<!-- 公共header内钩子 -->
|
||||
{{if !empty($plugins_common_header_data) and is_array($plugins_common_header_data)}}
|
||||
{{foreach $plugins_common_header_data as $hook}}
|
||||
{{if is_string($hook) or is_int($hook)}}
|
||||
{{$hook|raw}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</head>
|
||||
<body {{if in_array(MiniAppEnv(), MyConfig('shopxo.mini_app_type_list'))}}class="mini-app-env"{{/if}}>
|
||||
<!-- css钩子 -->
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ ul {margin-top:0;}
|
|||
.admin .am-g {padding-left:0;padding-right:0;}
|
||||
/*---right Content---*/
|
||||
.content-right .content {padding:10px 10px 0 10px;}
|
||||
.admin-sidebar-list li a {padding:0.6rem;}
|
||||
.admin-sidebar-list li a {padding:0.65rem;}
|
||||
.common-left-menu a:hover { background:rgba(118, 119, 120, 0.45); }
|
||||
.common-left-menu-active {background:#1cc09f !important;color:#fff !important;}
|
||||
#ifcontent {border:0px;}
|
||||
|
|
|
|||
|
|
@ -423,7 +423,8 @@ table.am-table .am-btn-danger,
|
|||
.block-container,
|
||||
.block-combination-container-2 li,
|
||||
.plugins-intellectstools-goods-category-choice .goods-category-choice-content,
|
||||
.plugins-intellectstools-goods-category-choice .goods-category-choice .already-select-tips {
|
||||
.plugins-intellectstools-goods-category-choice .goods-category-choice .already-select-tips,
|
||||
ul.am-dropdown-content {
|
||||
background-color: #1d1d1d !important;
|
||||
border-color: #292929;
|
||||
}
|
||||
Loading…
Reference in New Issue