mirror of https://gitee.com/karson/fastadmin.git
parent
58edcba995
commit
bcb48fcfed
|
|
@ -117,7 +117,7 @@ class Backend extends Controller
|
||||||
if (!$this->auth->match($this->noNeedRight))
|
if (!$this->auth->match($this->noNeedRight))
|
||||||
{
|
{
|
||||||
// 判断控制器和方法判断是否有对应权限
|
// 判断控制器和方法判断是否有对应权限
|
||||||
$path = $this->request->path();
|
$path = str_replace('.', '/', $this->request->path());
|
||||||
$path = substr($path, 0, 1) == '/' ? $path : '/' . $path;
|
$path = substr($path, 0, 1) == '/' ? $path : '/' . $path;
|
||||||
if (!$this->auth->check($path))
|
if (!$this->auth->check($path))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ define(['jquery', 'bootstrap', 'backend', 'toastr', 'upload', 'validator'], func
|
||||||
}
|
}
|
||||||
Toastr.success(msg ? msg : __('Operation completed'));
|
Toastr.success(msg ? msg : __('Operation completed'));
|
||||||
} else {
|
} else {
|
||||||
if (typeof data.token !== 'undefined') {
|
if (data && typeof data === 'object' && typeof data.token !== 'undefined') {
|
||||||
$("input[name='__token__']").val(data.token);
|
$("input[name='__token__']").val(data.token);
|
||||||
}
|
}
|
||||||
Toastr.error(msg ? msg : __('Operation failed'));
|
Toastr.error(msg ? msg : __('Operation failed'));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue