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
149977ed
Commit
149977ed
authored
Jun 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是否对C端显示
parent
23388a39
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
4 deletions
+54
-4
OfficeRoom.php
application/index/controller/OfficeRoom.php
+15
-0
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+32
-0
OfficeBuildingRoomValidate.php
application/index/validate/OfficeBuildingRoomValidate.php
+6
-4
route.php
application/route.php
+1
-0
No files found.
application/index/controller/OfficeRoom.php
View file @
149977ed
...
...
@@ -279,4 +279,18 @@ class OfficeRoom extends Basic
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
/**
* 是否对C端显示
*
* @return \think\Response
*/
public
function
isShow
()
{
$result
=
$this
->
service
->
isShow
(
$this
->
params
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$this
->
code
=
101
;
$this
->
msg
=
$result
[
'msg'
];
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
\ No newline at end of file
application/index/service/OfficeRoomService.php
View file @
149977ed
...
...
@@ -1418,4 +1418,35 @@ class OfficeRoomService
return
$result
;
}
/**
* 是否对C端显示
*
* @param $data
* @return mixed
*/
public
function
isShow
(
$data
)
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
$result
[
'data'
]
=
[];
$check
=
$this
->
validate
->
scene
(
'is_show'
)
->
check
(
$data
);
if
(
false
===
$check
)
{
$result
[
'msg'
]
=
$this
->
validate
->
getError
();
return
$result
;
}
try
{
$house_data
=
$this
->
m_office_room
->
getFindData
(
'id,is_show'
,
[
'id'
=>
$data
[
'id'
]]);
if
(
empty
(
$house_data
[
'id'
]))
{
$result
[
'msg'
]
=
'没有该房源'
;
return
$result
;
}
else
{
if
(
$house_data
[
'is_show'
]
!=
$data
[
'is_show'
])
{
$this
->
m_office_room
->
editData
([
'is_show'
=>
$data
[
'is_show'
]],
$data
[
'id'
]);
}
}
}
catch
(
\Exception
$e
)
{
$result
[
'msg'
]
=
$e
->
getMessage
();
}
return
$result
;
}
}
\ No newline at end of file
application/index/validate/OfficeBuildingRoomValidate.php
View file @
149977ed
...
...
@@ -37,7 +37,7 @@ class OfficeBuildingRoomValidate extends Validate
'carport'
=>
'require|length:1,255'
,
'rent_free'
=>
'require|length:-1,99'
,
'source'
=>
'require|in:0,1,2,3,4,5,6,7'
,
//
'is_show' => 'require|in:0,1',
'is_show'
=>
'require|in:0,1'
,
'decoration'
=>
'require|in:1,2,3,4'
,
'shop_sign'
=>
'require|length:1,255'
,
'landlord_phone'
=>
'require'
,
...
...
@@ -90,8 +90,8 @@ class OfficeBuildingRoomValidate extends Validate
'rent_free.length'
=>
'免租时间要在1至99个字'
,
'source.require'
=>
'来源为必填'
,
'source.length'
=>
'来源参数错误'
,
//
'is_show.require'=>'是否对客户展示必填',
//
'is_show.between'=>'是否对客户展示参数错误',
'is_show.require'
=>
'是否对客户展示必填'
,
'is_show.between'
=>
'是否对客户展示参数错误'
,
'decoration.require'
=>
'交付装修必填'
,
'decoration.between'
=>
'交付装修参数错误'
,
'shop_sign.require'
=>
'商铺标签为必填'
,
...
...
@@ -117,6 +117,7 @@ class OfficeBuildingRoomValidate extends Validate
'detail'
=>
[
'id'
],
'is_carefully_chosen'
=>
[
'id'
,
'is_carefully_chosen'
],
'exclusive'
=>
[
'agent_start_time,agent_end_time,is_exclusive_type,id'
],
'del'
=>
[
'id'
]
'del'
=>
[
'id'
],
'show'
=>
'id,is_show'
];
}
\ No newline at end of file
application/route.php
View file @
149977ed
...
...
@@ -1041,6 +1041,7 @@ Route::group('office_index', [
'addExclusive'
=>
[
'index/OfficeRoom/editExclusive'
,
[
'method'
=>
'POST'
]],
//添加楼盘独家
'getExclusive'
=>
[
'index/OfficeRoom/getExclusive'
,
[
'method'
=>
'get'
]],
//获取楼盘独家
'del'
=>
[
'index/OfficeRoom/del'
,
[
'method'
=>
'POST'
]],
//设置无效房源
'isShow'
=>
[
'index/OfficeRoom/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
]);
Route
::
group
(
'office_api'
,
[
...
...
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