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
00a1a03a
Commit
00a1a03a
authored
Dec 22, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模糊搜索经纪人列表
parent
b95b62a3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
13 deletions
+71
-13
Member.php
application/api/controller/Member.php
+7
-3
Broker.php
application/index/controller/Broker.php
+11
-4
WatchShop.php
application/index/controller/WatchShop.php
+14
-4
Agents.php
application/model/Agents.php
+38
-1
watch_shop.js
public/resource/js/watch_shop.js
+1
-1
No files found.
application/api/controller/Member.php
View file @
00a1a03a
...
@@ -388,9 +388,13 @@ class Member extends Basic
...
@@ -388,9 +388,13 @@ class Member extends Basic
public
function
getUserInfo
()
{
public
function
getUserInfo
()
{
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$fields
=
'id,user_pswd,user_nick,user_phone,user_pic,referrer_id,referrer_source,integral,create_time,update_time,last_login_time,last_login_ip'
;
$data
[
'data'
]
=
''
;
$data
[
'data'
]
=
$this
->
user
->
selectUser
(
$this
->
userId
,
$fields
);
if
(
$this
->
params
[
'AuthToken'
])
{
$data
[
'data'
][
'AuthToken'
]
=
$this
->
params
[
'AuthToken'
];
$fields
=
'id,user_pswd,user_nick,user_phone,user_pic,referrer_id,referrer_source,integral,create_time,update_time,last_login_time,last_login_ip'
;
$data
[
'data'
]
=
$this
->
user
->
selectUser
(
$this
->
userId
,
$fields
);
$data
[
'data'
][
'AuthToken'
]
=
$this
->
params
[
'AuthToken'
];
}
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
...
...
application/index/controller/Broker.php
View file @
00a1a03a
...
@@ -28,16 +28,23 @@ class Broker extends Basic
...
@@ -28,16 +28,23 @@ class Broker extends Basic
$data
[
'data'
]
=
''
;
$data
[
'data'
]
=
''
;
$data
[
'code'
]
=
''
;
$data
[
'code'
]
=
''
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
$
house_id
=
$this
->
request
->
param
(
'house_id'
);
$
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'
];
if
(
$house_id
)
{
if
(
$params
[
'name'
])
{
$where
[
'realname'
]
=
[
'like'
,
$params
[
'name'
]
.
'%'
];;;
}
if
(
$params
[
'phone'
])
{
$where
[
'phone'
]
=
[
'like'
,
$params
[
'phone'
]
.
'%'
];;
}
if
(
$where
)
{
$agent
=
new
Agents
();
$agent
=
new
Agents
();
$field
=
'father_id,realname,phone'
;
$field
=
'father_id,realname,phone'
;
$params
=
''
;
$data
[
'data'
]
=
$agent
->
getAgents
(
$pageNo
,
$pageSize
,
''
,
$field
,
$where
);
$data
[
'data'
]
=
$agent
->
getAgents
(
$pageNo
,
$pageSize
,
''
,
$field
,
$params
,
$house_id
);
}
else
{
}
else
{
$data
[
'msg'
]
=
'没有该楼盘信息'
;
$data
[
'msg'
]
=
'没有该楼盘信息'
;
}
}
...
...
application/index/controller/WatchShop.php
View file @
00a1a03a
...
@@ -12,6 +12,7 @@ namespace app\index\controller;
...
@@ -12,6 +12,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\Applies
;
use
app\model\Applies
;
use
app\model\AppointWatchShop
;
use
app\model\AppointWatchShop
;
use
app\model\HouseInfos
;
use
think\Session
;
use
think\Session
;
class
WatchShop
extends
Basic
class
WatchShop
extends
Basic
...
@@ -64,8 +65,16 @@ class WatchShop extends Basic
...
@@ -64,8 +65,16 @@ class WatchShop extends Basic
$params
=
$this
->
request
->
param
();
$params
=
$this
->
request
->
param
();
if
(
$params
[
'id'
])
{
if
(
$params
[
'id'
])
{
$appoint
=
new
AppointWatchShop
();
$appoint_watch
=
new
AppointWatchShop
();
$appoint_list
=
$appoint
->
get
(
$params
[
'id'
]);
$appoint_list
=
$appoint_watch
->
get
(
$params
[
'id'
]);
if
(
$appoint_list
->
agent_id
)
{
}
else
{
$house
=
new
HouseInfos
();
$house
->
field
(
''
)
->
find
();
}
$apples
=
new
Applies
();
$apples
=
new
Applies
();
$apples
->
save
([
$apples
->
save
([
'agent_id'
=>
$appoint_list
[
'agent_id'
],
'agent_id'
=>
$appoint_list
[
'agent_id'
],
...
@@ -78,8 +87,8 @@ class WatchShop extends Basic
...
@@ -78,8 +87,8 @@ class WatchShop extends Basic
}
}
}
else
{
}
else
{
$data
[
'msg'
]
=
'没有该看铺信息'
;
}
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
}
}
\ No newline at end of file
application/model/Agents.php
View file @
00a1a03a
...
@@ -15,7 +15,7 @@ class Agents extends Model
...
@@ -15,7 +15,7 @@ class Agents extends Model
* @param type $order_
* @param type $order_
* @param type $field
* @param type $field
* @param type $params
* @param type $params
* @param type $house_id 查询该街铺和商铺的经纪人
* @param type $house_id 查询该街铺和商铺的经纪人
评论信息
* @return type
* @return type
*/
*/
public
function
getUser
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
,
$house_id
=
''
)
{
public
function
getUser
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
,
$house_id
=
''
)
{
...
@@ -90,4 +90,41 @@ class Agents extends Model
...
@@ -90,4 +90,41 @@ class Agents extends Model
return
$data
;
return
$data
;
}
}
/**
* 查询经纪人列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param $field
* @param $params
* @param string $house_id
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAgents
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
,
$house_id
=
''
)
{
if
(
$house_id
==
''
)
{
$data
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
where
(
'level=2 or level=5'
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
else
{
$data
=
$this
->
field
(
$field
)
->
where
(
'find_in_set('
.
$house_id
.
', house_ids) or find_in_set('
.
$house_id
.
', house_ids2)'
)
->
where
(
$params
)
->
where
(
'level=2 or level=5'
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
return
$data
;
}
}
}
public/resource/js/watch_shop.js
View file @
00a1a03a
...
@@ -29,7 +29,7 @@ define (['doT', 'text!temp/watch_template_tpl.html', 'css!style/home.css',"datet
...
@@ -29,7 +29,7 @@ define (['doT', 'text!temp/watch_template_tpl.html', 'css!style/home.css',"datet
$
(
this
).
datetimepicker
(
'hide'
);
$
(
this
).
datetimepicker
(
'hide'
);
});
});
$
(
document
).
delegate
(
".
add_applies
"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".
phone_jia
"
,
"click"
,
function
()
{
var
params
=
{};
var
params
=
{};
params
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
params
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
...
...
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