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
59a9ff50
Commit
59a9ff50
authored
Feb 09, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询经纪人
parent
8f850ad7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
Broker.php
application/api_broker/controller/Broker.php
+32
-0
route.php
application/route.php
+2
-0
No files found.
application/api_broker/controller/Broker.php
View file @
59a9ff50
...
@@ -72,4 +72,35 @@ class Broker extends Basic
...
@@ -72,4 +72,35 @@ class Broker extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
* 获取经纪人列表
*
* @return \think\Response
*/
public
function
getBroker
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$where
=
''
;
if
(
$this
->
params
[
'phone'
])
{
$where
=
'(phone like "'
.
$this
->
params
[
'phone'
]
.
'%" or name like "'
.
$this
->
params
[
'phone'
]
.
'%")'
;
}
if
(
$this
->
params
[
'level'
])
{
$where
.=
' AND level in ('
.
$this
->
params
[
'level'
]
.
')'
;
}
if
(
$where
)
{
$agent
=
new
AAgents
();
$field
=
'id,name,phone'
;
$data
[
'data'
]
=
$agent
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
}
else
{
$data
[
'msg'
]
=
'没有经纪人信息'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
}
\ No newline at end of file
application/route.php
View file @
59a9ff50
...
@@ -215,6 +215,7 @@ Route::group('broker', [
...
@@ -215,6 +215,7 @@ Route::group('broker', [
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
'login'
=>
[
'api_broker/Broker/login'
,
[
'method'
=>
'get'
]
],
//经纪人登陆
'login'
=>
[
'api_broker/Broker/login'
,
[
'method'
=>
'get'
]
],
//经纪人登陆
'editClient'
=>
[
'api_broker/Client/editClient'
,
[
'method'
=>
'get|post'
]
],
//添加和编辑客户
'editClient'
=>
[
'api_broker/Client/editClient'
,
[
'method'
=>
'get|post'
]
],
//添加和编辑客户
'getBroker'
=>
[
'api_broker/broker/getBroker'
,[
'method'
=>
'get'
]],
]);
]);
//Route::miss('api/index/miss');//处理错误的url
//Route::miss('api/index/miss');//处理错误的url
\ 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