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
2d613dc5
Commit
2d613dc5
authored
Apr 11, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限
parent
ca13b06d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
Square.php
application/api_broker/controller/Square.php
+2
-1
SquareService.php
application/api_broker/service/SquareService.php
+5
-1
Square.php
application/index/controller/Square.php
+1
-1
No files found.
application/api_broker/controller/Square.php
View file @
2d613dc5
...
...
@@ -71,7 +71,7 @@ class Square extends Basic
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$result
=
$this
->
s_square
->
getSquareInfo
(
$params
);
$result
=
$this
->
s_square
->
getSquareInfo
(
$params
,
$this
->
agentId
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
...
...
@@ -157,6 +157,7 @@ class Square extends Basic
if
(
!
is_numeric
(
$params
[
'id'
]))
{
return
$this
->
response
(
"101"
,
"参数错误"
);
}
$result
=
$this
->
s_square
->
delSquare
(
$params
);
if
(
$result
){
...
...
application/api_broker/service/SquareService.php
View file @
2d613dc5
...
...
@@ -179,7 +179,7 @@ class SquareService
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
}
public
function
getSquareInfo
(
$params
){
public
function
getSquareInfo
(
$params
,
$agent_id
){
$field
=
'Square.id,'
;
$field
.=
'Square.title,'
;
...
...
@@ -200,6 +200,10 @@ class SquareService
$agent
=
$this
->
redis
->
getRedisCache
(
2
,
$res
[
'agent_id'
])
;
$res
[
'name'
]
=
$agent
[
'name'
];
//权限
$vip
=
new
VipService
();
//0:有权限 1:无权限
$res
[
'is_can_edit'
]
=
$vip
->
vip
(
$agent_id
,
'editSquare'
);
return
$res
;
}
...
...
application/index/controller/Square.php
View file @
2d613dc5
...
...
@@ -69,7 +69,7 @@ class Square extends Basic
return
$this
->
response
(
"101"
,
"参数不全"
);
}
$result
=
$this
->
s_square
->
getSquareInfo
(
$params
);
$result
=
$this
->
s_square
->
getSquareInfo
(
$params
,
$this
->
userId
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"成功"
,
$result
);
...
...
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