【Layui】权限管理

举报
原来是咔咔 发表于 2022/03/27 02:12:30 2022/03/27
【摘要】 author:咔咔 wechat:fangkangfk html导航单显示 {include file="../../../application/admin/view/public/head" /} <style type="text/css"> .hs-iframe{width:100%;height:1...

author:咔咔

wechat:fangkangfk

html导航单显示


  
  1. {include file="../../../application/admin/view/public/head" /}
  2. <style type="text/css">
  3. .hs-iframe{width:100%;height:100%;}
  4. .layui-tab{position:absolute;left:0;top:0;height:100%;width:100%;z-index:10;margin:0;border:none;overflow:hidden;}
  5. .layui-tab-title li:first-child > i {
  6. display: none;
  7. }
  8. .layui-tab-content{padding:0 0 0 10px;height:100%;}
  9. .layui-tab-item{height:100%;}
  10. .layui-nav-tree .layui-nav-child a{height:38px;line-height: 38px;}
  11. .footer{position:fixed;left:0;bottom:0;z-index:998;}
  12. </style>
  13. <div class="layui-layout layui-layout-admin">
  14. <div class="layui-header">
  15. <div class="fl header-logo">番茄视频后台控制台</div>
  16. <div class="fl header-fold"><a href="javascript:;" title="打开/关闭左侧导航" class="aicon ai-caidan" id="foldSwitch"><i class="layui-icon">&#xe65f;</i></a></div>
  17. <ul class="layui-nav fl nobg main-nav">
  18. {volist name="menus" id="vo"}
  19. {if condition="($i eq 1)"}
  20. <li class="layui-nav-item layui-this">
  21. {else /}
  22. <li class="layui-nav-item">
  23. {/if}
  24. <a href="javascript:;">{$vo['name']}</a></li>
  25. {/volist}
  26. </ul>
  27. <ul class="layui-nav fr nobg head-info" lay-filter="">
  28. <li class="layui-nav-item">
  29. <a href="javascript:void(0);">{$Think.session.USER_INFO_SESSION.au_user_name}&nbsp;&nbsp;</a>
  30. <dl class="layui-nav-child">
  31. <dd><a href="javascript:void(0);" id="lockScreen">锁屏</a></dd>
  32. <dd><a href="{:url('login/loginOut')}">退出登陆</a></dd>
  33. </dl>
  34. </li>
  35. <li class="layui-nav-item"><a href="http://www.maccms.com/" target="_blank">官网</a></li>
  36. <li class="layui-nav-item"><a href="http://bbs.maccms.com/" target="_blank">论坛</a></li>
  37. <li class="layui-nav-item"><a href="__ROOT__/" target="_blank">前台</a></li>
  38. <li class="layui-nav-item"><a href="{:url('index/clear')}" class="j-ajax" refresh="yes">清缓存</a></li>
  39. </ul>
  40. </div>
  41. <div class="layui-side layui-bg-black" id="switchNav">
  42. <div class="layui-side-scroll">
  43. {volist name="menus" id="v"}
  44. {if condition="($i eq 1)"}
  45. <ul class="layui-nav layui-nav-tree">
  46. {else /}
  47. <ul class="layui-nav layui-nav-tree" style="display:none;">
  48. {/if}
  49. <li class="layui-nav-item layui-nav-itemed">
  50. <a href="javascript:;"><i ></i>{$v['name']}<span class="layui-nav-more"></span></a>
  51. <dl class="layui-nav-child">
  52. {volist name="v['sub']" id="vv" key="kk"}
  53. <dd><a class="admin-nav-item" data-id="{$key}{$kk}" href="{$vv['url']}"><i ></i> {$vv['name']}</a></dd>
  54. {/volist}
  55. </dl>
  56. </li>
  57. </ul>
  58. {/volist}
  59. </div>
  60. </div>
  61. <div class="layui-body" id="switchBody">
  62. <div class="layui-tab layui-tab-card" lay-filter="macTab" lay-allowClose="true">
  63. <ul class="layui-tab-title">
  64. <li lay-id="111" class="layui-this">欢迎页面</li>
  65. </ul>
  66. <div class="layui-tab-content">
  67. <div class="layui-tab-item layui-show">
  68. <iframe lay-id="111" src="{:url('index/welcome')}" width="100%" height="100%" frameborder="0" scrolling="yes" class="hs-iframe"></iframe>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="layui-footer footer">
  74. <div class="fl"></div>
  75. <div class="fr"> © 2008-2018 <a href="http://www.maccms.com/" target="_blank">MacCMS.COM.</a> All Rights Reserved.</div>
  76. </div>
  77. </div>
  78. {include file="../../../application/admin/view/public/foot" /}
  79. <!--请在下方写此页面业务相关的脚本-->
  80. <script>
  81. window.localStorage.clear();
  82. var LAYUI_OFFSET = 60;
  83. </script>
  84. <script type="text/javascript">
  85. layui.use(['element', 'layer'], function() {
  86. var $ = layui.jquery, element = layui.element, layer = layui.layer;
  87. $('.layui-tab-content').height($(window).height() - 145);
  88. var tab = {
  89. add: function(title, url, id) {
  90. element.tabAdd('macTab', {
  91. title: title,
  92. content: '<iframe width="100%" height="100%" lay-id="'+id+'" frameborder="0" src="'+url+'" scrolling="yes" class="x-iframe"></iframe>',
  93. id: id
  94. });
  95. }, change: function(id) {
  96. element.tabChange('macTab', id);
  97. }
  98. };
  99. $('.admin-nav-item').click(function(event) {
  100. var that = $(this);
  101. var id = that.attr('data-id');
  102. if ($('iframe[lay-id="'+id+'"]')[0]) {
  103. tab.change(id);
  104. event.stopPropagation();
  105. $("iframe[lay-id='"+id+"']")[0].contentWindow.location.reload(true);//切换后刷新框架
  106. return false;
  107. }
  108. if ($('iframe').length == 10) {
  109. layer.msg('最多可打开10个标签页');
  110. return false;
  111. }
  112. that.css({color:'#fff'});
  113. tab.add(that.text(), that.attr('href'), that.attr('data-id'));
  114. tab.change(that.attr('data-id'));
  115. event.stopPropagation();
  116. return false;
  117. });
  118. $(document).on('click', '.layui-tab-close', function() {
  119. $('.layui-nav-child a[data-id="'+$(this).parent('li').attr('lay-id')+'"]').css({color:'rgba(255,255,255,.7)'});
  120. });
  121. });
  122. </script>
  123. </body>
  124. </html>

这是效果图

下来我们开始写控制器:

在写权限之前,我们先缕缕思路

1.我们需要在用户登录的时候获取用户的所有的权限

2.过滤系统管理员,不判断其权限

3.根据登录时的角色信息,来验证权限

下来我们先看登录存储用户权限信息:

这个时候我们需要在base基类里边做权限验证

这里使用的是tp5获取的控制器和方法名,这里有一个注意点就是需要将所有的地址全部转为小写,这一步就是判断用户是否有权限,有权限了会继续执行,没有权限的话,会直接返回上一个页面

 


  
  1. public function check_auth($controller,$action)
  2. {
  3. $c = strtolower($controller);
  4. $a = strtolower($action);
  5. // 获取用户权限
  6. $authId = $this->session->getUserRole();
  7. // 获取用户信息
  8. $adminData = $this->session->getUserInfo();
  9. $adminAuth = Db::name('auth')->where('a_id',$authId)->value('a_auth');
  10. $auths = $adminAuth . ',index/index,index/welcome,';
  11. $cur = $c.'/'.$a;
  12. if($adminData->au_id =='1'){
  13. return true;
  14. }
  15. elseif(strpos(strtolower($auths),$cur)===false){
  16. return false;
  17. }
  18. else{
  19. return true;
  20. }
  21. }

做到这里是不是感觉代码就到这完了,其实不然,我们还需要写菜单栏的代码,因为设置权限了以后,会有一部分导航是看不见的 

这个功能点,我们在哪里做呢!我们都是知道Layui这个框架是是使用的ifaram,所以导航栏只会刷新一次,所以我们需要在index控制写

这个方法的注释已经写得很明晰了。我简单的解释一下

首先我们会从配置文件中将所有的权限都读取出来,然后进行循环组装跟移除此用户没有权限的导航。

show为1的是显示的导航列表,我们获取到配置文件的权限信息,组装成我们数据库存储的格式

然后拿着这个控制器跟方法名来使用我们base的检验权限的方法,来移除不属于角色的权限,这就是第一个if做的事情

我们的模块有增删改这三个功能,当然我们的权限控制也是需要控制这些列表的。但是这些列表是不会显示出来的,所以我们会将show为0的所有列表删除掉

这个时候我们的大的导航栏在权限过滤完之后是由一部分是空的,所以在将这一部分删除即可


  
  1. /**
  2. * 获取菜单
  3. * @return array
  4. */
  5. public function getMenu()
  6. {
  7. $menus = Config::get('auth');
  8. foreach($menus as $k1=>$v1){
  9. foreach($v1['sub'] as $k2=>$v2){
  10. // 获取所有的一级菜单
  11. if($v2['show'] == 1) {
  12. $url = url( 'admin/'.$v2['controller'] . '/' . $v2['action']);
  13. if ($this->check_auth($v2['controller'], $v2['action'])) {
  14. $menus[$k1]['sub'][$k2]['url'] = $url;
  15. } else {
  16. // 没有权限的全部删除
  17. unset($menus[$k1]['sub'][$k2]);
  18. }
  19. }
  20. else{
  21. // 不显示的不需要给组装url
  22. unset($menus[$k1]['sub'][$k2]);
  23. }
  24. }
  25. // 在将权限过滤完之后,没有权限的一级就没有二级,所以删除区级即可
  26. if(empty($menus[$k1]['sub'])){
  27. unset($menus[$k1]);
  28. }
  29. }
  30. return $menus;
  31. }

我们权限存储的方式


  
  1. <?php
  2. return array(
  3. '1' => array('name' => '首页', 'icon' => 'xe625', 'sub' => array(
  4. '11' => array("show"=>1,"name" => '欢迎页面', 'controller' => 'index', 'action' => 'welcome'),
  5. '12' => array("show"=>1,"name" => '系统配置', 'controller' => 'index', 'action' => 'welcome'),
  6. )),
  7. '11' => array('name' => '管理员', 'icon' => 'xe62c', 'sub' => array(
  8. '114' => array("show"=>1,'name' => '管理员', 'controller' => 'Administrators', 'action' => 'index'),
  9. '63' => array("show"=>1,'name' => '管理员权限组', 'controller' => 'Auth', 'action' => 'index'),
  10. '115' => array("show"=>1,'name' => '管理员操作日志', 'controller' => 'userTask', 'action' => 'index'),
  11. )),
  12. '3' => array('name' => '基础', 'icon' => 'xe62c', 'sub' => array(
  13. '26' => array("show"=>1,'name' => '启动和引导页', 'controller' => 'boot', 'action' => 'index'),
  14. '261' => array("show"=>0,'name' => '启动页添加', 'controller' => 'boot', 'action' => 'addBootUp'),
  15. '262' => array("show"=>0,'name' => '启动页修改', 'controller' => 'boot', 'action' => 'editBootUp'),
  16. '263' => array("show"=>0,'name' => '启动页删除', 'controller' => 'boot', 'action' => 'delBootUp'),
  17. '264' => array("show"=>0,'name' => '启动页状态', 'controller' => 'boot', 'action' => 'bootUpStatus'),
  18. '31' => array("show"=>1,'name' => '广告管理', 'controller' => 'ad', 'action' => 'index'),
  19. '311' => array("show"=>0,'name' => '广告添加', 'controller' => 'ad', 'action' => 'addBanner'),
  20. '312' => array("show"=>0,'name' => '广告修改', 'controller' => 'ad', 'action' => 'editBanner'),
  21. '313' => array("show"=>0,'name' => '广告删除', 'controller' => 'ad', 'action' => 'delBanner'),
  22. '314' => array("show"=>0,'name' => '广告视频', 'controller' => 'ad', 'action' => 'videoInfoList'),
  23. '30' => array("show"=>1,'name' => '域名管理', 'controller' => 'domain', 'action' => 'index'),
  24. '301' => array("show"=>0,'name' => '域名添加', 'controller' => 'domain', 'action' => 'addDomain'),
  25. '302' => array("show"=>0,'name' => '域名修改', 'controller' => 'domain', 'action' => 'editDomain'),
  26. '303' => array("show"=>0,'name' => '域名删除', 'controller' => 'domain', 'action' => 'delDoamin'),
  27. '34' => array("show"=>1,'name' => '用户图像库', 'controller' => 'headpic', 'action' => 'index'),
  28. '341' => array("show"=>0,'name' => '用户图像库添加', 'controller' => 'headpic', 'action' => 'add'),
  29. '342' => array("show"=>0,'name' => '用户图像库修改', 'controller' => 'headpic', 'action' => 'edit'),
  30. '343' => array("show"=>0,'name' => '用户图像库删除', 'controller' => 'headpic', 'action' => 'del'),
  31. '32' => array("show"=>1,'name' => '公告管理', 'controller' => 'domain', 'action' => 'index'),
  32. '33' => array("show"=>1,'name' => '系统消息', 'controller' => 'domain', 'action' => 'index'),
  33. '27' => array("show"=>1,'name' => '版本更新', 'controller' => 'Versions', 'action' => 'index'),
  34. '2701' => array("show"=>0,'name' => '--版本修改', 'controller' => 'Versions', 'action' => 'editVersions'),
  35. '2703' => array("show"=>0,'name' => '--版本删除', 'controller' => 'Versions', 'action' => 'delVersions'),
  36. '2704' => array("show"=>0,'name' => '--版本添加', 'controller' => 'Versions', 'action' => 'addVersions'),
  37. )),
  38. '4' => array('name' => '视频', 'icon' => 'xe625', 'sub' => array(
  39. '31' => array("show"=>1,'name' => '类型管理', 'controller' => 'videoType', 'action' => 'index'),
  40. '311' => array("show"=>0,'name' => '修改类型', 'controller' => 'videoType', 'action' => 'editType'),
  41. '312' => array("show"=>0,'name' => '删除类型', 'controller' => 'videoType', 'action' => 'delVideoType'),
  42. '313' => array("show"=>0,'name' => '添加类型', 'controller' => 'videoType', 'action' => 'addVideoType'),
  43. '314' => array("show"=>0,'name' => '一级分类管理', 'controller' => 'videoType', 'action' => 'subclassList'),
  44. '315' => array("show"=>0,'name' => '一级分类修改', 'controller' => 'videoType', 'action' => 'editSubClass'),
  45. '316' => array("show"=>0,'name' => '一级分类添加', 'controller' => 'videoType', 'action' => 'addSubclass'),
  46. '317' => array("show"=>0,'name' => '一级分类删除', 'controller' => 'videoType', 'action' => 'delSubclass'),
  47. '318' => array("show"=>0,'name' => '二级分类管理', 'controller' => 'videoType', 'action' => 'secondTypeIndex'),
  48. '319' => array("show"=>0,'name' => '添加二级分类', 'controller' => 'videoType', 'action' => 'addSecondType'),
  49. '3110' => array("show"=>0,'name' => '修改二级分类', 'controller' => 'videoType', 'action' => 'editSecondType'),
  50. '32' => array("show"=>1,'name' => '专题管理', 'controller' => 'subject', 'action' => 'index'),
  51. '321' => array("show"=>0,'name' => '专题列表', 'controller' => 'subject', 'action' => 'subjectList'),
  52. '322' => array("show"=>0,'name' => '专题修改', 'controller' => 'subject', 'action' => 'editSubject'),
  53. '323' => array("show"=>0,'name' => '专题添加', 'controller' => 'subject', 'action' => 'addSubject'),
  54. '324' => array("show"=>0,'name' => '专题删除', 'controller' => 'subject', 'action' => 'delSubject'),
  55. '325' => array("show"=>0,'name' => '专题视频列表', 'controller' => 'subject', 'action' => 'videoList'),
  56. '326' => array("show"=>0,'name' => '专题视频添加', 'controller' => 'subject', 'action' => 'subjectVideoAdd'),
  57. '327' => array("show"=>0,'name' => '专题视频删除', 'controller' => 'subject', 'action' => 'delSubjectVideo'),
  58. '328' => array("show"=>0,'name' => '专题视频更换', 'controller' => 'subject', 'action' => 'editSubjectVideo'),
  59. '329' => array("show"=>0,'name' => '专题广告列表', 'controller' => 'subject', 'action' => 'adList'),
  60. '3210' => array("show"=>0,'name' => '专题广告添加', 'controller' => 'subject', 'action' => 'addAd'),
  61. '3211' => array("show"=>0,'name' => '专题广告修改', 'controller' => 'subject', 'action' => 'editAd'),
  62. '3212' => array("show"=>0,'name' => '专题广告删除', 'controller' => 'subject', 'action' => 'delAd'),
  63. '40' => array("show"=>1,'name' => '标签库', 'controller' => 'tag', 'action' => 'index'),
  64. '401' => array("show"=>0,'name' => '标签添加', 'controller' => 'tag', 'action' => 'add'),
  65. '402' => array("show"=>0,'name' => '标签修改', 'controller' => 'tag', 'action' => 'edit'),
  66. '403' => array("show"=>0,'name' => '标签删除', 'controller' => 'tag', 'action' => 'del'),
  67. '41' => array("show"=>1,'name' => '热词管理', 'controller' => 'hotWord', 'action' => 'index'),
  68. '411' => array("show"=>0,'name' => '热词添加', 'controller' => 'hotWord', 'action' => 'add'),
  69. '412' => array("show"=>0,'name' => '热词修改', 'controller' => 'hotWord', 'action' => 'edit'),
  70. '413' => array("show"=>0,'name' => '热词删除', 'controller' => 'hotWord', 'action' => 'del'),
  71. '38' => array("show"=>1,'name' => '视频管理', 'controller' => 'video', 'action' => 'index'),
  72. '381' => array("show"=>0,'name' => '视频添加', 'controller' => 'video', 'action' => 'add'),
  73. '382' => array("show"=>0,'name' => '视频修改', 'controller' => 'video', 'action' => 'edit'),
  74. '383' => array("show"=>0,'name' => '视频删除', 'controller' => 'video', 'action' => 'del'),
  75. '39' => array("show"=>1,'name' => '评论管理', 'controller' => 'video', 'action' => 'index'),
  76. )),
  77. '6' => array('name' => '用户', 'icon' => 'xe62c', 'sub' => array(
  78. '63' => array("show"=>1,'name' => '用户管理', 'controller' => 'user', 'action' => 'index'),
  79. '6301' => array("show"=>0,'name' => '--会员信息查看', 'controller' => 'user', 'action' => 'userView'),
  80. '6302' => array("show"=>0,'name' => '--会员删除', 'controller' => 'user', 'action' => 'delUser'),
  81. '6303' => array("show"=>0,'name' => '--会员信息修改', 'controller' => 'user', 'action' => 'editUser'),
  82. '64' => array("show"=>1,'name' => '任务记录', 'controller' => 'userTask', 'action' => 'index'),
  83. '6401' => array("show"=>0,'name' => '用户任务删除', 'controller' => 'userTask', 'action' => 'delUserTask'),
  84. '65' => array("show"=>1,'name' => '特权兑换记录', 'controller' => 'userExchange', 'action' => 'index'),
  85. '6501' => array("show"=>0,'name' => '用户任务删除', 'controller' => 'userTask', 'action' => 'delUserTask'),
  86. // '67' => array("show"=>1,'name' => '视频播放记录', 'controller' => 'user', 'action' => 'index'),
  87. // '68' => array("show"=>1,'name' => '视频收藏记录', 'controller' => 'user', 'action' => 'index'),
  88. '66' => array("show"=>1,'name' => 'App下载记录', 'controller' => 'user', 'action' => 'index'),
  89. '69' => array("show"=>1,'name' => '用户反馈', 'controller' => 'user', 'action' => 'index'),
  90. )),
  91. '5' => array('name' => '推广', 'icon' => 'xe616', 'sub' => array(
  92. '28' => array("show"=>1,'name' => '任务配置', 'controller' => 'task', 'action' => 'index'),
  93. '2801' => array("show"=>0,'name' => '--任务修改', 'controller' => 'task', 'action' => 'editTask'),
  94. '2803' => array("show"=>0,'name' => '--任务删除', 'controller' => 'task', 'action' => 'delTask'),
  95. '2804' => array("show"=>0,'name' => '--任务添加', 'controller' => 'task', 'action' => 'addTask'),
  96. '26' => array("show"=>1,'name' => '特权配置', 'controller' => 'Exchange', 'action' => 'index'),
  97. '2601' => array("show"=>0,'name' => '特权修改', 'controller' => 'Exchange', 'action' => 'addExchange'),
  98. '2603' => array("show"=>0,'name' => '特权删除', 'controller' => 'Exchange', 'action' => 'editExchange'),
  99. '2604' => array("show"=>0,'name' => '特权添加', 'controller' => 'Exchange', 'action' => 'delExchange'),
  100. '29' => array("show"=>1,'name' => '等级配置', 'controller' => 'task', 'action' => 'index'),
  101. )),
  102. // '9' => array('name' => '采集', 'icon' => 'xe727', 'sub' => array(
  103. // '91' => array("show"=>1,'name' => '联盟资源库', 'controller' => 'collect', 'action' => 'union'),
  104. // '9101' => array("show"=>0,'name' => '--采集入口', 'controller' => 'collect', 'action' => 'api'),
  105. // '9102' => array("show"=>0,'name' => '--断点采集', 'controller' => 'collect', 'action' => 'load'),
  106. // '9103' => array("show"=>0,'name' => '--绑定分类', 'controller' => 'collect', 'action' => 'bind'),
  107. // '9104' => array("show"=>0,'name' => '--采集视频', 'controller' => 'collect', 'action' => 'vod'),
  108. // '9105' => array("show"=>0,'name' => '--采集文章', 'controller' => 'collect', 'action' => 'art'),
  109. //
  110. // '92' => array("show"=>1,'name' => '定时挂机采集', 'controller' => 'collect', 'action' => 'timing'),
  111. //
  112. // '93' => array("show"=>1,'name' => '自定义资源库', 'controller' => 'collect', 'action' => 'index'),
  113. // '9301' => array("show"=>0,'name' => '--自定义资源库信息维护', 'controller' => 'collect', 'action' => 'info'),
  114. // '9302' => array("show"=>0,'name' => '--自定义资源库删除', 'controller' => 'collect', 'action' => 'del'),
  115. //
  116. // '94' => array("show"=>1,'name' => '自定义采集', 'controller' => 'cj', 'action' => 'index'),
  117. // '9401' => array("show"=>0,'name' => '--自定义采集信息维护', 'controller' => 'cj', 'action' => 'info'),
  118. // '9402' => array("show"=>0,'name' => '--自定义采集删除', 'controller' => 'cj', 'action' => 'del'),
  119. // '9403' => array("show"=>0,'name' => '--自定义采集发布方案', 'controller' => 'cj', 'action' => 'program'),
  120. // '9404' => array("show"=>0,'name' => '--自定义采集采集网址', 'controller' => 'cj', 'action' => 'col_url'),
  121. // '9405' => array("show"=>0,'name' => '--自定义采集采集内容', 'controller' => 'cj', 'action' => 'col_content'),
  122. // '9406' => array("show"=>0,'name' => '--自定义采集发布内容', 'controller' => 'cj', 'action' => 'publish'),
  123. // '9407' => array("show"=>0,'name' => '--自定义采集导出', 'controller' => 'cj', 'action' => 'export'),
  124. // '9408' => array("show"=>0,'name' => '--自定义采集导入', 'controller' => 'cj', 'action' => 'import'),
  125. //
  126. // )),
  127. // '10' => array('name' => '数据库', 'icon' => 'xe621', 'sub' => array(
  128. // '101' => array("show"=>1,'name' => '数据库管理', 'controller' => 'database', 'action' => 'index'),
  129. // '10001' => array("show"=>0,'name' => '--数据库备份', 'controller' => 'database', 'action' => 'export'),
  130. // '10002' => array("show"=>0,'name' => '--数据库还原', 'controller' => 'database', 'action' => 'import'),
  131. // '10003' => array("show"=>0,'name' => '--数据库优化', 'controller' => 'database', 'action' => 'optimize'),
  132. // '10004' => array("show"=>0,'name' => '--数据库修复', 'controller' => 'database', 'action' => 'repair'),
  133. // '10005' => array("show"=>0,'name' => '--数据库删除备份', 'controller' => 'database', 'action' => 'del'),
  134. // '10006' => array("show"=>0,'name' => '--数据库表信息', 'controller' => 'database', 'action' => 'columns'),
  135. //
  136. // '102' => array("show"=>1,'name' => '执行SQL语句', 'controller' => 'database', 'action' => 'sql'),
  137. // '103' => array("show"=>1,'name' => '数据批量替换', 'controller' => 'database', 'action' => 'rep'),
  138. // )),
  139. );

文章来源: blog.csdn.net,作者:咔咔-,版权归原作者所有,如需转载,请联系作者。

原文链接:blog.csdn.net/fangkang7/article/details/86024489

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。