Commit 7f4df085 authored by clone's avatar clone

详情页时间显示

parent 8bc2d7c9
...@@ -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'])) {
...@@ -227,11 +227,20 @@ class Shop extends Basic ...@@ -227,11 +227,20 @@ class Shop extends Basic
$result = $this->gHousesModel->getHouseDetailById($field, $conditions); $result = $this->gHousesModel->getHouseDetailById($field, $conditions);
if ($result["start_business_date"] == "0000-00-00 00:00:00" || empty($result["start_business_date"])) {
$result["start_business_date"] = "";
} else {
$result["start_business_date"] = date("Y-m-d", strtotime($result["start_business_date"]));
}
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["rent_price"] = $result["rent_price"] * 0.01;
$result["management_fee"] = $result["management_fee"] * 0.01; $result["management_fee"] = $result["management_fee"] * 0.01;
$result["slotting_fee"] = $result["slotting_fee"] * 0.01; $result["slotting_fee"] = $result["slotting_fee"] * 0.01;
$result["start_business_date"] = empty($result["start_business_date"]) ? "" : date("Y-m-d", strtotime($result["start_business_date"]));
$result["opening_date"] = empty($result["start_business_date"]) ? "" : date("Y-m-d", strtotime($result["opening_date"]));
$result["api_path"] = CK_IMG_URL . 'images/'; $result["api_path"] = CK_IMG_URL . 'images/';
$param["house_id"] = $params['id']; $param["house_id"] = $params['id'];
//todo 这里的是否要更改成b端后台上传的类型 //todo 这里的是否要更改成b端后台上传的类型
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment