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
115f0666
Commit
115f0666
authored
Feb 11, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人列表
parent
0e3f98c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
Broker.php
application/index/controller/Broker.php
+39
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Broker.php
View file @
115f0666
...
...
@@ -91,6 +91,45 @@ class Broker extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 获取经纪人列表
*
* @return \think\Response
*/
public
function
getBrokerList
()
{
$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
=
'status <> 2'
;
if
(
$this
->
params
[
'phone'
])
{
$where
=
' AND (phone like "'
.
$this
->
params
[
'phone'
]
.
'%" or name like "'
.
$this
->
params
[
'phone'
]
.
'%")'
;
}
if
(
$this
->
params
[
'level'
])
{
$where
.=
' AND level in ('
.
$this
->
params
[
'level'
]
.
')'
;
}
if
(
$this
->
params
[
'store_id'
])
{
$where
.=
' AND store_id='
.
$this
->
params
[
'store_id'
];
}
if
(
$where
)
{
$agent
=
new
AAgents
();
$field
=
'id,name,phone,level,create_time'
;
$data
[
'list'
]
=
$agent
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$data
[
'total'
]
=
$agent
->
getTotal
(
$where
);
}
else
{
$data
[
'msg'
]
=
'没有经纪人信息'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
/**
* 添加经纪人与楼盘关系
*
...
...
application/route.php
View file @
115f0666
...
...
@@ -67,6 +67,7 @@ Route::group('index', [
//查询经纪人
'getBroker'
=>
[
'index/broker/getBroker'
,[
'method'
=>
'get'
]],
'getBroker_new'
=>
[
'index/broker/getBroker_new'
,[
'method'
=>
'get'
]],
'getBrokerList'
=>
[
'index/broker/getBrokerList'
,[
'method'
=>
'get'
]],
//门店列表的经纪人
'addHousesAgents'
=>
[
'index/broker/AddHousesAgents'
,
[
'method'
=>
'POST'
]],
//新增楼盘与经纪人关系
'delTohouses'
=>
[
'index/broker/delTohouses'
,
[
'method'
=>
'POST'
]],
//解除经纪人和楼盘关系
'getAgentsTohouses'
=>
[
'index/broker/getAgentsTohouses'
,
[
'method'
=>
'GET'
]],
//获取经纪人和楼盘关系信息
...
...
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