Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
c082d4a3
Commit
c082d4a3
authored
Jan 19, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限列表分页
parent
f7461ff3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
Auth.php
application/index/controller/Auth.php
+4
-2
index.html
application/index/view/auth/index.html
+5
-0
AuthGroup.php
application/model/AuthGroup.php
+2
-2
auth.js
public/resource/js/auth.js
+1
-1
No files found.
application/index/controller/Auth.php
View file @
c082d4a3
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\untils\AuthUntils
;
use
app\model\AuthGroup
;
use
app\model\AuthGroup
;
class
Auth
extends
Basic
class
Auth
extends
Basic
{
{
...
@@ -55,7 +54,10 @@ class Auth extends Basic
...
@@ -55,7 +54,10 @@ class Auth extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$auth_group
=
New
AuthGroup
();
$auth_group
=
New
AuthGroup
();
$data
=
$auth_group
->
getList
(
$pageNo
,
$pageSize
,
''
,
'*'
);
$where
=
'status <> 0'
;
$data
[
'list'
]
=
$auth_group
->
getList
(
$pageNo
,
$pageSize
,
''
,
'*'
,
$where
);
$data
[
'total'
]
=
$auth_group
->
getTotal
(
$where
);
return
$this
->
response
(
200
,
''
,
$data
);
return
$this
->
response
(
200
,
''
,
$data
);
}
}
...
...
application/index/view/auth/index.html
View file @
c082d4a3
...
@@ -17,5 +17,9 @@
...
@@ -17,5 +17,9 @@
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"text-right pageinfo"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
application/model/AuthGroup.php
View file @
c082d4a3
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
// 权限模型
// 权限模型
namespace
app\model
;
namespace
app\model
;
use
think\Model
;
class
AuthGroup
extends
Model
class
AuthGroup
extends
Base
Model
{
{
const
TYPE_ADMIN
=
1
;
// 管理员用户组类型标识
const
TYPE_ADMIN
=
1
;
// 管理员用户组类型标识
const
MEMBER
=
'agents'
;
const
MEMBER
=
'agents'
;
...
...
public/resource/js/auth.js
View file @
c082d4a3
...
@@ -26,7 +26,7 @@ define (['doT', 'text!temp/auth_template_tpl.html', 'css!style/home.css','pagina
...
@@ -26,7 +26,7 @@ define (['doT', 'text!temp/auth_template_tpl.html', 'css!style/home.css','pagina
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'auth_list_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'auth_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#auth_list"
).
html
(
doTtmpl
(
data
.
data
));
$
(
"#auth_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
/*分页代码*/
$
(
"#pagediv"
).
pagination
({
$
(
"#pagediv"
).
pagination
({
...
...
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