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'])) {
...@@ -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);
......
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