Commit ffb53817 authored by clone's avatar clone

1

parent 6737730a
......@@ -56,11 +56,11 @@ class ShopService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getShopDetail($field, $conditions,$site_area,$user_id,$type)
public function getShopDetail($field, $conditions, $site_area, $user_id, $type)
{
$result = $this->gHousesModel->getHouseDetailById($field, $conditions);
if(!$result || $result['status'] == 0){
if (!$result || $result['status'] == 0) {
return null;
}
if ($result["start_business_date"] == "0000-00-00 00:00:00" || empty($result["start_business_date"])) {
......@@ -90,8 +90,8 @@ class ShopService
$result["images"] = count($res) > 0 ? $res : [];
}
} else {
$result["api_path"] = CK_IMG_URL . 'images/';
$param["house_id"] = $result['id'];
$result["api_path"] = CK_IMG_URL . 'images/';
$param["house_id"] = $result['id'];
$param["img_type"] = 2;
$result["images"] = $this->gHousesImgModel->getHouseImages($param, 15);
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
......@@ -130,7 +130,9 @@ class ShopService
$result['shop_videos'] = $s_house->getHouseVideoList($result["id"]);
$result['shop_videos_length'] = $s_house->getHouseVideoLength();
$this->lookShopService_->addUserLookShop((int)$user_id ,(int)$result["id"], $type);
return $result;
if ($user_id > 0) {
$this->lookShopService_->addUserLookShop((int)$user_id, (int)$result["id"], $type);
}
return $result;
}
}
\ No newline at end of file
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