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
04393e43
Commit
04393e43
authored
Jun 19, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C端 房源详情
parent
8b6dd4d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
0 deletions
+85
-0
OfficeRoom.php
application/api/controller/OfficeRoom.php
+47
-0
Basic.php
application/api/extend/Basic.php
+1
-0
OfficeRoomValidate.php
application/api/validate/OfficeRoomValidate.php
+32
-0
route.php
application/route.php
+5
-0
No files found.
application/api/controller/OfficeRoom.php
0 → 100644
View file @
04393e43
<?php
namespace
app\api\controller
;
use
app\api\extend\Basic
;
use
app\api\service\ActivityService
;
use
app\index\service\OfficeRoomService
;
use
think\Request
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2019-06-19
* Time: 14:38:58
*/
class
OfficeRoom
extends
Basic
{
private
$service
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service
=
new
OfficeRoomService
();
}
/**
* 房源详情
* @return \think\Response
*/
public
function
getOfficeRoomInfo
()
{
$params
=
$this
->
params
;
$checkResult
=
$this
->
validate
(
$params
,
"OfficeRoomValidate.getOfficeRoomInfo"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
$id
=
$params
[
'id'
];
$result
=
$this
->
service
->
getOfficeRoomInfo
(
$id
,
1
);
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
$result
[
'data'
]);
}
}
\ No newline at end of file
application/api/extend/Basic.php
View file @
04393e43
...
@@ -73,6 +73,7 @@ class Basic extends Controller
...
@@ -73,6 +73,7 @@ class Basic extends Controller
"api/addUserCallAgentV2"
,
"api/addUserCallAgentV2"
,
"office/filtrateConditionRoom"
,
"office/filtrateConditionRoom"
,
"office_api/getBroker"
,
"office_api/getBroker"
,
"office_api/getOfficeRoomInfo"
,
);
);
/**
/**
...
...
application/api/validate/OfficeRoomValidate.php
0 → 100755
View file @
04393e43
<?php
/**
* Created by fuju
* User : hj
* Date : 2017-12-7
* Time : 15:15:42
* Intro:
*/
namespace
app\api\validate
;
use
think\Validate
;
class
OfficeRoomValidate
extends
Validate
{
protected
$rule
=
[
'id'
=>
'require|number|gt:0'
,
];
protected
$message
=
[
'id.require'
=>
'id为必填字段'
,
'id.number'
=>
'id只能为数字'
,
'id.gt'
=>
'id必须大于0'
,
];
protected
$scene
=
[
'getOfficeRoomInfo'
=>
[
'id'
],
];
}
\ No newline at end of file
application/route.php
View file @
04393e43
...
@@ -593,6 +593,7 @@ Route::group('api', [
...
@@ -593,6 +593,7 @@ Route::group('api', [
'getFindShop'
=>
[
'api/FindShop/getFindShopByParams'
,
[
'method'
=>
'get|post'
]],
'getFindShop'
=>
[
'api/FindShop/getFindShopByParams'
,
[
'method'
=>
'get|post'
]],
'getRecommendShopList'
=>
[
'api/FindShop/getRecommendShopList'
,
[
'method'
=>
'get|post'
]],
'getRecommendShopList'
=>
[
'api/FindShop/getRecommendShopList'
,
[
'method'
=>
'get|post'
]],
]);
]);
Route
::
group
(
'chat'
,
[
Route
::
group
(
'chat'
,
[
...
@@ -1062,5 +1063,8 @@ Route::group('office_index', [
...
@@ -1062,5 +1063,8 @@ Route::group('office_index', [
Route
::
group
(
'office_api'
,
[
Route
::
group
(
'office_api'
,
[
'getBroker'
=>
[
'api/OfficeBroker/index'
,
[
'method'
=>
'get'
]],
//获取当前商铺或街铺的经纪人评论信息列表
'getBroker'
=>
[
'api/OfficeBroker/index'
,
[
'method'
=>
'get'
]],
//获取当前商铺或街铺的经纪人评论信息列表
'getBrokerV2'
=>
[
'api/OfficeBroker/indexV2'
,
[
'method'
=>
'get'
]],
//获取当前商铺或街铺的经纪人评论信息列表
'getBrokerV2'
=>
[
'api/OfficeBroker/indexV2'
,
[
'method'
=>
'get'
]],
//获取当前商铺或街铺的经纪人评论信息列表
'getOfficeRoomInfo'
=>
[
'api/OfficeRoom/getOfficeRoomInfo'
,
[
'method'
=>
'GET|POST'
]],
//获取房源详情
]);
]);
//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