{{info}}
{{msg}}
  
  1. /**
  2. * 新房详情 详情
  3. * @param Response $response
  4. * @param Search $search
  5. * @return string
  6. */
  7. public function detail(Response $response,Request $request, Search $search)
  8. {
  9. $house_detail = House::find(['id'=>$search->value(),'status'=>1]);
  10. $house_detail->loadPrice();
  11. $house_detail->loadHouseProjectTags();
  12. $house_detail->loadHousePosition();
  13. $house_detail->loadHouseSales();
  14. $house_detail->loadTagArray();
  15. $house_detail->loadHuxingShi();
  16. $house_detail->loadLicence();
  17. //对象转数组
  18. //$house_data = json_decode(json_encode($house_detail),true);
  19. //获取区域列表数据
  20. $area = Area::select()->where('pid',0)->where('status',1)->findAll();
  21. $licence_count = count($house_detail->licence);
  22. $certificate_time_is_show = 1;
  23. $domain = $request -> host();
  24. if($domain == 'czxxg1.house.sapp.magcloud.net' || $domain == 'fc.sz0575.com'){
  25. $certificate_time_is_show = 2;
  26. }
  27. $response->assign('area',$area);
  28. $response->assign('house',$house_detail);
  29. $response->assign('licence_count',$licence_count);
  30. $response->assign('certificate_time_is_show',$certificate_time_is_show);
  31. $response->assign('house_id',$search -> value());
  32. $response->assign('active', 'news_detail');
  33. return '/news/detail';
  34. }
  35. /**
  36. * 新房详情 户型
  37. * @param Request $request,
  38. * @param Response $response
  39. * @param Search $search
trace调用栈
    
  1. app\house\pc\controller\NewsController->detail(...)
  2. ReflectionMethod->invokeArgs(...)
  3. rap\web\mvc\HandlerAdapter->invokeRequest(...)
  4. rap\web\mvc\ControllerHandlerAdapter->handle(...)
  5. rap\web\mvc\Dispatcher->doDispatch(...)
  6. rap\web\Application->start(...)
  7. require(...)