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
23a79abc
Commit
23a79abc
authored
Jun 18, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5f0c9331
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
27 deletions
+154
-27
OfficeShop.php
application/api/controller/OfficeShop.php
+109
-0
Shop.php
application/api/controller/Shop.php
+45
-27
No files found.
application/api/controller/OfficeShop.php
0 → 100644
View file @
23a79abc
<?php
namespace
app\api\controller
;
use
app\api\extend\Basic
;
use
think\Request
;
/**
* Created by PhpStorm.
* User: zw
* Date: 2019/6/18
* Time: 11:10
*/
class
OfficeShop
extends
Basic
{
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
}
/**
* 获取办公楼列表
* @return \think\Response
*/
public
function
getShopList
(){
$list
=
[];
if
(
count
(
$list
)
>
0
){
return
$this
->
response
(
"200"
,
"success"
,
$list
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
/**
* 获取详情
*/
public
function
getShopDetail
(){
}
public
function
getFilter
(){
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
if
(
empty
(
$params
[
"city"
]))
{
return
$this
->
response
(
"101"
,
"参数错误"
);
}
$city
=
$params
[
"city"
];
$regions
=
new
Regions
();
$cityList
=
$regions
->
getRegionsByCity
(
$city
);
$i
=
$j
=
0
;
$result
[
"area"
][
$i
][
"city"
]
=
"全部"
;
$result
[
"area"
][
$i
][
"disc"
][]
=
"全部"
;
foreach
(
$cityList
as
$k
=>
$v
)
{
$i
++
;
if
(
!
empty
(
$v
[
"name"
]))
{
$result
[
"area"
][
$i
][
"city"
]
=
$v
[
"name"
];
$result
[
"area"
][
$i
][
"disc"
][]
=
"全"
.
$v
[
"name"
];
}
foreach
(
$v
[
"city"
]
as
$item
)
{
if
(
!
empty
(
$item
))
{
$result
[
"area"
][
$i
][
"disc"
][]
=
$item
;
}
}
if
(
$j
==
0
)
{
$result
[
"area"
][
$i
][
"business_district"
][
$j
][
'district'
]
=
"全"
.
$v
[
"name"
];
$result
[
"area"
][
$i
][
"business_district"
][
$j
][
'business'
][]
=
[
'id'
=>
0
,
'name'
=>
'全部'
];
}
foreach
(
$v
[
'business_district'
]
as
$item2
)
{
if
(
!
empty
(
$item2
))
{
$j
++
;
$result
[
"area"
][
$i
][
"business_district"
][
$j
]
=
$item2
;
}
}
break
;
//目前只有上海和杭州其余的先不显示
}
$result
[
'yetai'
]
=
array
(
'全部'
,
'商场美食'
,
'沿街餐饮'
,
'百货超市'
,
'服饰鞋包'
,
'亲子教育'
,
'休闲娱乐'
,
'办公'
,
'其他'
);
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
)
);
//面积
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
array
(
'id'
=>
'1'
,
'value'
=>
'30-60m²'
),
array
(
'id'
=>
'2'
,
'value'
=>
'60-100m²'
),
array
(
'id'
=>
'3'
,
'value'
=>
'100-300m²'
)
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
)
);
$result
[
'more'
][]
=
"全部"
;
$labelsResult
=
$this
->
room_labels
->
getLabels
();
if
(
count
(
$labelsResult
)
>
0
)
{
foreach
(
$labelsResult
as
$labelsKey
=>
$labelsVal
)
{
if
(
$labelsVal
[
'name'
])
{
$result
[
'more'
][]
=
$labelsVal
[
'name'
];
}
}
}
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
}
\ No newline at end of file
application/api/controller/Shop.php
View file @
23a79abc
...
...
@@ -9,6 +9,7 @@ namespace app\api\controller;
* Time : 15:12
* Intro: 获取商铺list
*/
use
app\api\extend\Basic
;
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\VerifyService
;
...
...
@@ -232,7 +233,7 @@ class Shop extends Basic
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
}
else
{
$result
[
$key
][
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$result
[
$key
][
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$house_img_where
[
"house_id"
]
=
$val
[
"id"
];
$house_img_where
[
"img_type"
]
=
2
;
//默认主图 产品盼盼于11.16号修改
$result
[
$key
][
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$house_img_where
,
1
);
...
...
@@ -380,7 +381,7 @@ class Shop extends Basic
$result
[
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
}
else
{
$result
[
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$result
[
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$param
[
"house_id"
]
=
$params
[
'id'
];
//todo 这里的是否要更改成b端后台上传的类型
$param
[
"img_type"
]
=
2
;
...
...
@@ -416,7 +417,7 @@ class Shop extends Basic
$result
[
'payment_deposit'
]
=
empty
(
$result
[
'payment_month'
])
?
""
:
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
"
;
$result
[
'age_limit'
]
=
empty
(
$result
[
'age_limit'
])
?
""
:
"签订
{
$result
[
'age_limit'
]
}
年"
;
$result
[
'address'
]
=
$result
[
'city'
]
.
$result
[
'disc'
]
.
$result
[
'internal_title'
];
//7151
$result
[
'address'
]
=
$result
[
'city'
]
.
$result
[
'disc'
]
.
$result
[
'internal_title'
];
//7151
#商铺视频
$s_house
=
new
HouseService
();
...
...
@@ -427,12 +428,14 @@ class Shop extends Basic
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
}
/**
*
搜索页搜索条件
/**
搜索页搜索条件
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
filtrateCondition
()
public
function
filtrateCondition
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
...
...
@@ -476,13 +479,17 @@ class Shop extends Basic
$result
[
'yetai'
]
=
array
(
'全部'
,
'商场美食'
,
'沿街餐饮'
,
'百货超市'
,
'服饰鞋包'
,
'亲子教育'
,
'休闲娱乐'
,
'办公'
,
'其他'
);
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
));
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
)
);
//面积
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
array
(
'id'
=>
'1'
,
'value'
=>
'30-60m²'
),
array
(
'id'
=>
'2'
,
'value'
=>
'60-100m²'
),
array
(
'id'
=>
'3'
,
'value'
=>
'100-300m²'
)
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
));
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
)
);
$result
[
'more'
][]
=
"全部"
;
$labelsResult
=
$this
->
labels
->
getLabels
();
...
...
@@ -497,12 +504,13 @@ class Shop extends Basic
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
/**
* 搜索页搜索条件
/**搜索页搜索条件
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
filtrateConditionV2
()
public
function
filtrateConditionV2
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
...
...
@@ -548,13 +556,17 @@ class Shop extends Basic
$result
[
'yetai'
]
=
array
(
'全部'
,
'商场美食'
,
'沿街餐饮'
,
'百货超市'
,
'服饰鞋包'
,
'亲子教育'
,
'休闲娱乐'
,
'办公'
,
'其他'
);
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
));
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
)
);
//面积
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
array
(
'id'
=>
'1'
,
'value'
=>
'30-60m²'
),
array
(
'id'
=>
'2'
,
'value'
=>
'60-100m²'
),
array
(
'id'
=>
'3'
,
'value'
=>
'100-300m²'
)
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
));
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
)
);
$result
[
'more'
][]
=
"全部"
;
$labelsResult
=
$this
->
labels
->
getLabels
();
...
...
@@ -572,6 +584,9 @@ class Shop extends Basic
/**
* 搜索页搜索条件
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
filtrateConditionRoom
()
{
...
...
@@ -619,13 +634,17 @@ class Shop extends Basic
$result
[
'yetai'
]
=
array
(
'全部'
,
'商场美食'
,
'沿街餐饮'
,
'百货超市'
,
'服饰鞋包'
,
'亲子教育'
,
'休闲娱乐'
,
'办公'
,
'其他'
);
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
));
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
array
(
'id'
=>
'1'
,
'value'
=>
'1万-3万'
),
array
(
'id'
=>
'2'
,
'value'
=>
'1万以下'
)
);
//面积
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
$result
[
'acreage'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'30m²以内'
),
array
(
'id'
=>
'1'
,
'value'
=>
'30-60m²'
),
array
(
'id'
=>
'2'
,
'value'
=>
'60-100m²'
),
array
(
'id'
=>
'3'
,
'value'
=>
'100-300m²'
)
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
));
,
array
(
'id'
=>
'4'
,
'value'
=>
'300-500m²'
),
array
(
'id'
=>
'5'
,
'value'
=>
'500m²以上'
)
);
$result
[
'more'
][]
=
"全部"
;
$labelsResult
=
$this
->
room_labels
->
getLabels
();
...
...
@@ -644,8 +663,7 @@ class Shop extends Basic
* 商铺列表进场统计
* @return \think\Response
*/
public
function
getMarchInList
()
public
function
getMarchInList
()
{
$params
=
$this
->
params
;
/* $params = array(
...
...
@@ -691,4 +709,4 @@ class Shop extends Basic
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
\ No newline at end of file
}
\ 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