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
25c26998
Commit
25c26998
authored
Dec 11, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约看铺列表
parent
8a844696
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
AppointmentTime.php
application/api/controller/AppointmentTime.php
+20
-2
AppointWatchShop.php
application/model/AppointWatchShop.php
+1
-1
route.php
application/route.php
+8
-2
No files found.
application/api/controller/AppointmentTime.php
View file @
25c26998
...
...
@@ -6,6 +6,7 @@ use app\api\extend\Basic;
use
app\model\AppointWatchShop
;
use
app\model\HouseInfos
;
use
think\helper\Time
;
use
app\model\HouseImgs
;
/**
* Created by PhpStorm.
...
...
@@ -20,12 +21,14 @@ class AppointmentTime extends Basic
protected
$db
;
protected
$appointmentTimeModel
;
protected
$houseInfoModel
;
protected
$dbImg
;
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
appointmentTimeModel
=
new
AppointWatchShop
();
$this
->
houseInfoModel
=
new
HouseInfos
();
$this
->
dbImg
=
new
HouseImgs
();
}
/**
...
...
@@ -72,6 +75,10 @@ class AppointmentTime extends Basic
}
/**查询预约看铺列表
*
* @return \think\Response
*/
public
function
getAppointmentSeeShopList
()
{
/* $params = array(
...
...
@@ -82,7 +89,9 @@ class AppointmentTime extends Basic
);*/
$params
=
$this
->
params
;
$field
=
"id,user_id,agent_id,house_id,house_title,appellation,phone,expect_time,other_require,status,
$field
=
"id,user_id,agents_id,house_id,house_title,appellation,phone,expect_time,other_require,status,
is_cancel,is_evaluate,create_time"
;
...
...
@@ -97,10 +106,19 @@ class AppointmentTime extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$where_
[
"status"
]
=
array
(
"
in
"
,
$params
[
"status"
]
);
$where_
[
"status"
]
=
array
(
"
eq
"
,
$params
[
"status"
]
);
$where_
[
"user_id"
]
=
array
(
"eq"
,
$params
[
"user_id"
]
);
$result
=
$this
->
appointmentTimeModel
->
getAppointWatchShopList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$param
[
"house_id"
]
=
$val
[
"house_id"
];
$param
[
"imgtype"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
1
);
}
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
...
...
application/model/AppointWatchShop.php
View file @
25c26998
...
...
@@ -43,7 +43,7 @@ class AppointWatchShop extends Model
*/
public
function
getAppointWatchShopList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
{
return
$data
=
$this
->
db
return
$this
->
db
->
field
(
$field
)
->
where
(
$params
)
->
order
(
$order_
)
...
...
application/route.php
View file @
25c26998
...
...
@@ -66,8 +66,14 @@ Route::group('api',[
//get banner
'bannerList'
=>
[
'api/banner/getBannerList'
,
[
'method'
=>
'get'
]],
//get averagePriceAndTurnover
'averagePriceAndTurnover'
=>
[
'api/index/averagePriceAndTurnover'
,[
'method'
=>
'get'
]]
//get index
'averagePriceAndTurnover'
=>
[
'api/index/averagePriceAndTurnover'
,[
'method'
=>
'get'
]],
//post AppointmentTime
'getAppointmentSeeShopList'
=>
[
'api/appointmentTime/getAppointmentSeeShopList'
,[
'method'
=>
'post'
]],
...
...
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