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
6b2e6d12
Commit
6b2e6d12
authored
Jul 18, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增vip用户权限验证
parent
6d61af43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
16 deletions
+28
-16
Client.php
application/api_broker/controller/Client.php
+10
-7
Member.php
application/index/controller/Member.php
+10
-8
Users.php
application/model/Users.php
+8
-1
No files found.
application/api_broker/controller/Client.php
View file @
6b2e6d12
...
...
@@ -88,15 +88,18 @@ class Client extends Basic
}
}
if
(
$data
[
'start'
]
==
-
1
)
{
$this
->
code
=
101
;
$this
->
msg
=
'该用户已存在'
;
switch
(
$data
[
'start'
])
{
case
-
1
:
$this
->
code
=
101
;
$this
->
msg
=
'该用户已存在'
;
break
;
case
-
2
:
$this
->
code
=
101
;
$this
->
msg
=
'此号码为虚拟号码'
;
break
;
case
-
3
:
$this
->
code
=
101
;
$this
->
msg
=
'没有权限'
;
break
;
}
if
(
$data
[
'start'
]
==
-
2
)
{
$this
->
code
=
101
;
$this
->
msg
=
'此号码为虚拟号码'
;
}
}
else
{
$data
[
'start'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
}
...
...
application/index/controller/Member.php
View file @
6b2e6d12
...
...
@@ -349,14 +349,16 @@ class Member extends Basic{
}
}
if
(
$result
==
-
1
)
{
$this
->
code
=
101
;
$this
->
msg
=
'该用户已存在'
;
}
if
(
$result
==
-
2
)
{
$this
->
code
=
101
;
$this
->
msg
=
'此号码为虚拟号码'
;
switch
(
$result
)
{
case
-
1
:
$this
->
code
=
101
;
$this
->
msg
=
'该用户已存在'
;
break
;
case
-
2
:
$this
->
code
=
101
;
$this
->
msg
=
'此号码为虚拟号码'
;
break
;
case
-
3
:
$this
->
code
=
101
;
$this
->
msg
=
'没有权限'
;
break
;
}
$this
->
operating_records
(
$this
->
userId
,
$type
=
3
,
$remark
,
$this
->
params
[
'id'
]);
...
...
application/model/Users.php
View file @
6b2e6d12
...
...
@@ -2,6 +2,7 @@
namespace
app\model
;
use
app\api_broker\service\VipService
;
use
think\Db
;
use
think\Model
;
...
...
@@ -257,6 +258,13 @@ class Users extends Model
}
if
(
!
empty
(
$data
[
'agents_id'
]))
{
$insert_data
[
'agent_id'
]
=
$data
[
'agents_id'
];
if
(
$data
[
'vip'
]
==
1
)
{
$vip
=
new
VipService
();
if
(
$vip
->
vip
(
$this
->
$insert_data
[
'agent_id'
]))
{
return
-
3
;
}
}
}
if
(
!
empty
(
$data
[
'industry_type'
]))
{
$insert_data
[
'industry_type'
]
=
$data
[
'industry_type'
];
...
...
@@ -291,7 +299,6 @@ class Users extends Model
}
else
{
$return_id
=
-
2
;
}
}
else
{
$return_id
=
-
1
;
}
...
...
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