Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
lightCMS
提交
2ad52fba
L
lightCMS
项目概览
OpenDocCN
/
lightCMS
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lightCMS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2ad52fba
编写于
12月 06, 2019
作者:
E
eddy8
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: value compare
上级
ba0c7995
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
18 addition
and
18 deletion
+18
-18
app/Http/Controllers/Admin/Auth/LoginController.php
app/Http/Controllers/Admin/Auth/LoginController.php
+1
-1
app/Http/Controllers/Admin/MenuController.php
app/Http/Controllers/Admin/MenuController.php
+1
-1
app/Http/Controllers/Front/CommentController.php
app/Http/Controllers/Front/CommentController.php
+1
-1
app/Http/Controllers/Front/UserController.php
app/Http/Controllers/Front/UserController.php
+1
-1
app/Repository/Admin/MenuRepository.php
app/Repository/Admin/MenuRepository.php
+1
-1
resources/views/admin/base.blade.php
resources/views/admin/base.blade.php
+3
-3
resources/views/admin/entity/add.blade.php
resources/views/admin/entity/add.blade.php
+6
-6
resources/views/admin/entity/index.blade.php
resources/views/admin/entity/index.blade.php
+1
-1
resources/views/admin/entityField/index.blade.php
resources/views/admin/entityField/index.blade.php
+2
-2
resources/views/admin/menu/index.blade.php
resources/views/admin/menu/index.blade.php
+1
-1
未找到文件。
app/Http/Controllers/Admin/Auth/LoginController.php
浏览文件 @
2ad52fba
...
...
@@ -66,7 +66,7 @@ class LoginController extends Controller
// 检查用户是否已被禁用
$user
=
$this
->
guard
()
->
getProvider
()
->
retrieveByCredentials
(
$this
->
credentials
(
$request
));
if
(
$user
&&
$user
->
status
==
=
AdminUser
::
STATUS_DISABLE
)
{
if
(
$user
&&
$user
->
status
==
AdminUser
::
STATUS_DISABLE
)
{
return
[
'code'
=>
1
,
'msg'
=>
'用户被禁用'
...
...
app/Http/Controllers/Admin/MenuController.php
浏览文件 @
2ad52fba
...
...
@@ -223,7 +223,7 @@ class MenuController extends Controller
try
{
$model
=
MenuRepository
::
exist
(
$k
);
if
(
$model
)
{
if
(
$model
->
is_lock_name
==
=
Menu
::
UNLOCK_NAME
&&
if
(
$model
->
is_lock_name
==
Menu
::
UNLOCK_NAME
&&
(
$model
->
name
!=
$data
[
'name'
]
||
$model
->
group
!=
$data
[
'group'
]))
{
unset
(
$data
[
'status'
]);
MenuRepository
::
update
(
$model
->
id
,
$data
);
...
...
app/Http/Controllers/Front/CommentController.php
浏览文件 @
2ad52fba
...
...
@@ -59,7 +59,7 @@ class CommentController extends BaseController
}
try
{
$rid
=
$pid
===
0
?
$pid
:
(
$parentComment
->
rid
==
=
0
?
$parentComment
->
id
:
$parentComment
->
rid
);
$rid
=
$pid
===
0
?
$pid
:
(
$parentComment
->
rid
==
0
?
$parentComment
->
id
:
$parentComment
->
rid
);
\
App\Repository\Admin\CommentRepository
::
add
([
'entity_id'
=>
$entityId
,
'content_id'
=>
$contentId
,
...
...
app/Http/Controllers/Front/UserController.php
浏览文件 @
2ad52fba
...
...
@@ -68,7 +68,7 @@ class UserController extends BaseController
// 检查用户是否已被禁用
$user
=
$this
->
guard
()
->
getProvider
()
->
retrieveByCredentials
(
$this
->
credentials
(
$request
));
if
(
$user
&&
$user
->
status
==
=
User
::
STATUS_DISABLE
)
{
if
(
$user
&&
$user
->
status
==
User
::
STATUS_DISABLE
)
{
return
[
'code'
=>
1
,
'msg'
=>
'用户被禁用'
...
...
app/Repository/Admin/MenuRepository.php
浏览文件 @
2ad52fba
...
...
@@ -144,7 +144,7 @@ class MenuRepository
$rootId
=
current
(
$menu
[
'path'
]);
foreach
(
self
::
getTree
()
as
$v
)
{
if
(
$v
[
'id'
]
==
=
$rootId
)
{
if
(
$v
[
'id'
]
==
$rootId
)
{
return
$v
;
}
}
...
...
resources/views/admin/base.blade.php
浏览文件 @
2ad52fba
...
...
@@ -48,7 +48,7 @@
@if($k != '')
<li
class=
"layui-nav-item layui-nav-itemed"
>
@foreach($menu as $sub)
@if(
$sub['status']
=== App\Model\Admin\Menu::STATUS_ENABLE
&&
($isSuperAdmin || $user->can($sub['name'])))
@if(
intval($sub['status'])
=== App\Model\Admin\Menu::STATUS_ENABLE
&&
($isSuperAdmin || $user->can($sub['name'])))
<a
class=
""
href=
"javascript:;"
>
{{ $k }}
</a>
@break
@endif
...
...
@@ -56,7 +56,7 @@
<dl
class=
"layui-nav-child"
>
@foreach($menu as $sub)
@if(
$sub['status']
=== App\Model\Admin\Menu::STATUS_ENABLE
&&
($isSuperAdmin || $user->can($sub['name'])))
@if(
intval($sub['status'])
=== App\Model\Admin\Menu::STATUS_ENABLE
&&
($isSuperAdmin || $user->can($sub['name'])))
<dd
@
if
($
sub
['
route
'
] =
=
$
light_cur_route
)
class=
"layui-this"
@
endif
><a
href=
"{{ $sub['url'] }}"
>
{{ $sub['name'] }}
</a></dd>
@endif
@endforeach
...
...
@@ -70,7 +70,7 @@
<a
class=
""
href=
"javascript:;"
>
系统菜单
</a>
<dl
class=
"layui-nav-child"
>
@foreach($autoMenu as $v)
<dd
@
if
(
isset
($
entity
)
&&
$
v
['
id
'
] =
=
=
intval
($
entity
))
class=
"layui-this"
@
endif
><a
href=
"{{ $v['url'] }}"
>
{{ $v['name'] }}
</a></dd>
<dd
@
if
(
isset
($
entity
)
&&
$
v
['
id
'
] =
=
intval
($
entity
))
class=
"layui-this"
@
endif
><a
href=
"{{ $v['url'] }}"
>
{{ $v['name'] }}
</a></dd>
@endforeach
</dl>
</li>
...
...
resources/views/admin/entity/add.blade.php
浏览文件 @
2ad52fba
...
...
@@ -38,24 +38,24 @@
<
div
class
=
"layui-form-item"
>
<
label
class
=
"layui-form-label"
>
内部模型
</
label
>
<
div
class
=
"layui-input-inline"
>
<
input
type
=
"radio"
name
=
"is_internal"
value
=
"1"
title
=
"是"
@
if
(
!
isset
(
$model
)
||
isset
(
$model
)
&&
$model
->
is_internal
==
=
App\Model\Admin\Entity
::
INTERNAL_YES
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"is_internal"
value
=
"0"
title
=
"否"
@
if
(
isset
(
$model
)
&&
$model
->
is_internal
==
=
App\Model\Admin\Entity
::
INTERNAL_NO
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"is_internal"
value
=
"1"
title
=
"是"
@
if
(
!
isset
(
$model
)
||
isset
(
$model
)
&&
$model
->
is_internal
==
App\Model\Admin\Entity
::
INTERNAL_YES
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"is_internal"
value
=
"0"
title
=
"否"
@
if
(
isset
(
$model
)
&&
$model
->
is_internal
==
App\Model\Admin\Entity
::
INTERNAL_NO
)
checked
@
endif
>
</
div
>
<
div
class
=
"layui-form-mid layui-word-aux"
>
内部模型前台不可直接访问
</
div
>
</
div
>
<
div
class
=
"layui-form-item"
>
<
label
class
=
"layui-form-label"
>
列表显示
</
label
>
<
div
class
=
"layui-input-inline"
>
<
input
type
=
"radio"
name
=
"is_show_content_manage"
value
=
"1"
title
=
"是"
@
if
(
!
isset
(
$model
)
||
isset
(
$model
)
&&
$model
->
is_show_content_manage
==
=
App\Model\Admin\Entity
::
CONTENT_MANAGE_YES
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"is_show_content_manage"
value
=
"0"
title
=
"否"
@
if
(
isset
(
$model
)
&&
$model
->
is_show_content_manage
==
=
App\Model\Admin\Entity
::
CONTENT_MANAGE_NO
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"is_show_content_manage"
value
=
"1"
title
=
"是"
@
if
(
!
isset
(
$model
)
||
isset
(
$model
)
&&
$model
->
is_show_content_manage
==
App\Model\Admin\Entity
::
CONTENT_MANAGE_YES
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"is_show_content_manage"
value
=
"0"
title
=
"否"
@
if
(
isset
(
$model
)
&&
$model
->
is_show_content_manage
==
App\Model\Admin\Entity
::
CONTENT_MANAGE_NO
)
checked
@
endif
>
</
div
>
<
div
class
=
"layui-form-mid layui-word-aux"
>
是否显示在内容管理列表中
</
div
>
</
div
>
<
div
class
=
"layui-form-item"
>
<
label
class
=
"layui-form-label"
>
评论
</
label
>
<
div
class
=
"layui-input-block"
>
<
input
type
=
"radio"
name
=
"enable_comment"
value
=
"1"
title
=
"启用"
@
if
(
!
isset
(
$model
)
||
isset
(
$model
)
&&
$model
->
enable_comment
==
=
App\Model\Admin\Entity
::
COMMENT_ENABLE
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"enable_comment"
value
=
"0"
title
=
"禁用"
@
if
(
isset
(
$model
)
&&
$model
->
enable_comment
==
=
App\Model\Admin\Entity
::
COMMENT_DISABLE
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"enable_comment"
value
=
"1"
title
=
"启用"
@
if
(
!
isset
(
$model
)
||
isset
(
$model
)
&&
$model
->
enable_comment
==
App\Model\Admin\Entity
::
COMMENT_ENABLE
)
checked
@
endif
>
<
input
type
=
"radio"
name
=
"enable_comment"
value
=
"0"
title
=
"禁用"
@
if
(
isset
(
$model
)
&&
$model
->
enable_comment
==
App\Model\Admin\Entity
::
COMMENT_DISABLE
)
checked
@
endif
>
</
div
>
</
div
>
<
div
class
=
"layui-form-item"
>
...
...
resources/views/admin/entity/index.blade.php
浏览文件 @
2ad52fba
...
...
@@ -21,7 +21,7 @@
@
endsection
<
script
type
=
"text/html"
id
=
"action"
>
<
a
href
=
"<% d.editUrl %>"
class
=
"layui-table-link"
title
=
"编辑"
><
i
class
=
"layui-icon layui-icon-edit"
></
i
></
a
>
<%
# if(d.enable_comment ==
=
{{ App\Model\Admin\Entity::COMMENT_ENABLE }}){ %> <a href="<% d.commentListUrl %>" class="layui-table-link" title="评论列表" style="margin-left: 5px"><i class="layui-icon layui-icon-reply-fill"></i></a> <%# } %>
<%
# if(d.enable_comment == {{ App\Model\Admin\Entity::COMMENT_ENABLE }}){ %> <a href="<% d.commentListUrl %>" class="layui-table-link" title="评论列表" style="margin-left: 5px"><i class="layui-icon layui-icon-reply-fill"></i></a> <%# } %>
<
a
href
=
"javascript:;"
class
=
"layui-table-link"
title
=
"删除"
style
=
"margin-left: 10px"
onclick
=
"deleteEntity('<% d.deleteUrl %>')"
><
i
class
=
"layui-icon layui-icon-delete"
></
i
></
a
>
<
a
href
=
"<% d.fieldUrl %>"
class
=
"layui-table-link"
title
=
"字段管理"
style
=
"margin-left: 5px"
>
字段管理
</
a
>
<
a
href
=
"<% d.contentUrl %>"
class
=
"layui-table-link"
title
=
"字段管理"
style
=
"margin-left: 5px"
>
内容管理
</
a
>
...
...
resources/views/admin/entityField/index.blade.php
浏览文件 @
2ad52fba
...
...
@@ -42,14 +42,14 @@
</
script
>
<
script
type
=
"text/html"
id
=
"isShowTemplet"
>
<
input
data
-
id
=
"<% d.id %>"
type
=
"checkbox"
name
=
"is_show"
lay
-
skin
=
"switch"
lay
-
text
=
"是|否"
<%
# if (d.is_show ==
=
1) { %>
<%
# if (d.is_show == 1) { %>
checked
<%
# } %>
>
</
script
>
<
script
type
=
"text/html"
id
=
"isShowInlineTemplet"
>
<
input
data
-
id
=
"<% d.id %>"
type
=
"checkbox"
name
=
"is_show_inline"
lay
-
skin
=
"switch"
lay
-
text
=
"是|否"
<%
# if (d.is_show_inline ==
=
1) { %>
<%
# if (d.is_show_inline == 1) { %>
checked
<%
# } %>
>
...
...
resources/views/admin/menu/index.blade.php
浏览文件 @
2ad52fba
...
...
@@ -91,7 +91,7 @@
</
script
>
<
script
type
=
"text/html"
id
=
"statusTemplet"
>
<
input
type
=
"checkbox"
name
=
"status"
lay
-
skin
=
"switch"
lay
-
text
=
"是|否"
<%
# if (d.status ==
=
1) { %>
<%
# if (d.status == 1) { %>
checked
<%
# } %>
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录