public function handle_request_internal() { header("Access-Control-Allow-Origin: *"); $userMobile = $this->_params['userMobile']; //检测电话号码格式是否正确 if (strlen($userMobile) != 11) { throw new Exception_Broker_BrokerMobileFormatError('电话号码格式错误', Const_APIStatus::E_BROKER_MOBILE_FORMAT_ERROR); } $brokerInfo = Model_Broker_AjkBrokerExtend::getBrokerInfoByMobile($userMobile); if (!$brokerInfo) { throw new Exception_Broker_BrokerNotVerified('经纪人不存在', Const_APIStatus::E_BROKER_MOBILE_SEARCH_ERROR); } if ($brokerInfo->checkState != 1) { throw new Exception_BrokerNotFoundException('经纪人审核未通过', Const_APIStatus::E_BROKER_MOBILE_SEARCH_NOT_VERIFIED); } //查询微聊信息 $chatInfo = Bll_Mobile_ChatInfoBll::getInstance()->onlyGetChatInfo($brokerInfo->brokerId); $re = array(); $re['brokerId'] = $brokerInfo->brokerId; $re['companyInfo'] = $brokerInfo->company; $re['trueName'] = $brokerInfo->trueName; $re['userMobile'] = $brokerInfo->userMobile; $re['userPhoto'] = Util_ImageUtils::get_broker_photo_url($brokerInfo->userPhoto, '200x200'); $re['chatId'] = $chatInfo['data']['chatId']; $re['twoCodeIcon'] = $chatInfo['data']['twoCodeIcon']; return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => $re); }