예제 #1
0
 public function handle_request_internal()
 {
     $brokerId = $this->_params['brokerId'];
     $url = 'haopan/unRecommendProp/' . $brokerId . '/1';
     $data = Util_CallAPI::get_data_from_java_v3($url);
     mb_internal_encoding('UTF-8');
     if ($data['data']['status'] === 'ok') {
         if (!isset($data['data']['propBaseInfo'])) {
             $ret = array('status' => 'ok', 'data' => array('propertyList' => array()));
             return $ret;
         }
         $props = array();
         if (!empty($data['data']['propBaseInfo'])) {
             foreach ($data['data']['propBaseInfo'] as $info) {
                 list($room, $hall, $wc) = $this->get_house_unit($info['housUnits']);
                 $propInfo = Bll_Prop::get_ajk_prop_info($info['propId']);
                 $tmp = array('id' => $info['propId'], 'title' => $info['title'], 'commName' => $info['commName'], 'roomNum' => $room, 'hallNum' => $hall, 'toiletNum' => $wc, 'area' => $propInfo['AREANUM'], 'price' => $info['price'] / 10000, 'priceUnit' => '万', 'ImgNum' => $info['propImgNum'], 'isMoreImg' => $propInfo['ISHIGHQULITY']);
                 $props['propertyList'][] = $tmp;
             }
         }
         $ret = array('status' => 'ok', 'data' => $props);
     } else {
         $ret = Util_MobileAPI::error(Const_APIStatus::E_CALL_API_ERROR);
     }
     return $ret;
 }