Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
314fbefc
Commit
314fbefc
authored
Jul 02, 2020
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code format
parent
f268741d
Pipeline
#9767
passed with stages
in 32 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
1165 deletions
+0
-1165
manager_add.blade.php
resources/views/admin/manager/manager_add.blade.php
+0
-147
manager_edit.blade.php
resources/views/admin/manager/manager_edit.blade.php
+0
-111
manager_list.blade.php
resources/views/admin/manager/manager_list.blade.php
+0
-168
role.blade.php
resources/views/admin/manager/role.blade.php
+0
-251
role_add.blade.php
resources/views/admin/manager/role_add.blade.php
+0
-231
role_edit.blade.php
resources/views/admin/manager/role_edit.blade.php
+0
-254
media_list.blade.php
resources/views/admin/media/media_list.blade.php
+0
-3
No files found.
resources/views/admin/manager/manager_add.blade.php
deleted
100644 → 0
View file @
f268741d
<!DOCTYPE html>
<html>
<head>
@include('admin.common_bak.header')
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div
class=
"x-body"
>
<form
class=
"layui-form"
>
<div
class=
"layui-form-item"
>
<label
for=
"username"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
登录名
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"name"
name=
"name"
required=
""
lay-verify=
"required"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<span
class=
"x-red"
>
*
</span>
将会成为您唯一的登入名
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"phone"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
手机
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"phone"
name=
"mobile"
required=
""
lay-verify=
"phone"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<span
class=
"x-red"
>
*
</span>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"L_email"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
邮箱
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"L_email"
name=
"email"
required=
""
lay-verify=
"email"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<span
class=
"x-red"
>
*
</span>
</div>
</div>
@if($roles[0]['slug'] == 'enter')
<div
class=
"layui-form-item"
>
<label
for=
"L_hook"
class=
"layui-form-label"
>
<span
class=
"x-red"
></span>
回调地址
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"L_hook"
name=
"hook"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
@endif
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
class=
"x-red"
>
*
</span>
角色
</label>
<div
class=
"layui-input-block"
>
@foreach($roles as $v)
<input
type=
"radio"
name=
"role_id"
lay-skin=
"primary"
value=
"{{$v['id']}}"
title=
"{{$v['name']}}"
checked
>
@endforeach
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"L_pass"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
密码
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"password"
id=
"L_pass"
name=
"password"
required=
""
lay-verify=
"pass"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
6到16个字符
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"L_repass"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
确认密码
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"password"
id=
"L_repass"
name=
"repass"
required=
""
lay-verify=
"repass"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"L_repass"
class=
"layui-form-label"
>
</label>
<button
class=
"layui-btn"
lay-filter=
"add"
lay-submit=
""
>
增加
</button>
</div>
</form>
</div>
<script>
layui
.
use
([
'form'
,
'layer'
],
function
(){
$
=
layui
.
jquery
;
var
form
=
layui
.
form
,
layer
=
layui
.
layer
;
//自定义验证规则
form
.
verify
({
nikename
:
function
(
value
){
if
(
value
.
length
<
5
){
return
'昵称至少得5个字符啊'
;
}
}
,
pass
:
[
/
(
.+
){6,12}
$/
,
'密码必须6到12位'
]
,
repass
:
function
(
value
){
if
(
$
(
'#L_pass'
).
val
()
!=
$
(
'#L_repass'
).
val
()){
return
'两次密码不一致'
;
}
}
});
//监听提交
form
.
on
(
'submit(add)'
,
function
(
data
){
var
aa
=
layer
.
load
(
1
);
//发异步,把数据提交给php
var
formdata
=
new
FormData
(
data
.
form
);
$
(
'#sub'
).
attr
(
'disabled'
,
'disabled'
).
css
({
'background'
:
'#d4d4d4'
});
fetch_response
(
'POST'
,
'/web/member'
,
formdata
).
then
(
function
(
res
){
if
(
res
.
code
==
200
){
layer
.
close
(
aa
);
layer
.
alert
(
"增加成功"
,
{
icon
:
6
},
function
()
{
window
.
parent
.
location
.
reload
();
//刷新父页面
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
// 获得frame索引
parent
.
layer
.
close
(
index
);
//关闭当前frame
});
}
else
{
layer
.
close
(
aa
);
layer
.
msg
(
res
.
msg
,{
icon
:
5
});
$
(
'#sub'
).
removeAttr
(
'disabled'
).
css
(
'background'
,
'#009688'
);
}
});
return
false
;
});
});
</script>
</body>
</html>
\ No newline at end of file
resources/views/admin/manager/manager_edit.blade.php
deleted
100644 → 0
View file @
f268741d
<!DOCTYPE html>
<html>
<head>
@include('admin.common_bak.header')
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div
class=
"x-body"
>
<form
class=
"layui-form"
>
<input
type=
"hidden"
name=
"id"
value=
"{{$manager['id']}}"
>
<div
class=
"layui-form-item"
>
<label
for=
"username"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
登录名
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"name"
name=
"name"
value=
"{{$manager['name']}}"
required=
""
lay-verify=
"required"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<span
class=
"x-red"
>
*
</span>
将会成为您唯一的登入名
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"phone"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
手机
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"phone"
name=
"mobile"
value=
"{{$manager['mobile']}}"
required=
""
lay-verify=
"phone"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<span
class=
"x-red"
>
*
</span>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"L_email"
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
邮箱
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"L_email"
name=
"email"
value=
"{{$manager['email']}}"
required=
""
lay-verify=
"email"
autocomplete=
"off"
class=
"layui-input"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
<span
class=
"x-red"
>
*
</span>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><span
class=
"x-red"
>
*
</span>
角色
</label>
<div
class=
"layui-input-block"
>
@foreach($roles as $v)
<input
type=
"radio"
name=
"role_id"
lay-skin=
"primary"
value=
"{{$v['id']}}"
title=
"{{$v['name']}}"
@
if
(
in_array
($
v
['
id
'],$
manager
['
role
']))
checked
@
endif
>
@endforeach
</div>
</div>
<div
class=
"layui-form-item"
>
<label
for=
"L_repass"
class=
"layui-form-label"
>
</label>
<button
class=
"layui-btn"
id=
"sub"
lay-filter=
"add"
lay-submit=
""
>
增加
</button>
</div>
</form>
</div>
<script>
layui
.
use
([
'form'
,
'layer'
],
function
(){
$
=
layui
.
jquery
;
var
form
=
layui
.
form
,
layer
=
layui
.
layer
;
//自定义验证规则
form
.
verify
({
nikename
:
function
(
value
){
if
(
value
.
length
<
5
){
return
'昵称至少得5个字符啊'
;
}
}
});
//监听提交
form
.
on
(
'submit(add)'
,
function
(
data
){
var
aa
=
layer
.
load
(
1
);
//发异步,把数据提交给php
var
formdata
=
new
FormData
(
data
.
form
);
$
(
'#sub'
).
attr
(
'disabled'
,
'disabled'
).
css
({
'background'
:
'#d4d4d4'
});
fetch_response
(
'POST'
,
"/web/manager_edit/{{$manager['id']}}"
,
formdata
).
then
(
function
(
res
){
if
(
res
.
code
==
200
){
layer
.
close
(
aa
);
layer
.
alert
(
"修改成功"
,
{
icon
:
6
},
function
()
{
window
.
parent
.
location
.
reload
();
//刷新父页面
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
// 获得frame索引
parent
.
layer
.
close
(
index
);
//关闭当前frame
});
}
else
{
layer
.
close
(
aa
);
layer
.
msg
(
res
.
msg
,{
icon
:
5
});
$
(
'#sub'
).
removeAttr
(
'disabled'
).
css
(
'background'
,
'#009688'
);
}
});
return
false
;
});
});
</script>
</body>
</html>
\ No newline at end of file
resources/views/admin/manager/manager_list.blade.php
deleted
100644 → 0
View file @
f268741d
<!DOCTYPE html>
<html>
<head>
@include('admin.common_bak.header')
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<meta
name=
"csrf-token"
content=
"{{ csrf_token() }}"
/>
</head>
<body>
<div
class=
"x-nav"
>
<span
class=
"layui-breadcrumb"
>
<a
href=
""
>
首页
</a>
<a
href=
""
>
演示
</a>
<a>
<cite>
导航元素
</cite></a>
</span>
<a
class=
"layui-btn layui-btn-small"
style=
"line-height:1.6em;margin-top:3px;float:right"
href=
"javascript:location.replace(location.href);"
title=
"刷新"
>
<i
class=
"layui-icon"
style=
"line-height:30px"
>
ဂ
</i></a>
</div>
<div
class=
"x-body"
>
<div
class=
"layui-row"
>
<form
class=
"layui-form layui-col-md12 x-so"
>
<input
class=
"layui-input"
placeholder=
"开始日"
name=
"start"
id=
"start"
>
<input
class=
"layui-input"
placeholder=
"截止日"
name=
"end"
id=
"end"
>
<input
type=
"text"
name=
"username"
placeholder=
"请输入用户名"
autocomplete=
"off"
class=
"layui-input"
>
<button
class=
"layui-btn"
lay-submit=
""
lay-filter=
"sreach"
><i
class=
"layui-icon"
>

</i></button>
</form>
</div>
<xblock>
<button
class=
"layui-btn"
onclick=
"x_admin_show('添加用户','/web/manager_add')"
><i
class=
"layui-icon"
>
</i>
添加
</button>
<span
class=
"x-right"
style=
"line-height:40px"
>
共有数据:88 条
</span>
</xblock>
<table
class=
"layui-table"
>
<thead>
<tr>
<th>
ID
</th>
<th>
登录名
</th>
<th>
手机
</th>
<th>
邮箱
</th>
<th>
角色
</th>
<th>
加入时间
</th>
<th>
状态
</th>
<th>
操作
</th>
</thead>
<tbody>
@foreach($managers as $v)
<tr>
<td>
{{$v['id']}}
</td>
<td>
{{$v['name']}}
</td>
<td>
{{$v['mobile']}}
</td>
<td>
{{$v['email']}}
</td>
<td>
{{$v['roles'][0]['name']}}
</td>
<td>
{{$v['created_at']}}
</td>
<td
class=
"td-status"
>
@if( $v['status'] == 1 )
<span
class=
"layui-btn layui-btn-normal layui-btn-mini"
>
已启用
</span>
@else
<span
class=
"layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled"
>
已停用
</span>
@endif
<td
class=
"td-manage"
>
<a
onclick=
"member_stop(this,{{$v['id']}})"
href=
"javascript:;"
title=
"{{$STATUS[$v['status']]}}"
status=
"{{$v['status']}}"
>
<i
class=
"layui-icon"
>
@if( $v['status'] == 1 )

@else

@endif
</i>
</a>
<a
title=
"编辑"
onclick=
"x_admin_show('编辑','/web/manager_edit/{{$v["
id
"]}}')"
href=
"javascript:;"
>
<i
class=
"layui-icon"
>

</i>
</a>
<a
title=
"删除"
onclick=
"member_del(this,'要删除的id')"
href=
"javascript:;"
>
<i
class=
"layui-icon"
>

</i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<!-- <div class="page">
<div>
<a class="prev" href=""><<</a>
<a class="num" href="">1</a>
<span class="current">2</span>
<a class="num" href="">3</a>
<a class="num" href="">489</a>
<a class="next" href="">>></a>
</div>
</div> -->
</div>
<script>
layui
.
use
(
'laydate'
,
function
(){
var
laydate
=
layui
.
laydate
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#start'
//指定元素
});
//执行一个laydate实例
laydate
.
render
({
elem
:
'#end'
//指定元素
});
});
/*用户-停用*/
function
member_stop
(
obj
,
id
){
var
title
=
$
(
obj
).
attr
(
'title'
);
layer
.
confirm
(
'确认要'
+
title
+
'吗?'
,
function
(
index
){
if
(
title
==
'停用'
){
//发异步把用户状态进行更改
$
.
post
(
'/web/member/disable'
,{
'id'
:
id
,
'status'
:
2
,
'_token'
:
"{{csrf_token()}}"
},
function
(
res
){
if
(
res
.
code
==
200
){
$
(
obj
).
attr
(
'title'
,
'启用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
addClass
(
'layui-btn-disabled'
).
html
(
'已停用'
);
layer
.
msg
(
'已停用!'
,{
icon
:
5
,
time
:
1000
});
}
else
{
layer
.
msg
(
res
.
msg
);
}
},
"json"
);
}
else
{
$
.
post
(
'/web/member/disable'
,{
'id'
:
id
,
'status'
:
1
,
'_token'
:
"{{csrf_token()}}"
},
function
(
res
){
if
(
res
.
code
==
200
){
$
(
obj
).
attr
(
'title'
,
'停用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
removeClass
(
'layui-btn-disabled'
).
html
(
'已启用'
);
layer
.
msg
(
'已启用!'
,{
icon
:
6
,
time
:
1000
});
}
else
{
layer
.
msg
(
res
.
msg
);
}
},
"json"
);
}
});
}
/*用户-删除*/
function
member_del
(
obj
,
id
){
layer
.
confirm
(
'确认要删除吗?'
,
function
(
index
){
//发异步删除数据
$
(
obj
).
parents
(
"tr"
).
remove
();
layer
.
msg
(
'已删除!'
,{
icon
:
1
,
time
:
1000
});
});
}
function
delAll
(
argument
)
{
var
data
=
tableCheck
.
getData
();
layer
.
confirm
(
'确认要删除吗?'
+
data
,
function
(
index
){
//捉到所有被选中的,发异步进行删除
layer
.
msg
(
'删除成功'
,
{
icon
:
1
});
$
(
".layui-form-checked"
).
not
(
'.header'
).
parents
(
'tr'
).
remove
();
});
}
</script>
</body>
</html>
\ No newline at end of file
resources/views/admin/manager/role.blade.php
deleted
100644 → 0
View file @
f268741d
<!DOCTYPE html>
<html>
@include('admin.common_bak.commonMedia')
<body>
<!--====================================================
MAIN NAVBAR
======================================================-->
@include('admin.common_bak.header')
<!--====================================================
PAGE CONTENT
======================================================-->
<div
class=
"page-content d-flex align-items-stretch"
>
<!--***** SIDE NAVBAR *****-->
@include('admin.common_bak.left')
<div
class=
"content-inner chart-cont"
>
<div
class=
"card form"
>
<div
class=
"card-header"
>
<h3><i
class=
"fa fa-user-circle"
></i>
管理员列表
</h3>
</div>
<br>
<!--***** CONTENT *****-->
<div
class=
"row ml20"
>
<xblock>
<button
class=
"btn btn-primary"
onclick=
"x_admin_show('/web/role_add')"
>
添加
</button>
<span
class=
"x-right"
>
共有数据:{{$count}} 条
</span>
</xblock>
<table
class=
"table table-hover"
>
<thead>
<tr>
<th>
ID
</th>
<th
style=
"width: 70px;"
>
角色名
</th>
<th>
拥有权限规则
</th>
<th
style=
"width: 70px;"
>
描述
</th>
<th
style=
"width: 70px;"
>
操作
</th>
</thead>
<tbody>
@if(count($roles)>0)
@foreach($roles as $key=> $v)
<tr
class=
"
<?php
if
(
$key
%
2
==
0
)
echo
'table-success'
;
?>
"
>
<td>
{{$v['id']}}
</td>
<td>
{{$v['name']}}
</td>
<td>
@foreach($v['bs'] as $per)
{{$per['name']}},
@endforeach
</td>
<td>
{{$v['description']}}
</td>
<td
class=
"td-manage"
>
<a
title=
"编辑"
href=
"/web/role_edit/{{$v["
id
"]}}"
>
<i
class=
"iconfont"
>

</i>
</a>
{{--
<a
title=
"删除"
onclick=
"member_del(this,'{{$v["
id
"]}}')"
href=
"javascript:;"
>
--}}
{{--
<i
class=
"layui-icon"
>

</i>
--}}
{{--
</a>
--}}
</td>
</tr>
@endforeach
@else
<tr>
<td
colspan=
"6"
style=
"text-align:center"
>
暂无数据
</td>
</tr>
@endif
</tbody>
</table>
{{--
<div
class=
"page"
>
--}}
{{--
<div>
--}}
{{--{{$roles->appends(['start_time'=>$start_time,'end_time'=>$end_time,'name'=>$name])->links()}}--}}
{{--
</div>
--}}
{{--
</div>
--}}
</div>
</div>
</div>
</div>
<!--Global Javascript -->
@include('admin.common_bak.foot')
<!--Core Javascript -->
<link
rel=
"stylesheet"
href=
"{{ asset('xadmin/extra/jqueryConfirm/css/jquery-confirm.css')}}"
>
<script
src=
"{{ asset('xadmin/extra/jqueryConfirm/js/jquery-confirm.min.js')}}"
></script>
<script
src=
"{{ asset('xadmin/extra/toast/js/toast.js')}}"
></script>
{{--
<link
rel=
"stylesheet"
href=
"{{ asset('xadmin/extra/toast/css/toast.css')}}"
>
--}}
<script
src=
"{{ asset('xadmin/js/jquery.validate.js')}}"
></script>
<script
type=
"text/javascript"
>
function
x_admin_show
(
url
){
window
.
location
.
href
=
url
;
// window.open(url);
}
function
member_del
(
row
,
id
){
$
.
confirm
({
// confirmButtonClass: 'btn-info',
// cancelButtonClass: 'btn-info',
cancelButtonClass
:
'btn-info'
,
confirmButtonClass
:
'btn-danger'
,
confirm
:
function
()
{
fetch_response
(
'DELETE'
,
"/web/member/"
+
id
).
then
(
function
(
res
)
{
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
setTimeout
(
function
()
{
window
.
location
.
href
=
'/web/member'
;
},
2000
)
})
},
cancel
:
function
()
{
$
.
alert
(
'cancel triggered!'
);
}
});
}
function
member_stop
(
obj
,
id
){
var
title
=
$
(
obj
).
attr
(
'title'
);
var
opts
=
new
FormData
();
opts
.
append
(
'_token'
,
"{{csrf_token()}}"
)
$
.
confirm
({
// confirmButtonClass: 'btn-info',
// cancelButtonClass: 'btn-info',
cancelButtonClass
:
'btn-info'
,
confirmButtonClass
:
'btn-danger'
,
content
:
'确认要'
+
title
+
'吗?'
,
confirmButton
:
'确认'
,
cancelButton
:
'取消'
,
confirm
:
function
()
{
if
(
title
==
'停用'
){
//发异步把用户状态进行更改
opts
.
append
(
'id'
,
id
);
opts
.
append
(
'status'
,
0
);
fetch_response
(
'POST'
,
'/web/member/disable'
,
opts
).
then
(
function
(
res
){
if
(
res
.
code
==
200
){
$
(
obj
).
attr
(
'title'
,
'启用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
addClass
(
'layui-btn-disabled'
).
html
(
'已停用'
);
// layer.msg('已停用!',{icon: 5,time:1000},function(){
// window.location.reload();
// });
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
'已停用'
,
duration
:
1000
,
top
:
'50%'
});
setTimeout
(
function
()
{
window
.
location
.
href
=
'/web/member'
;
},
2000
)
}
else
{
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
}
});
}
else
{
opts
.
append
(
'id'
,
id
);
opts
.
append
(
'status'
,
1
);
fetch_response
(
'POST'
,
'/web/member/disable'
,
opts
).
then
(
function
(
res
){
if
(
res
.
code
==
200
){
$
(
obj
).
attr
(
'title'
,
'停用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
removeClass
(
'layui-btn-disabled'
).
html
(
'已启用'
);
// layer.msg('已启用!',{icon: 6,time:1000},function(){
// window.location.reload();
// });
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
'已启用'
,
duration
:
1000
,
top
:
'50%'
});
setTimeout
(
function
()
{
window
.
location
.
href
=
'/web/member'
;
},
2000
)
}
else
{
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
}
});
}
// fetch_response('DELETE',"/web/member/"+id).then(function (res) {
// $('body').toast({
// position:'fixed',
// content:res.msg,
// duration:1000,
// top:'50%'
// });
// setTimeout(function () {
// window.location.href='/web/member';
// },2000)
// })
},
// cancel: function () {
// $.alert('cancel triggered!');
// }
});
}
</script>
</body>
</html>
\ No newline at end of file
resources/views/admin/manager/role_add.blade.php
deleted
100644 → 0
View file @
f268741d
<!DOCTYPE html>
<html>
<head>
@include('admin.common_bak.commonMedia')
<!-- Core stylesheets -->
<link
rel=
"stylesheet"
href=
"{{ asset('xadmin/css/form.css')}}"
>
{{--
<link
rel=
"stylesheet"
href=
"http://local.www.offcncloud.com/css/xadmin.css"
>
--}}
<style>
form
.cmxform
label
.error
,
label
.error
{
/* remove the next line when you have trouble in IE6 with labels in list */
color
:
red
;
font-style
:
italic
;
margin-top
:
11px
;
}
.col-form-label
{
margin-top
:
6px
;
}
.role-label
{
margin-left
:
20px
;
position
:
relative
;
}
</style>
</head>
<body>
<!--====================================================
MAIN NAVBAR
======================================================-->
@include('admin.common_bak.header')
<!--====================================================
PAGE CONTENT
======================================================-->
<div
class=
"page-content d-flex align-items-stretch"
>
<!--***** SIDE NAVBAR *****-->
@include('admin.common_bak.left')
<div
class=
"content-inner form-cont"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<!--***** FORM GROUP *****-->
<div
class=
"card form"
id=
"form5"
>
<div
class=
"card-header"
>
<h3>
编辑权限
</h3>
</div>
<br>
<form
id=
"newForm"
>
<input
type=
"hidden"
name=
"id"
value=
""
>
<input
type=
"hidden"
name=
"_token"
value=
"{{csrf_token()}}"
>
<div
class=
"row"
>
<div
class=
"col-md-6 role-label"
>
<div
class=
"form-group row"
>
<label
for=
"example-text-input"
class=
" col-form-label"
>
*角色名
</label>
<div
class=
"col-10"
>
<input
class=
"form-control"
type=
"text"
name=
"name"
value=
""
id=
"example-text-input"
>
</div>
</div>
</div>
<div
class=
"col-md-6 role-label"
>
<div
class=
"form-group row"
>
<label
for=
"slug"
class=
"col-form-label"
>
*英文简称
</label>
<div
class=
"col-10"
>
<input
type=
"text"
class=
"form-control"
id=
"slug"
name=
"slug"
value=
""
placeholder=
""
>
</div>
</div>
</div>
<div
class=
"col-md-12 role-label"
>
<div
class=
"form-group row"
>
<label
class=
"col-form-label"
>
拥有权限
</label>
<div
class=
"col-10"
>
<table
class=
"table table-bordered"
>
<tbody>
@foreach($rules as $v)
<tr>
<td>
<input
type=
"checkbox"
name=
"permission_id[]"
value=
"{{$v['id']}}"
lay-skin=
"primary"
title=
"{{$v['name']}}"
>
{{$v['name']}}
</td>
<td>
@if(count($v['son'])>1)
<div
class=
"layui-input-block"
>
@foreach($v['son'] as $son)
<input
name=
"permission_id[]"
lay-skin=
"primary"
type=
"checkbox"
title=
"{{$son['name']}}"
value=
"{{$son['id']}}"
>
{{$son['name']}}
@endforeach
</div>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"form-group row"
>
<label
for=
"icon"
class=
"col-form-label"
>
*描述
</label>
<div
class=
"col-10"
>
<textarea
placeholder=
"请输入内容"
id=
"desc"
name=
"description"
class=
"form-control"
rows=
"10"
style=
"width: 100%;"
></textarea>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<label
class=
"col-form-label"
>
</label>
<button
type=
"submit"
class=
"btn btn-primary"
onclick=
"role_edit();"
>
保存
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!--Global Javascript -->
@include('admin.common_bak.foot')
<script
src=
"{{ asset('xadmin/extra/toast/js/toast.js')}}"
></script>
<script
src=
"{{ asset('xadmin/js/jquery.validate.js')}}"
></script>
{{--
<link
rel=
"stylesheet"
href=
"{{ asset('xadmin/extra/toast/css/toast.css')}}"
>
--}}
<!--Core Javascript -->
<script
type=
"text/javascript"
>
function
role_edit
()
{
$
(
"#newForm"
).
validate
({
rules
:
{
name
:
{
required
:
true
,
minlength
:
2
},
password
:
{
required
:
true
,
minlength
:
5
},
confirm_password
:
{
required
:
true
,
minlength
:
5
,
equalTo
:
"#password"
},
email
:
{
required
:
true
,
email
:
true
},
},
messages
:
{
name
:
{
required
:
"Please enter a username"
,
minlength
:
"Your username must consist of at least 2 characters"
},
password
:
{
required
:
"Please provide a password"
,
minlength
:
"Your password must be at least 5 characters long"
},
confirm_password
:
{
required
:
"Please provide a password"
,
minlength
:
"Your password must be at least 5 characters long"
,
equalTo
:
"Please enter the same password as above"
},
email
:
"Please enter a valid email address"
,
},
submitHandler
:
function
(
form
)
{
var
form
=
document
.
querySelector
(
"#newForm"
);
var
formdata
=
new
FormData
(
form
);
fetch_response
(
'POST'
,
"/web/role_add"
,
formdata
).
then
(
function
(
res
)
{
if
(
res
.
code
==
200
)
{
//console.log('dsfsfsd')
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
setTimeout
(
function
()
{
window
.
location
.
href
=
'/web/role'
;
},
2000
)
}
else
{
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
}
});
}
});
}
</script>
</body>
</html>
resources/views/admin/manager/role_edit.blade.php
deleted
100644 → 0
View file @
f268741d
<!DOCTYPE html>
<html>
<head>
@include('admin.common_bak.commonMedia')
<!-- Core stylesheets -->
<link
rel=
"stylesheet"
href=
"{{ asset('xadmin/css/form.css')}}"
>
{{--
<link
rel=
"stylesheet"
href=
"http://local.www.offcncloud.com/css/xadmin.css"
>
--}}
<style>
form
.cmxform
label
.error
,
label
.error
{
/* remove the next line when you have trouble in IE6 with labels in list */
color
:
red
;
font-style
:
italic
;
margin-top
:
11px
;
}
.col-form-label
{
margin-top
:
6px
;
}
.role-label
{
margin-left
:
20px
;
position
:
relative
;
}
</style>
</head>
<body>
<!--====================================================
MAIN NAVBAR
======================================================-->
@include('admin.common_bak.header')
<!--====================================================
PAGE CONTENT
======================================================-->
<div
class=
"page-content d-flex align-items-stretch"
>
<!--***** SIDE NAVBAR *****-->
@include('admin.common_bak.left')
<div
class=
"content-inner form-cont"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<!--***** FORM GROUP *****-->
<div
class=
"card form"
id=
"form5"
>
<div
class=
"card-header"
>
<h3>
编辑权限
</h3>
</div>
<br>
<form
id=
"newForm"
>
<input
type=
"hidden"
name=
"id"
value=
"{{$role_info['id']}}"
>
<input
type=
"hidden"
name=
"_token"
value=
"{{csrf_token()}}"
>
<div
class=
"row"
>
<div
class=
"col-md-6 role-label"
>
<div
class=
"form-group row"
>
<label
for=
"example-text-input"
class=
" col-form-label"
>
*角色名
</label>
<div
class=
"col-10"
>
<input
class=
"form-control"
type=
"text"
name=
"name"
value=
"{{$role_info['name']}}"
id=
"example-text-input"
>
</div>
</div>
</div>
<div
class=
"col-md-6 role-label"
>
<div
class=
"form-group row"
>
<label
for=
"slug"
class=
"col-form-label"
>
*英文简称
</label>
<div
class=
"col-10"
>
<input
type=
"text"
class=
"form-control"
id=
"slug"
name=
"slug"
value=
"{{$role_info['slug']}}"
placeholder=
""
>
</div>
</div>
</div>
<div
class=
"col-md-12 role-label"
>
<div
class=
"form-group row"
>
<label
class=
"col-form-label"
>
拥有权限
</label>
<div
class=
"col-10"
>
<table
class=
"table table-bordered"
>
<tbody>
@foreach($rules as $v)
<tr>
<td>
<input
type=
"checkbox"
name=
"permission_id[]"
value=
"{{$v['id']}}"
lay-skin=
"primary"
title=
"{{$v['name']}}"
@
if
(
in_array
($
v
['
id
'],$
role_info
['
pers
']))
checked
@
endif
>
{{$v['name']}}
</td>
<td>
@if(count($v['son'])>1)
<div
class=
"layui-input-block"
>
@foreach($v['son'] as $son)
<input
name=
"permission_id[]"
lay-skin=
"primary"
type=
"checkbox"
title=
"{{$son['name']}}"
value=
"{{$son['id']}}"
@
if
(
in_array
($
son
['
id
'],$
role_info
['
pers
']))
checked
@
endif
>
{{$son['name']}}
@endforeach
</div>
@endif
</td>
</tr>
@endforeach
<tr>
<td>
关联类别
</td>
<td>
<select
class=
"form-control"
name=
"parent_id[]"
id=
"pid"
multiple
row=
"5"
>
<option
value=
"0"
>
请选择栏目
</option>
@foreach($categories as $key => $category)
@if(isset($category->childCag)
&&
!empty($category->childCag))
<option
@
if
(
in_array
($
category-
>
id,$mycatgs)) selected="true"; @endif value="{{$category->id}}" style="font-size: 18px;font-weight:bold;">{{$category->title}}
</option>
<optgroup
label=
" ├"
>
@foreach($category->childCag as $childCag)
<option
@
if
(
in_array
($
childCag
['
id
'],$
mycatgs
))
selected=
"true"
;
@
endif
value=
"{{$childCag['id']}}"
>
{{$childCag['title']}}
</option>
@endforeach
</optgroup>
@else
<option
@
if
(
in_array
($
category-
>
id,$mycatgs)) selected @endif value="{{$category->id}}">{{$category->title}}
</option>
@endif
@endforeach
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<div
class=
"form-group row"
>
<label
for=
"icon"
class=
"col-form-label"
>
*描述
</label>
<div
class=
"col-10"
>
<textarea
placeholder=
"请输入内容"
id=
"desc"
name=
"description"
class=
"form-control"
rows=
"10"
style=
"width: 100%;"
>
{{$role_info['description']}}
</textarea>
</div>
</div>
</div>
<div
class=
"col-md-12"
>
<label
class=
"col-form-label"
>
</label>
<button
type=
"submit"
class=
"btn btn-primary"
onclick=
"role_edit();"
>
保存
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!--Global Javascript -->
@include('admin.common_bak.foot')
<script
src=
"{{ asset('xadmin/extra/toast/js/toast.js')}}"
></script>
<script
src=
"{{ asset('xadmin/js/jquery.validate.js')}}"
></script>
{{--
<link
rel=
"stylesheet"
href=
"{{ asset('xadmin/extra/toast/css/toast.css')}}"
>
--}}
<!--Core Javascript -->
<script
type=
"text/javascript"
>
function
role_edit
()
{
$
(
"#newForm"
).
validate
({
rules
:
{
name
:
{
required
:
true
,
minlength
:
2
},
password
:
{
required
:
true
,
minlength
:
5
},
confirm_password
:
{
required
:
true
,
minlength
:
5
,
equalTo
:
"#password"
},
email
:
{
required
:
true
,
email
:
true
},
},
messages
:
{
name
:
{
required
:
"Please enter a username"
,
minlength
:
"Your username must consist of at least 2 characters"
},
password
:
{
required
:
"Please provide a password"
,
minlength
:
"Your password must be at least 5 characters long"
},
confirm_password
:
{
required
:
"Please provide a password"
,
minlength
:
"Your password must be at least 5 characters long"
,
equalTo
:
"Please enter the same password as above"
},
email
:
"Please enter a valid email address"
,
},
submitHandler
:
function
(
form
)
{
var
form
=
document
.
querySelector
(
"#newForm"
);
var
formdata
=
new
FormData
(
form
);
fetch_response
(
'POST'
,
"/web/role_edit/{{$role_info['id']}}"
,
formdata
).
then
(
function
(
res
)
{
if
(
res
.
code
==
200
)
{
//console.log('dsfsfsd')
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
setTimeout
(
function
()
{
window
.
location
.
href
=
'/web/role'
;
},
2000
)
}
else
{
$
(
'body'
).
toast
({
position
:
'fixed'
,
content
:
res
.
msg
,
duration
:
1000
,
top
:
'50%'
});
}
});
}
});
}
</script>
</body>
</html>
resources/views/admin/media/media_list.blade.php
View file @
314fbefc
...
...
@@ -242,9 +242,6 @@
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
removeClass
(
'layui-btn-disabled'
).
html
(
'已启用'
);
// layer.msg('已启用!',{icon: 6,time:1000},function(){
// window.location.reload();
// });
$
(
'body'
).
toast
({
position
:
'fixed'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment