Skip to content

Commit

Permalink
1调整优化菜单显示。
Browse files Browse the repository at this point in the history
2修复升级脚本。
  • Loading branch information
magicblack committed Oct 30, 2019
1 parent b372d78 commit ac314f4
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 16 deletions.
18 changes: 9 additions & 9 deletions application/admin/common/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@
'9301' => array("show"=>0,'name' => '--自定义资源库信息维护', 'controller' => 'collect', 'action' => 'info'),
'9302' => array("show"=>0,'name' => '--自定义资源库删除', 'controller' => 'collect', 'action' => 'del'),

'94' => array("show"=>1,'name' => '自定义采集', 'controller' => 'cj', 'action' => 'index'),
'9401' => array("show"=>0,'name' => '--自定义采集信息维护', 'controller' => 'cj', 'action' => 'info'),
'9402' => array("show"=>0,'name' => '--自定义采集删除', 'controller' => 'cj', 'action' => 'del'),
'9403' => array("show"=>0,'name' => '--自定义采集发布方案', 'controller' => 'cj', 'action' => 'program'),
'9404' => array("show"=>0,'name' => '--自定义采集采集网址', 'controller' => 'cj', 'action' => 'col_url'),
'9405' => array("show"=>0,'name' => '--自定义采集采集内容', 'controller' => 'cj', 'action' => 'col_content'),
'9406' => array("show"=>0,'name' => '--自定义采集发布内容', 'controller' => 'cj', 'action' => 'publish'),
'9407' => array("show"=>0,'name' => '--自定义采集导出', 'controller' => 'cj', 'action' => 'export'),
'9408' => array("show"=>0,'name' => '--自定义采集导入', 'controller' => 'cj', 'action' => 'import'),
'94' => array("show"=>1,'name' => '自定义规则', 'controller' => 'cj', 'action' => 'index'),
'9401' => array("show"=>0,'name' => '--自定义规则信息维护', 'controller' => 'cj', 'action' => 'info'),
'9402' => array("show"=>0,'name' => '--自定义规则删除', 'controller' => 'cj', 'action' => 'del'),
'9403' => array("show"=>0,'name' => '--自定义规则发布方案', 'controller' => 'cj', 'action' => 'program'),
'9404' => array("show"=>0,'name' => '--自定义规则采集网址', 'controller' => 'cj', 'action' => 'col_url'),
'9405' => array("show"=>0,'name' => '--自定义规则采集内容', 'controller' => 'cj', 'action' => 'col_content'),
'9406' => array("show"=>0,'name' => '--自定义规则发布内容', 'controller' => 'cj', 'action' => 'publish'),
'9407' => array("show"=>0,'name' => '--自定义规则导出', 'controller' => 'cj', 'action' => 'export'),
'9408' => array("show"=>0,'name' => '--自定义规则导入', 'controller' => 'cj', 'action' => 'import'),

)),

Expand Down
3 changes: 3 additions & 0 deletions application/admin/controller/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public function index()
}
elseif(substr($one[1],0,1) =='/'){

}
elseif(strpos($one[1],'###')!==false || strpos($one[1],'javascript:')!==false){

}
else{
$one[1] = url($one[1]);
Expand Down
10 changes: 8 additions & 2 deletions application/admin/view/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
.layui-tab-content{padding:0 0 0 10px;height:100%;}
.layui-tab-item{height:100%;}
.layui-nav-tree .layui-nav-child a{height:38px;line-height: 38px;}
.layui-nav-tree .layui-nav-child a{height:35px;line-height: 35px;}
.footer{position:fixed;left:0;bottom:0;z-index:998;}
</style>
<div class="layui-layout layui-layout-admin">
Expand Down Expand Up @@ -51,7 +51,13 @@

<dl class="layui-nav-child">
{volist name="v['sub']" id="vv" key="kk"}
<dd><a class="admin-nav-item" data-id="{$key}{$kk}" href="{$vv['url']}"><i class="{$vv['icon']}"></i> {$vv['name']}</a></dd>
<dd>
{if condition="($vv['url'] !=='###')"}
<a class="admin-nav-item" data-id="{$key}{$kk}" href="{$vv['url']}"><i class="{$vv['icon']}"></i> {$vv['name']}</a>
{else}
<hr class="layui-bg-gray">
{/if}
</dd>
{/volist}
</dl>
</li>
Expand Down
3 changes: 2 additions & 1 deletion application/admin/view/index/quickmenu.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
格式要求:1.菜单名称,菜单链接地址;2.每个快捷菜单各占一行;<br>
1,支持远程地址,例如: 更新日志,//www.maccms.com/doc/v10/log.html<br>
2,支持插件文件,例如: 插件文件菜单,/application/xxxx.html<br>
3,支持系统模块,例如: 视频管理,vod/data
3,支持系统模块,例如: 文章管理,art/data<br>
4,支持行分隔符,例如: 分隔符,###
</blockquote>

<form class="layui-form" action="">
Expand Down
21 changes: 21 additions & 0 deletions application/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,9 @@ function mac_interface_type()
$config = config('maccms.interface');
$vodtype = str_replace([chr(10),chr(13)],['','#'],$config['vodtype']);
$arttype = str_replace([chr(10),chr(13)],['','#'],$config['arttype']);
$actortype = str_replace([chr(10),chr(13)],['','#'],$config['actortype']);
$websitetype = str_replace([chr(10),chr(13)],['','#'],$config['websitetype']);

$data =[];
$type_arr = explode('#',$vodtype);
foreach($type_arr as $k=>$v){
Expand All @@ -704,6 +707,18 @@ function mac_interface_type()
$data['arttype'][$to] = $from;
}

$type_arr = explode('#',$actortype);
foreach($type_arr as $k=>$v){
list($from, $to) = explode('=', $v);
$data['actortype'][$to] = $from;
}

$type_arr = explode('#',$websitetype);
foreach($type_arr as $k=>$v){
list($from, $to) = explode('=', $v);
$data['websitetype'][$to] = $from;
}

think\Cache::set($key,$data);
}

Expand All @@ -719,6 +734,12 @@ function mac_interface_type()
foreach($data['arttype'] as $k=>$v){
$data['arttype'][$k] = (int)$type_names[$v];
}
foreach($data['actortype'] as $k=>$v){
$data['actortype'][$k] = (int)$type_names[$v];
}
foreach($data['websitetype'] as $k=>$v){
$data['websitetype'][$k] = (int)$type_names[$v];
}
return $data;
}

Expand Down
8 changes: 5 additions & 3 deletions application/data/config/quickmenu.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
更新日志,//www.maccms.com/doc/v10/log.html
视频管理,vod/data
测试插件文件菜单,/application/xxxx.html
测试系统模块菜单,system/config
测试远程地址菜单,//www.baidu.com/
测试插件文件菜单,/application/xxxx.html
行分隔符,###
文章管理,art/data
2 changes: 1 addition & 1 deletion application/data/update/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*2019.1000.1019*/
if(empty($col_list[$pre.'actor']['type_id'])){
$sql .= "ALTER TABLE `mac_actor` ADD `type_id` INT( 10 ) unsigned NOT NULL DEFAULT '0',ADD `type_id_1` INT( 10 ) unsigned NOT NULL DEFAULT '0'ADD `actor_tag` VARCHAR( 255 ) NOT NULL DEFAULT '',ADD `actor_class` VARCHAR( 255 ) NOT NULL DEFAULT '';";
$sql .= "ALTER TABLE `mac_actor` ADD `type_id` INT( 10 ) unsigned NOT NULL DEFAULT '0',ADD `type_id_1` INT( 10 ) unsigned NOT NULL DEFAULT '0',ADD `actor_tag` VARCHAR( 255 ) NOT NULL DEFAULT '',ADD `actor_class` VARCHAR( 255 ) NOT NULL DEFAULT '';";
$sql .="\r";
}
if(empty($col_list[$pre.'website'])){
Expand Down

0 comments on commit ac314f4

Please sign in to comment.