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
7f4df085
Commit
7f4df085
authored
Apr 15, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情页时间显示
parent
8bc2d7c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
Shop.php
application/api_broker/controller/Shop.php
+23
-14
No files found.
application/api_broker/controller/Shop.php
View file @
7f4df085
...
@@ -191,12 +191,12 @@ class Shop extends Basic
...
@@ -191,12 +191,12 @@ class Shop extends Basic
public
function
getShopDetail
()
public
function
getShopDetail
()
{
{
/*
$params = array(
$params
=
array
(
"id" => 14
,
"id"
=>
445
,
"site_area" => 3, //1.c端 3.b端
"site_area"
=>
3
,
//1.c端 3.b端
"user_id"
=> 2 //if c端 用户登录后传入user_id
"user_id"
=>
2
//if c端 用户登录后传入user_id
);*/
);
$params
=
$this
->
params
;
//
$params = $this->params;
$conditions
=
[];
$conditions
=
[];
if
(
empty
(
$params
[
'id'
]))
{
if
(
empty
(
$params
[
'id'
]))
{
...
@@ -226,14 +226,23 @@ class Shop extends Basic
...
@@ -226,14 +226,23 @@ class Shop extends Basic
$conditions
[
'a.id'
]
=
array
(
"eq"
,
$params
[
"id"
]
);
$conditions
[
'a.id'
]
=
array
(
"eq"
,
$params
[
"id"
]
);
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
$result
[
"rent_price"
]
=
$result
[
"rent_price"
]
*
0.01
;
$result
[
"management_fee"
]
=
$result
[
"management_fee"
]
*
0.01
;
if
(
$result
[
"start_business_date"
]
==
"0000-00-00 00:00:00"
||
empty
(
$result
[
"start_business_date"
]))
{
$result
[
"slotting_fee"
]
=
$result
[
"slotting_fee"
]
*
0.01
;
$result
[
"start_business_date"
]
=
""
;
$result
[
"start_business_date"
]
=
empty
(
$result
[
"start_business_date"
])
?
""
:
date
(
"Y-m-d"
,
strtotime
(
$result
[
"start_business_date"
]));
}
else
{
$result
[
"opening_date"
]
=
empty
(
$result
[
"start_business_date"
])
?
""
:
date
(
"Y-m-d"
,
strtotime
(
$result
[
"opening_date"
]));
$result
[
"start_business_date"
]
=
date
(
"Y-m-d"
,
strtotime
(
$result
[
"start_business_date"
]));
$result
[
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
}
$param
[
"house_id"
]
=
$params
[
'id'
];
if
(
$result
[
"opening_date"
]
==
"0000-00-00 00:00:00"
||
empty
(
$result
[
"opening_date"
]))
{
$result
[
"opening_date"
]
=
""
;
}
else
{
$result
[
"opening_date"
]
=
date
(
"Y-m-d"
,
strtotime
(
$result
[
"opening_date"
]));
}
$result
[
"rent_price"
]
=
$result
[
"rent_price"
]
*
0.01
;
$result
[
"management_fee"
]
=
$result
[
"management_fee"
]
*
0.01
;
$result
[
"slotting_fee"
]
=
$result
[
"slotting_fee"
]
*
0.01
;
$result
[
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$param
[
"house_id"
]
=
$params
[
'id'
];
//todo 这里的是否要更改成b端后台上传的类型
//todo 这里的是否要更改成b端后台上传的类型
$param
[
"img_type"
]
=
2
;
$param
[
"img_type"
]
=
2
;
$result
[
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
15
);
$result
[
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
15
);
...
...
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