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
c9f2923a
Commit
c9f2923a
authored
May 31, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼盘详情
parent
8e1b7ab6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
2 deletions
+56
-2
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+24
-0
OfficeRoom.php
application/index/controller/OfficeRoom.php
+25
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+1
-1
OfficeService.php
application/index/service/OfficeService.php
+1
-1
OfficeBuildingRoomValidate.php
application/index/validate/OfficeBuildingRoomValidate.php
+1
-0
route.php
application/route.php
+4
-0
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
c9f2923a
...
@@ -131,4 +131,27 @@ class OfficeRoom extends Basic
...
@@ -131,4 +131,27 @@ class OfficeRoom extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
/**
* 楼盘详情
*
* @return \think\Response
*/
public
function
getBuildingDetail
()
{
$msg
=
''
;
$data
=
[];
$code
=
200
;
$building_service
=
new
OfficeService
();
$result
=
$building_service
->
getOfficeDetail
(
$this
->
params
[
'id'
]);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
else
{
$data
=
$result
[
'data'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
}
\ No newline at end of file
application/index/controller/OfficeRoom.php
View file @
c9f2923a
...
@@ -91,4 +91,28 @@ class OfficeRoom extends Basic
...
@@ -91,4 +91,28 @@ class OfficeRoom extends Basic
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
/**
* 楼盘详情
*
* @return \think\Response
*/
public
function
getBuildingDetail
()
{
$msg
=
''
;
$data
=
[];
$code
=
200
;
$building_service
=
new
OfficeService
();
$result
=
$building_service
->
getOfficeDetail
(
$this
->
params
[
'id'
]);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
else
{
$data
=
$result
[
'data'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
}
\ No newline at end of file
application/index/service/OfficeRoomService.php
View file @
c9f2923a
...
@@ -299,7 +299,7 @@ class OfficeRoomService
...
@@ -299,7 +299,7 @@ class OfficeRoomService
$office
=
new
OfficeGBuilding
();
$office
=
new
OfficeGBuilding
();
$m_landlord
=
new
OfficeGLandlordPhone
();
$m_landlord
=
new
OfficeGLandlordPhone
();
$data
[
't
otal
'
]
=
$office
->
getFieldOneValue
(
'title'
,
[
'id'
=>
$data
[
'building_id'
]]);
$data
[
't
itle
'
]
=
$office
->
getFieldOneValue
(
'title'
,
[
'id'
=>
$data
[
'building_id'
]]);
$data
[
'landlord_phone_array'
]
=
$m_landlord
->
getAllList
(
'id,name,phone'
,
[
'house_id'
=>
$data
[
'id'
]]);
$data
[
'landlord_phone_array'
]
=
$m_landlord
->
getAllList
(
'id,name,phone'
,
[
'house_id'
=>
$data
[
'id'
]]);
}
}
$result
[
'data'
]
=
$data
;
$result
[
'data'
]
=
$data
;
...
...
application/index/service/OfficeService.php
View file @
c9f2923a
...
@@ -109,7 +109,7 @@ class OfficeService
...
@@ -109,7 +109,7 @@ class OfficeService
* @param int $app
* @param int $app
* @return mixed
* @return mixed
*/
*/
public
function
getOfficeDetail
(
int
$id
,
$app
=
0
)
public
function
getOfficeDetail
(
$id
,
$app
=
0
)
{
{
$result
[
'status'
]
=
'fail'
;
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
$result
[
'msg'
]
=
''
;
...
...
application/index/validate/OfficeBuildingRoomValidate.php
View file @
c9f2923a
...
@@ -15,6 +15,7 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -15,6 +15,7 @@ class OfficeBuildingRoomValidate extends Validate
{
{
protected
$rule
=
[
protected
$rule
=
[
'id'
=>
'require|between: 1,99999999999'
,
'id'
=>
'require|between: 1,99999999999'
,
'building_id'
=>
'require|between: 1,99999999999'
,
'floor'
=>
'require|between: 1,99999'
,
'floor'
=>
'require|between: 1,99999'
,
'room_number'
=>
'require|length:1,50'
,
'room_number'
=>
'require|length:1,50'
,
'is_rent'
=>
'require|in:0,1'
,
'is_rent'
=>
'require|in:0,1'
,
...
...
application/route.php
View file @
c9f2923a
...
@@ -966,6 +966,7 @@ Route::group('office', [
...
@@ -966,6 +966,7 @@ Route::group('office', [
'houseEdit'
=>
[
'api_broker/OfficeRoom/edit'
,
[
'method'
=>
'POST|GET'
]],
//楼盘字典新增和编辑
'houseEdit'
=>
[
'api_broker/OfficeRoom/edit'
,
[
'method'
=>
'POST|GET'
]],
//楼盘字典新增和编辑
'delHouseFile'
=>
[
'api_broker/OfficeRoom/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'delHouseFile'
=>
[
'api_broker/OfficeRoom/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'getBuildingSearch'
=>
[
'api_broker/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingSearch'
=>
[
'api_broker/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingDetail'
=>
[
'api_broker/OfficeRoom/getBuildingDetail'
,
[
'method'
=>
'GET'
]],
//楼盘详情
]);
]);
Route
::
group
(
'office_index'
,
[
Route
::
group
(
'office_index'
,
[
...
@@ -975,5 +976,7 @@ Route::group('office_index', [
...
@@ -975,5 +976,7 @@ Route::group('office_index', [
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingDetail'
=>
[
'index/OfficeRoom/getBuildingDetail'
,
[
'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