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
bac92942
Commit
bac92942
authored
Apr 10, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客房经纪人搜索更换新表
parent
af04a6a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
13 deletions
+27
-13
Client.php
application/api_broker/controller/Client.php
+27
-13
No files found.
application/api_broker/controller/Client.php
View file @
bac92942
...
@@ -82,7 +82,9 @@ class Client extends Basic
...
@@ -82,7 +82,9 @@ class Client extends Basic
}
}
/**经纪人搜索
/**
* 经纪人搜索
*
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
...
@@ -90,23 +92,35 @@ class Client extends Basic
...
@@ -90,23 +92,35 @@ class Client extends Basic
*/
*/
public
function
agentSearch
(){
public
function
agentSearch
(){
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$table
=
new
Agents
;
$agent
=
new
AAgents
();
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
$params
=
$this
->
request
->
param
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$field
=
[
'id'
,
'realname'
,
'phone'
];
$where
=
'level in(2,5) '
;
$where
=
'status <> 2'
;
if
(
!
empty
(
$params
[
'search'
])){
if
(
$this
->
params
[
'search'
])
{
$where
.=
" and realname like '%
{
$params
[
'search'
]
}
%' or phone like '%
{
$params
[
'search'
]
}
%' "
;
$where
.=
' AND concat(phone,name) like "%'
.
$this
->
params
[
'search'
]
.
'%"'
;
$data
[
'search'
]
=
$params
[
'search'
];
}
}
$order
=
"id desc"
;
$data
[
'list'
]
=
$table
->
searchList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$where
);
if
(
$this
->
params
[
'level'
])
{
$total
=
$table
->
searchTotal
(
$where
);
$where
.=
' AND level in ('
.
$this
->
params
[
'level'
]
.
')'
;
$data
[
'total'
]
=
ceil
(
$total
/
$pageSize
);
}
$data
[
'page'
]
=
$pageNo
;
return
$this
->
response
(
200
,
'成功'
,
$data
);
if
(
$where
)
{
$field
=
'id,name as realname,phone'
;
$data
[
'list'
]
=
$agent
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
''
,
$where
);
$total
=
$agent
->
getTotal
(
$where
);
$data
[
'total'
]
=
ceil
(
$total
/
$pageSize
);
$data
[
'page'
]
=
$pageNo
;
$msg
=
'成功'
;
}
else
{
$msg
=
'没有经纪人信息'
;
}
$data
[
'page'
]
=
$pageNo
;
return
$this
->
response
(
200
,
$msg
,
$data
);
}
}
/**app 经纪人用户列表
/**app 经纪人用户列表
...
...
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