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
6f91976f
Commit
6f91976f
authored
Jul 18, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增VIP权限
parent
580b1068
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
22 deletions
+13
-22
Client.php
application/api_broker/controller/Client.php
+1
-1
VipService.php
application/api_broker/service/VipService.php
+12
-21
No files found.
application/api_broker/controller/Client.php
View file @
6f91976f
...
...
@@ -97,7 +97,7 @@ class Client extends Basic
$this
->
msg
=
'此号码为虚拟号码'
;
break
;
case
-
3
:
$this
->
code
=
101
;
$this
->
msg
=
'没有权限'
;
break
;
$this
->
msg
=
'没有
新增VIP
权限'
;
break
;
}
}
else
{
...
...
application/api_broker/service/VipService.php
View file @
6f91976f
...
...
@@ -14,42 +14,34 @@ use app\model\AuthRule;
*/
class
VipService
{
/**
* 是否具有查看vip客户权限
* @param $id int 经纪人ID
*
* @param $id 经纪人ID
* @param string $name
* @return int 是否可以查看vip客户 0:可查看 1:不可查看
*/
public
function
vip
(
$id
)
public
function
vip
(
$id
,
$name
=
'auth_vip'
)
{
//$id= 5743;
$agent
=
new
AAgents
();
$fields
=
'auth_group_id'
;
$agent
=
new
AAgents
();
$fields
=
'auth_group_id'
;
$auth_group_id
=
$agent
->
getAgentsById
(
$id
,
$fields
);
$auth_group
=
New
AuthGroup
();
$id
=
$auth_group_id
;
$fields
=
'rules'
;
$rules
=
$auth_group
->
getAuthGroupById
(
$id
,
$fields
);
$id
=
$auth_group_id
;
$fields
=
'rules'
;
$rules
=
$auth_group
->
getAuthGroupById
(
$id
,
$fields
);
$auth_group
=
New
AuthRule
();
$name
=
'auth_vip'
;
$fields
=
'id'
;
$auth_group
=
New
AuthRule
();
$fields
=
'id'
;
$auth_rule_id
=
$auth_group
->
getAuthRuleByName
(
$name
,
$fields
);
$rules_arr
=
explode
(
','
,
$rules
);
//dump($rules_arr);
$rules_arr
=
explode
(
','
,
$rules
);
if
(
in_array
(
$auth_rule_id
,
$rules_arr
))
{
return
0
;
}
else
{
return
1
;
}
}
}
\ No newline at end of file
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