Exemplo n.º 1
0
 public function getPage()
 {
     $this->setAttribute('act', $this->action);
     $this->setAttribute('isComboBroker', $this->isComboBroker);
     $this->setAttribute('isPpcBroker', $this->isPpcBroker);
     /** 上海不显示小区图库 */
     $this->setAttribute('isShowCommPic', static::$intBrokerCityID == 11 ? 0 : 1);
     $this->setAttribute('showMark', static::$intBrokerCityID == Const_MultiCity::CITY_ID_LANZHOU);
     /**
      * 初始化页面基本数据
      */
     if ($this->action == 'publish') {
         if ($this->isPpcBroker) {
             $fixPlanList = BLL_Plan_EsfPropFixedPlanRelation::getBrokerValidPlan(static::$intBrokerID);
             if (empty($fixPlanList)) {
                 $fixPlanId = Bll_Ppc_ServiceAPI::createFixPlan(static::$intBrokerID, '定价', 100000, 1, 21181);
             } else {
                 $fixPlanId = $fixPlanList[0]['id'];
             }
             $this->setAttribute('fixPlanId', $fixPlanId);
         }
         $pageParams = Bll_House_EsfPublish::preparePageParam(static::$intBrokerID, static::$intBrokerCityID, $this->request);
         $this->setAttributes($pageParams);
         return 'House_PublishAjk';
     }
     if ($this->action == 'edit') {
         try {
             $pageParams = Bll_House_EsfEdit::preparePageParam(static::$intBrokerID, static::$intBrokerCityID, $this->houseId, $this->request);
             /** 违规房源不可以编辑 */
             if (isset($pageParams['houseInfo']['isIllegal']) && $pageParams['houseInfo']['isIllegal']) {
                 $this->redirect2Result(Const_PublishCode::UNKNOWN_ERROR, 'ajk', 'edit', $this->houseId, '已违规房源不可编辑');
             }
             $this->setAttributes($pageParams);
             return 'House_EditAjk';
         } catch (Exception $e) {
             $this->redirect2Result(Const_PublishCode::API_ERROR, 'ajk', 'edit', $this->houseId, $e->getMessage());
         }
     }
     if ($this->action == 'commission') {
         try {
             $pageParams = Bll_House_EsfCommission::preparePageParam(static::$intBrokerID, static::$intBrokerCityID, $this->commissionId, $this->request);
             $this->setAttributes($pageParams);
             return 'House_CommissionAjk';
         } catch (Exception $e) {
             $this->redirect2Result($e->getCode(), 'ajk', 'commission', $this->commissionId, $e->getMessage());
         }
     }
     return 'House_PublishAjk';
 }