diff --git a/application/admin/controller/Auth.php b/application/admin/controller/Auth.php index 18ba2f684..7ad0df9e6 100644 --- a/application/admin/controller/Auth.php +++ b/application/admin/controller/Auth.php @@ -151,7 +151,7 @@ class Auth extends BasicAdmin { if (DataService::update($this->table)) { $id = $this->request->post('id'); - Db::name('SystemAuthNode')->where('auth', $id)->delete(); + Db::name('SystemAuthNode')->where(['auth' => $id])->delete(); $this->success("权限删除成功!", ''); } $this->error("权限删除失败,请稍候再试!"); diff --git a/application/admin/controller/Config.php b/application/admin/controller/Config.php index 258612f79..155ffc1b3 100644 --- a/application/admin/controller/Config.php +++ b/application/admin/controller/Config.php @@ -60,7 +60,7 @@ class Config extends BasicAdmin public function file() { $this->title = '文件存储配置'; - $alert = ['type' => 'success', 'title' => '操作提示', 'content' => '文件引擎参数影响全局文件上传功能,请勿随意修改!']; + $alert = ['type' => 'success', 'title' => '操作提示', 'content' => '文件引擎参数影响全局文件上传功能,请勿随意修改!']; $this->assign('alert', $alert); return $this->index(); } diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index 1e323f799..d490a2b50 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -38,7 +38,7 @@ class Index extends BasicAdmin public function index() { NodeService::applyAuthNode(); - $list = (array) Db::name('SystemMenu')->where(['status' => '1'])->order('sort asc,id asc')->select(); + $list = (array)Db::name('SystemMenu')->where(['status' => '1'])->order('sort asc,id asc')->select(); $menus = $this->_filterMenu(ToolsService::arr2tree($list), NodeService::get()); return view('', ['title' => '系统管理', 'menus' => $menus]); } diff --git a/application/admin/controller/Log.php b/application/admin/controller/Log.php index beff34267..f9e77cd6b 100644 --- a/application/admin/controller/Log.php +++ b/application/admin/controller/Log.php @@ -20,7 +20,7 @@ use think\Db; /** * 系统日志管理 - * Class User + * Class Log * @package app\admin\controller * @author Anyon * @date 2017/02/15 18:12 diff --git a/application/admin/controller/Menu.php b/application/admin/controller/Menu.php index 5cf64ef73..f63e0081c 100644 --- a/application/admin/controller/Menu.php +++ b/application/admin/controller/Menu.php @@ -83,7 +83,7 @@ class Menu extends BasicAdmin { if ($this->request->isGet()) { // 上级菜单处理 - $_menus = Db::name($this->table)->where('status', '1')->order('sort desc,id desc')->select(); + $_menus = Db::name($this->table)->where(['status' => '1'])->order('sort desc,id desc')->select(); $_menus[] = ['title' => '顶级菜单', 'id' => '0', 'pid' => '-1']; $menus = ToolsService::arr2table($_menus); foreach ($menus as $key => &$menu) { diff --git a/application/admin/controller/Plugs.php b/application/admin/controller/Plugs.php index 03d82330c..acfd213d5 100644 --- a/application/admin/controller/Plugs.php +++ b/application/admin/controller/Plugs.php @@ -117,7 +117,7 @@ class Plugs extends BasicAdmin $secretKey = sysconf('storage_qiniu_secret_key'); $protocol = sysconf('storage_qiniu_is_https') ? 'https' : 'http'; $params = [ - "scope" => "{$bucket}:{$key}", "deadline" => 3600 + time(), + "scope" => "{$bucket}:{$key}", "deadline" => 3600 + time(), "returnBody" => "{\"data\":{\"site_url\":\"{$protocol}://{$host}/$(key)\",\"file_url\":\"$(key)\"}, \"code\": \"SUCCESS\"}", ]; $data = str_replace(['+', '/'], ['-', '_'], base64_encode(json_encode($params))); diff --git a/application/admin/view/auth.index.html b/application/admin/view/auth.index.html index 3189c6c90..d23682d55 100644 --- a/application/admin/view/auth.index.html +++ b/application/admin/view/auth.index.html @@ -2,81 +2,89 @@ {block name="button"}
- - + +
{/block} {block name="content"}
- {if !empty($list)} + {if empty($list)} +

没 有 记 录 哦!

+ {else} - +
- - - - - - - - + + + + + + + + - {foreach $list as $key=>$vo} - - - - - - - + + + + + + - - {/foreach} + + + {/foreach}
- - - - 权限名称权限描述状态操作
+ + + + 权限名称权限描述状态操作
- - - - {$vo.title}{$vo.desc|default="没有写描述哦!"} - {if $vo.status eq 0} - 已禁用 - {elseif $vo.status eq 1} - 使用中 - {/if} - + {foreach $list as $key=>$vo} +
+ + + + {$vo.title}{$vo.desc|default="没有写描述哦!"} + {if $vo.status eq 0} + 已禁用 + {elseif $vo.status eq 1} + 使用中 + {/if} + - {if auth("$classuri/edit")} - | - 编辑 - {/if} + {if auth("$classuri/edit")} + | + 编辑 + {/if} - {if auth("$classuri/apply")} - | - 授权 - {/if} + {if auth("$classuri/apply")} + | + 授权 + {/if} - {if $vo.status eq 1 and auth("$classuri/forbid")} - | - 禁用 - {elseif auth("$classuri/resume")} - | - 启用 - {/if} + {if $vo.status eq 1 and auth("$classuri/forbid")} + | + 禁用 + {elseif auth("$classuri/resume")} + | + 启用 + {/if} - {if auth("$classuri/del")} - | - 删除 - {/if} + {if auth("$classuri/del")} + | + 删除 + {/if} -
{if isset($page)}

{$page}

{/if} - {else} -

暂时无记录

{/if}
{/block} \ No newline at end of file diff --git a/application/admin/view/log.index.html b/application/admin/view/log.index.html index 9b48798a5..a18e3ab66 100644 --- a/application/admin/view/log.index.html +++ b/application/admin/view/log.index.html @@ -3,7 +3,8 @@ {block name="button"}
{if auth("$classuri/del")} - {/if} @@ -13,77 +14,78 @@ {block name="content"} -