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
ac687e95
Commit
ac687e95
authored
Oct 31, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取角色站点
parent
4314b0a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Auth.php
application/index/controller/Auth.php
+1
-1
AuthGroupSite.php
application/model/AuthGroupSite.php
+6
-4
No files found.
application/index/controller/Auth.php
View file @
ac687e95
...
@@ -467,7 +467,7 @@ class Auth extends Basic
...
@@ -467,7 +467,7 @@ class Auth extends Basic
}
}
if
(
$this
->
request
->
isGet
())
{
if
(
$this
->
request
->
isGet
())
{
$data
=
$m_auth
->
getGroupSiteList
(
'a.id,b.city'
,
[
''
]);
$data
=
$m_auth
->
getGroupSiteList
(
[
'group_id'
=>
$this
->
params
[
'group_id'
]
]);
if
(
$data
[
'status'
]
==
'successful'
)
{
if
(
$data
[
'status'
]
==
'successful'
)
{
$list
=
$data
[
'data'
];
$list
=
$data
[
'data'
];
}
else
{
}
else
{
...
...
application/model/AuthGroupSite.php
View file @
ac687e95
...
@@ -31,14 +31,16 @@ class AuthGroupSite extends BaseModel
...
@@ -31,14 +31,16 @@ class AuthGroupSite extends BaseModel
* @param $where
* @param $where
* @return mixed
* @return mixed
*/
*/
public
function
getGroupSiteList
(
$
field
,
$
where
)
{
public
function
getGroupSiteList
(
$where
)
{
$data
[
'data'
]
=
[];
$data
[
'data'
]
=
[];
try
{
try
{
$list
=
$this
->
db_
->
alias
(
'a'
)
$list
=
$this
->
db_
->
field
(
'id,site_id,group_id'
)
->
field
(
$field
)
->
join
(
'a_site a'
,
'a.site_id = b.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
select
();
->
select
();
$m_site
=
new
ASite
();
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'site'
]
=
$m_site
->
getSite
(
'id,city'
,
[
'id'
=>
[
'in'
,
$v
[
'site_id'
]]]);
}
$data
[
'data'
]
=
$list
;
$data
[
'data'
]
=
$list
;
$data
[
'status'
]
=
'successful'
;
$data
[
'status'
]
=
'successful'
;
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
...
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