Ejemplo n.º 1
0
 public function get_view()
 {
     //城市id
     $CityId = $this->get_param("CityId");
     //域名拼装
     $city_set = APF::get_instance()->get_config("city_set", "multicity");
     $base_domain = APF::get_instance()->get_config("anjuke_base_domain");
     $this->assign_data("ajkBaseDomain", "http://my." . $base_domain);
     //获取uri路径
     $uri = APF::get_instance()->get_request()->get_request_uri();
     $this->assign_data("uri", $uri);
     $this->assign_data("CityUriPrefix", "http://" . $city_set[$CityId]['pinyin'] . "." . $base_domain);
     //设置商业地产商铺,楼盘专业度城市列表
     $this->set_city_list();
     $this->cityId = $CityId;
     //明星中介相关
     try {
         apf_require_class('Bll_Broker_StarIntermediary');
         $starBll = new Bll_Broker_StarIntermediary($CityId);
         $this->starIsOpen = $starBll->checkCityIfOpen();
         $brokerId = APF::get_instance()->get_request()->getBrokerId();
         $starInfo = $starBll->getBrokerNewestInfo($brokerId);
         if (empty($starInfo['broker'])) {
             $this->starIsOpen = 0;
         }
     } catch (Exception $e) {
         //todo 不做任何处理,不展示明星中介内容
     }
     return "BrokerShareHeader";
 }
Ejemplo n.º 2
0
 public function handle_request_internal()
 {
     $request = APF::get_instance()->get_request();
     $brokerId = self::$BrokerInfo['BaseInfo']['BROKERID'];
     $cityId = self::$BrokerInfo['BaseInfo']['CITYID'];
     try {
         $starBll = new Bll_Broker_StarIntermediary($cityId);
         $starIsOpen = $starBll->checkCityIfOpen();
         if ($starIsOpen) {
             $starInfo = $starBll->getBrokerNewestInfo($brokerId);
             $brokerScore = $starInfo['broker']['brokerScore'] ?: 0;
             $maxScore = $starInfo['city']['cityScore'] ?: 0;
             $leftScore = $maxScore - $brokerScore > 0 ? $maxScore - $brokerScore : 0;
             $clickScoreRate = sprintf("%.1f", $starInfo['city']['vppvBeishu'] ?: 0);
             $isStar = $starInfo['broker']['isMingxing'] ?: 0;
             $request->set_attribute('brokerScore', $brokerScore);
             $request->set_attribute('maxScore', $maxScore);
             $request->set_attribute('leftScore', $leftScore);
             $request->set_attribute('clickScoreRate', $clickScoreRate);
             $request->set_attribute('isStar', $isStar);
         } else {
             //todo 产品没有定义错误页面,工期太赶,没有时间处理
             return;
         }
     } catch (Exception $e) {
         //todo 不做任何处理
         return;
     }
     return "Broker_StarIntermediary";
 }
Ejemplo n.º 3
0
 public function get_view()
 {
     $params = $this->get_params();
     $this->assign_data('menu', $params['menu']);
     $this->assign_data('index', $params['index']);
     //添加商业地产店铺城市列表
     $this->set_city_list();
     $this->assign_data('managespace_city_list', $this->managespace_city_list);
     $request = APF::get_instance()->get_request();
     $cityId = $request->getBrokerCityId();
     $this->assign_data('cityId', $cityId);
     $this->assign_data('isNewCommunityApplyCity', Bll_City::isNewCommunityApplyCity($cityId));
     //明星中介相关
     try {
         apf_require_class('Bll_Broker_StarIntermediary');
         $starBll = new Bll_Broker_StarIntermediary($cityId);
         $starIsOpen = $starBll->checkCityIfOpen();
         $brokerId = APF::get_instance()->get_request()->getBrokerId();
         $starInfo = $starBll->getBrokerNewestInfo($brokerId);
         if (empty($starInfo['broker'])) {
             $starIsOpen = 0;
         }
         $this->assign_data('starIsOpen', $starIsOpen);
     } catch (Exception $e) {
         //todo 不做任何处理,不展示明星中介内容
     }
     return "BrokerSideNav";
 }