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
9d1c15e6
Commit
9d1c15e6
authored
Nov 09, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
是否显示真实图片
parent
45345fa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
23 deletions
+36
-23
Shop.php
application/api/controller/Shop.php
+31
-23
GHouses.php
application/model/GHouses.php
+5
-0
No files found.
application/api/controller/Shop.php
View file @
9d1c15e6
...
@@ -97,7 +97,7 @@ class Shop extends Basic
...
@@ -97,7 +97,7 @@ class Shop extends Basic
return
$this
->
response
(
"101"
,
"城市不能为空"
);
return
$this
->
response
(
"101"
,
"城市不能为空"
);
}
}
$field
=
"id,external_title as title,external_address as address,city,disc,business_district_id,status,industry_type,external_image_id
$field
=
"id,external_title as title,external_address as address,city,disc,business_district_id,status,industry_type,external_image_id
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price"
;
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price
,is_show_image
"
;
$conditions
[
"city"
]
=
trim
(
$params
[
'city'
]);
$conditions
[
"city"
]
=
trim
(
$params
[
'city'
]);
...
@@ -212,16 +212,22 @@ class Shop extends Basic
...
@@ -212,16 +212,22 @@ class Shop extends Basic
$result
[
$key
][
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
$result
[
$key
][
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
$result
[
$key
][
"rent_price"
]
=
$val
[
"rent_price"
]
*
0.01
;
$result
[
$key
][
"rent_price"
]
=
$val
[
"rent_price"
]
*
0.01
;
$result
[
$key
][
"images"
]
=
[];
$result
[
$key
][
"images"
]
=
[];
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]);
$param
[
"img_status"
]
=
0
;
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
if
(
empty
(
$val
[
'is_show_image'
]))
{
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]);
$param
[
"img_status"
]
=
0
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
}
else
{
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
}
}
}
if
(
$params
[
'site_area'
]
==
6
)
{
if
(
$params
[
'site_area'
]
==
6
)
{
...
@@ -321,7 +327,7 @@ class Shop extends Basic
...
@@ -321,7 +327,7 @@ class Shop extends Basic
b.enter_num,b.external_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.enter_num,b.external_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule,b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule,b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,
b.area_width,b.depth,b.electric_quantity,b.voltage,b.exhaust_fume,b.running_water,b.downriver,b.business_scope,b.decoration
b.area_width,b.depth,b.electric_quantity,b.voltage,b.exhaust_fume,b.running_water,b.downriver,b.business_scope,b.decoration
,b.rim_mating,b.section,b.crowd,b.other"
;
,b.rim_mating,b.section,b.crowd,b.other
,a.is_show_image
"
;
$conditions
[
'a.status'
]
=
array
(
"eq"
,
1
);
$conditions
[
'a.status'
]
=
array
(
"eq"
,
1
);
$conditions
[
'a.is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示公开楼盘
$conditions
[
'a.is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示公开楼盘
...
@@ -350,22 +356,24 @@ class Shop extends Basic
...
@@ -350,22 +356,24 @@ class Shop extends Basic
$result
[
"external_slotting_fee"
]
=
$result
[
"external_slotting_fee"
]
*
0.01
;
$result
[
"external_slotting_fee"
]
=
$result
[
"external_slotting_fee"
]
*
0.01
;
}
}
$result
[
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
$result
[
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
//$param["house_id"] = $params['id'];
if
(
empty
(
$result
[
'is_show_image'
]))
{
//todo 这里的是否要更改成b端后台上传的类型
$result
[
"images"
]
=
[];
/* $param["img_type"] = 2;
if
(
$result
[
"external_image_id"
])
{
$result["images"] = $this->gHousesImgModel->getHouseImages($param, 15);
$param
[
"id"
]
=
array
(
"in"
,
$result
[
"external_image_id"
]);
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$param
[
"img_status"
]
=
0
;
$result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1);*/
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$result
[
"images"
]
=
[];
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
);
if
(
$result
[
"external_image_id"
])
{
$result
[
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
$param
[
"id"
]
=
array
(
"in"
,
$result
[
"external_image_id"
]);
}
$param
[
"img_status"
]
=
0
;
}
else
{
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$param
[
"house_id"
]
=
$params
[
'id'
];
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
);
//todo 这里的是否要更改成b端后台上传的类型
$result
[
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
$param
[
"img_type"
]
=
2
;
$result
[
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
15
);
$param
[
"img_type"
]
=
3
;
//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result
[
"plan_images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
}
}
if
(
$result
[
'status'
]
==
0
)
{
if
(
$result
[
'status'
]
==
0
)
{
return
$this
->
response
(
"101"
,
'此楼盘已下架'
);
return
$this
->
response
(
"101"
,
'此楼盘已下架'
);
}
}
...
...
application/model/GHouses.php
View file @
9d1c15e6
...
@@ -741,6 +741,11 @@ class GHouses extends BaseModel
...
@@ -741,6 +741,11 @@ class GHouses extends BaseModel
$save_data
[
'external_address'
]
.=
substr
(
$save_data
[
'internal_address'
],
0
,
strpos
(
$save_data
[
'internal_address'
],
'街'
))
.
'街'
;
$save_data
[
'external_address'
]
.=
substr
(
$save_data
[
'internal_address'
],
0
,
strpos
(
$save_data
[
'internal_address'
],
'街'
))
.
'街'
;
}
}
//是否显示真实图片
if
(
isset
(
$data
[
'is_show_image'
]))
{
$save_data
[
'is_show_image'
]
=
$data
[
'is_show_image'
];
}
if
(
empty
(
$data
[
'id'
]))
{
if
(
empty
(
$data
[
'id'
]))
{
$save_data
[
'upload_id'
]
=
$agent_id
;
//上传人
$save_data
[
'upload_id'
]
=
$agent_id
;
//上传人
$save_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
$save_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
);
...
...
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