コード例 #1
0
ファイル: QuerySug.php プロジェクト: drehere/shenmegui
 public function queryFromSug(&$arrData)
 {
     //sug接口wiki:http://wiki.babel.baidu.com/twiki/bin/view/Ps/Rank/InterActionTopic/OpensugInterfaceIntroduction
     //json=1表示返回标准的json格式数据
     //cb=空 表示返回的数据中没有“window.baidu.sug”回调
     $arrUrlParams = array();
     $strReferWord = '';
     if (!empty($arrData['uiData']['queryinfo']['refer'])) {
         $strUrlParams = parse_url($arrData['uiData']['queryinfo']['refer'], PHP_URL_QUERY);
         if (!empty($strUrlParams)) {
             parse_str($strUrlParams, $arrUrlParams);
             if (!empty($arrUrlParams)) {
                 $strReferWord = isset($arrUrlParams['wd']) ? $arrUrlParams['wd'] : (isset($arrUrlParams['word']) ? $arrUrlParams['word'] : (isset($arrUrlParams['w']) ? $arrUrlParams['w'] : ''));
             }
         }
     }
     $arrHeader['pathinfo'] = 'su';
     $arrHeader['querystring'] = 'wd=' . $arrData['uiData']['queryInfo']['queryWord'] . "&ie=utf-8&json=2&cb=";
     $arrHeader['Referer'] = $_SERVER['HTTP_REFERER'];
     $arrHeader['Cookie'] = $_SERVER['HTTP_COOKIE'];
     $arrData['uiData']['queryInfo']['isParams']['sug_status'] = SUG_STATUS_NORMAL;
     $arrSugInfo = array();
     if (!isset($_ENV['HHVM'])) {
         ral_set_logid(CLog::logId());
         $ret = ral('sug', 'get', '', Volatile::rand(), $arrHeader);
     } else {
         $ral = new RalClass();
         $ral->ral_set_logid(CLog::logId());
         $ret = $ral->ral_curl_sug('sug', '', $arrHeader);
     }
     //ral请求失败
     if ($ret === false) {
         $arrData['uiData']['queryInfo']['isParams']['sug_status'] = SUG_STATUS_RAL_ERROR;
         return $arrSugInfo;
     }
     $arrRst = json_decode($ret, true);
     //json_decode失败
     if ($arrRst === false) {
         $arrData['uiData']['queryInfo']['isParams']['sug_status'] = SUG_STATUS_JSON_FAIL;
         return $arrSugInfo;
     }
     if (empty($arrRst['q'])) {
         $arrData['uiData']['queryInfo']['isParams']['sug_status'] = SUG_STATUS_ERROR_REQ;
         return $arrSugInfo;
     }
     //sug为空
     if (empty($arrRst['s']) || !is_array($arrRst['s'])) {
         $arrData['uiData']['queryInfo']['isParams']['sug_status'] = SUG_STATUS_NO_SUG;
         return $arrSugInfo;
     }
     $arrSugInfo = $arrRst['s'];
     return $arrSugInfo;
 }
コード例 #2
0
ファイル: PbUrlLog.php プロジェクト: drehere/shenmegui
 public function log($arrData, $intType = 0)
 {
     if (empty($arrData) || $arrData['uiControl']['type'] != 'www') {
         return;
     }
     $arrQueryInfo = $arrData['uiData']['queryInfo'];
     $arrResult = $arrData['uiData']['asResult'];
     // Consider midpage displayed 20 result per page as default,Here we set
     // the threshold from PB_PAGESIZE to PB_PAGESIZE*2
     if ($arrQueryInfo['resNum'] > 2 * $GLOBALS['URLLOG']['PB_PAGESIZE'] || $arrQueryInfo['pageNo'] > 2 || $arrResult['asResultNum'] < 0) {
         return;
     }
     $this->BaiduLog->setProduct(ProductID::PS);
     $this->BaiduLog->setTimestamp(b2log_get_timestamp());
     $this->BaiduLog->setLogid(CLog::logId());
     $BaiduIs = new BaiduIs();
     if ($intType === 1) {
         $BaiduIs->setMod($arrQueryInfo['isParams']['mod']);
         $BaiduIs->setCqid($arrQueryInfo['isParams']['cqid']);
         $BaiduIs->setIsid($arrQueryInfo['isParams']['isid']);
         $BaiduIs->setChk($arrQueryInfo['isParams']['chk']);
         $BaiduIs->setIsBd($arrQueryInfo['isParams']['isbd']);
         $this->BaiduLog->setBaiduis($BaiduIs);
     }
     // 高可信se置换后,日志里仍然打印原始query
     if ($arrQueryInfo['superSeFlag'] == 1) {
         $this->BaiduLog->setQuery($arrQueryInfo['queryWordBak']);
     } else {
         $this->BaiduLog->setQuery($arrQueryInfo['queryWord']);
     }
     $this->addQueryInfo($arrData);
     $this->addUrlInfos($arrData);
     $logInfo = $this->BaiduLog->serialize();
     $strLogFile = $intType === 1 ? 'pre_pbUrl' : 'pbUrl';
     $ret = b2log_write($strLogFile, $logInfo);
 }
コード例 #3
0
ファイル: QueryUS.php プロジェクト: drehere/shenmegui
 public function queryFromUs($arrData)
 {
     $arrQueryInfo = $arrData['uiData']['queryInfo'];
     $arrSessionInfo = $arrData['uiData']['passport'];
     $arrControlInfo = $arrData['uiControl'];
     // 传递给us的数据结构
     $objQuery = new QueryUSInfo();
     $objQuery->time = time();
     $objQuery->word = $arrQueryInfo['queryWord'];
     $objQuery->wordNoSyntax = $arrQueryInfo['wordNoSyntax'];
     $objQuery->otherResultQuery = $arrQueryInfo['otherResultQuery'];
     $objQuery->ip = $arrQueryInfo['ip'];
     if ($arrQueryInfo['interPage'] > 0) {
         $objQuery->isInterPage = 1;
     } else {
         $objQuery->isInterPage = 0;
     }
     if ($arrQueryInfo['bwsRetry'] > 0) {
         $objQuery->isBwsRetry = 1;
     } else {
         $objQuery->isBwsRetry = 0;
     }
     $objQuery->preference = $arrQueryInfo['preference'];
     $objQuery->passportUserName = $arrSessionInfo['passportUserName'];
     if (!empty($arrQueryInfo['JpAlaPre'])) {
         $objQuery->JpAlaPre = $arrQueryInfo['JpAlaPre'];
     }
     $objQuery->codeType = $arrQueryInfo['originCodeType'] & ~(DICT_SEARCH_BIT | MON_BIT | NEWS_SEARCH_BIT | BAIDU_REFER_BIT | TITLE_SEARCH_BIT | AUTHOR_SEARCH_BIT);
     if (($arrQueryInfo['isDebug'] && intval($arrData['uiData']['templateConfig']['debug'])) > 0) {
         $objQuery->isDebug = 1;
     } else {
         $objQuery->isDebug = 0;
     }
     $objQuery->strategyName = $arrQueryInfo['strategyName'];
     $objQuery->siteName = $arrQueryInfo['siteName'];
     $objQuery->lastModified = $arrQueryInfo['lastModified'];
     $strTemplateNameMod = null;
     if (!empty($arrControlInfo['templateName']) && $arrControlInfo['platform'] !== $GLOBALS['DEFAULT_PLATFORM']) {
         $strTemplateNameMod = 'baidu' . $arrQueryInfo['dspName'];
     }
     if (empty($strTemplateNameMod)) {
         $objQuery->templateName = $arrControlInfo['templateName'];
     } else {
         $objQuery->templateName = $strTemplateNameMod;
     }
     $objQuery->sid = $arrQueryInfo['samplingId'];
     $objQuery->cookie = $arrQueryInfo['baiduId'];
     $objQuery->needsp = $arrQueryInfo['needSp'];
     $objQuery->pageNo = $arrQueryInfo['pageNo'];
     $objQuery->queryId = $arrQueryInfo['queryIdInt'];
     $objQuery->beforeQueryId = $arrQueryInfo['beforeQueryId'];
     $objQuery->beforeUrl = $arrQueryInfo['beforeUrl'];
     $objQuery->accountName = $arrQueryInfo['accountName'];
     $objQuery->isContCluster = $arrQueryInfo['isContMirror'];
     $objQuery->isSiteCluster = $arrQueryInfo['isSiteCluster'];
     $intPageNum = 0;
     if ($arrQueryInfo['pageNo'] == 1 || $arrQueryInfo['pageNo'] == 2 && $arrQueryInfo['resNum'] == 10) {
         $intPageNum = $arrQueryInfo['pageNum'];
     } else {
         $intPageNum = $arrQueryInfo['pageNum'] - $arrQueryInfo['usm'];
     }
     if ($intPageNum < 0) {
         $intPageNum = 0;
     }
     if ($intPageNum >= MAX_OUTPUT_NUM) {
         $intPageNum = 750;
     }
     $objQuery->pageNum = $intPageNum;
     $objQuery->resNum = $arrQueryInfo['resNum'];
     $objQuery->resultLang = $arrQueryInfo['resultLang'];
     $objQuery->resultLocale = $arrQueryInfo['resultLocale'];
     $strUrlParam = self::filterParamFromUrl($arrQueryInfo['urlParam'], WENKU_WAP_PC_KEY);
     if (!empty($strUrlParam) && !empty($arrQueryInfo['wenkuUrlPara'])) {
         $strUrlParam .= '&' . $arrQueryInfo['wenkuUrlPara'];
     }
     $objQuery->urlParam = $strUrlParam;
     $objQuery->requestCode = $arrQueryInfo['requestCode'];
     $objQuery->usm = $arrQueryInfo['usm'];
     $objQuery->UrlParaPack = self::packUrlParam($strUrlParam, $arrQueryInfo['postData'], $strTemplateNameMod, $arrQueryInfo['cookieInfo']);
     if (PROTECTPP_SWITCH_OPEN == $arrQueryInfo['resLimitSwitch']) {
         $objQuery->enalbeModifyUsm = 1;
     } else {
         $objQuery->enalbeModifyUsm = 0;
     }
     $intCommand = 0;
     for ($intI = 0; $intI < DA_RES_COUNT; $intI++) {
         $intCommand |= $arrQueryInfo['daResource'][$intI];
     }
     $objQuery->template_rsse_command = $intCommand;
     $objQuery->need_open_disphilight = $arrQueryInfo['need_open_disphilight'];
     $objQuery->need_RsSE_result = $arrQueryInfo['needRsSeResult'];
     $objQuery->need_ers_result = $arrQueryInfo['needERSResult'];
     $objQuery->need_asp_result = $arrQueryInfo['needASPResult'];
     $objQuery->need_as_result = $arrQueryInfo['need_as_result'];
     $objQuery->preQueryWord = $arrQueryInfo['preQueryWord'];
     $objQuery->querySource = $arrQueryInfo['querySource'];
     $objQuery->isInternalFlow = $arrQueryInfo['isInternalFlow'];
     $objQuery->srcId = $arrQueryInfo['srcId'];
     $objQuery->templateForRs = $arrQueryInfo['templateForRs'];
     $objQuery->beforeQueryId = $arrQueryInfo['beforeQueryId'];
     $objQuery->noscript = $arrQueryInfo['noscript'];
     $objQuery->cookieNoscript = $arrQueryInfo['cookieNoscript'];
     $objQuery->channel = $arrQueryInfo['channel'];
     $objQuery->rsPos = $arrQueryInfo['rsPos'];
     $objQuery->platformName = $arrControlInfo['platform'];
     $objQuery->is_bws_re = $arrQueryInfo['is_bws_re'];
     $objQuery->useragent_full = $arrQueryInfo['useragent_full'];
     $objQuery->confuse_Switch = $arrQueryInfo['confuse_Switch'];
     $objQuery->protectNum = $arrQueryInfo['protectNum'];
     $objQuery->ec_src = $arrQueryInfo['ec_src'];
     $objQuery->php_default_platform = $GLOBALS['DEFAULT_PLATFORM'];
     $objQuery->dspName = $arrQueryInfo['dspName'];
     $objQuery->ipv6Address = $arrQueryInfo['ipv6Address'];
     $objQuery->refer = $arrQueryInfo['refer'];
     $objQuery->needProtect = $arrQueryInfo['needProtect'];
     $objQuery->protectPPSwitch = $arrQueryInfo['protectPPSwitch'];
     $objQuery->nojc = $arrQueryInfo['nojc'];
     $objQuery->super_se_flag = $arrQueryInfo['superSeFlag'];
     $objQuery->isContainPunc = $arrQueryInfo['isContainPunc'];
     $objQuery->wordNoPunc = $arrQueryInfo['wordNoPunc'];
     $objQuery->clusterMod = $arrQueryInfo['clusterMod'];
     $objQuery->wordEnc = $arrQueryInfo['wordEnc'];
     $objQuery->extraStr = $arrQueryInfo['extraStr'];
     $objQuery->strategy_state = $arrQueryInfo['strategyState'];
     $objQuery->prompt_flag = $arrQueryInfo['promptUsOpen'];
     $objQuery->passport_user_id = $arrSessionInfo['passportUserId'];
     $objQuery->need_interleaving = $arrQueryInfo['need_interleaving'];
     $objQuery->comeFrom = $arrQueryInfo['comeFrom'];
     if (!empty($arrQueryInfo['country'])) {
         $objQuery->country_str = $arrQueryInfo['country'];
     }
     $objQuery->is_sample_template = isset($arrQueryInfo['is_sample_template']) ? intval($arrQueryInfo['is_sample_template']) : 0;
     $objQuery->superseSwitch = isset($arrQueryInfo['superseSwitch']) ? intval($arrQueryInfo['superseSwitch']) : 1;
     $objQuery->query_lang = $arrQueryInfo['query_lang'];
     $objQuery->displayLang = $arrControlInfo['language'];
     if (isset($arrQueryInfo['isParams'])) {
         if ($arrQueryInfo['isParams']['mod'] === IS_PRE_DICT_REQ) {
             if (!empty($arrQueryInfo['isParams']['hsug'])) {
                 $objQuery->hsug = $arrQueryInfo['isParams']['hsug'];
             }
             if (!empty($arrQueryInfo['isParams']['sug'])) {
                 $objQuery->sug = $arrQueryInfo['isParams']['sug'];
             }
             if (!empty($arrQueryInfo['isParams']['clist'])) {
                 $objQuery->clist = $arrQueryInfo['isParams']['clist'];
             }
         }
         $objQuery->mod = $arrQueryInfo['isParams']['mod'];
         $objQuery->cqid = empty($arrQueryInfo['isParams']['cqid']) ? '0' : $arrQueryInfo['isParams']['cqid'];
         $objQuery->isid = empty($arrQueryInfo['isParams']['isid']) ? '0' : $arrQueryInfo['isParams']['isid'];
         $objQuery->chk = empty($arrQueryInfo['isParams']['chk']) ? '0' : $arrQueryInfo['isParams']['chk'];
         if (in_array($objQuery->mod, array(IS_PRE_REQ, IS_PRE_DICT_REQ)) && in_array($objQuery->word, array('baidu', '百度'))) {
             $objQuery->f4s = 1;
         } else {
             $objQuery->f4s = $arrQueryInfo['isParams']['f4s'];
         }
         $objQuery->isbd = $arrQueryInfo['isParams']['isbd'];
         $objQuery->csq = intval($arrQueryInfo['isParams']['csq']);
         $objQuery->pstg = intval($arrQueryInfo['isParams']['pstg']);
         $objQuery->isDebugSwitch = intval($arrQueryInfo['isDebugSwitch']);
     }
     // User Agent相关字段, by chenjinsheng@baidu.com, 2013-07-08
     if (!empty($arrQueryInfo['userAgent'])) {
         list($resx, $resy) = @explode('x', $arrQueryInfo['userAgent']['resolution']);
         $arrUaInfo = array('ua_os' => $arrQueryInfo['userAgent']['os'], 'ua_browser' => $arrQueryInfo['userAgent']['browser'], 'ua_modal' => $arrQueryInfo['userAgent']['modal'], 'ua_measure' => $arrQueryInfo['userAgent']['measure'], 'ua_res_x' => $resx, 'ua_res_y' => $resy);
         $arrExpFields = Bd_Conf::getConf('tpl_uaadaptation/UA_DICT_EXPLICIT');
         $arrExpFields = array_keys($arrExpFields);
         foreach ($arrExpFields as $filed) {
             unset($arrQueryInfo['userAgent'][$filed]);
         }
         if (!empty($arrQueryInfo['userAgent'])) {
             $objUaFields = Util::mcpack_normal($arrQueryInfo['userAgent']);
             $strUaFields = mc_pack_array2pack($objUaFields);
             $arrUaInfo['ua_ext'] = $strUaFields;
         }
         $objQuery->uaInfo = $arrUaInfo;
     }
     $arrQuery = $objQuery->toArray();
     $arrQuery = Util::mcpack_normal($arrQuery);
     foreach ($arrQuery as $key => $value) {
         if (in_array($key, array('cookie', 'beforeUrl', 'UrlParaPack', 'JpAlaPre'))) {
             $arrQuery['(raw)' . $key] = $value;
             unset($arrQuery[$key]);
         }
     }
     if (!isset($_ENV['HHVM'])) {
         ral_set_logid(CLog::logId());
         $ret = ral('us', 'us', $arrQuery, Volatile::rand());
         if ($ret === false) {
             $intErrno = ral_get_errno();
             CLog::fatal('Fail to connect us, errNo:' . $intErrno, $GLOBALS['logArr']);
         }
     } else {
         $ral = new RalClass();
         $ral->ral_set_logid(CLog::logId());
         $ret = $ral->ral('us', 'us', $arrQuery, Volatile::rand());
         if ($ret === false) {
             $intErrno = $ral->ral_get_errno();
             $strErrmsg = $ral->ral_get_error($intErrno);
             CLog::fatal('Fail to connect us, errNo:' . $intErrno . 'errMsg: ' . $strErrmsg, $GLOBALS['logArr']);
         }
     }
     return $ret;
 }
コード例 #4
0
ファイル: smarty_render.php プロジェクト: drehere/shenmegui
/**
 * 数据预处理(先只针对pc模板)
 * @param unknown_type $data
 * @param unknown_type 阿拉丁数据
 * @param unknown_type 普通结果数据
 */
function pre_render(&$data, &$arrAlaData, &$arrAsData)
{
    $arrCssUi = $data['uiData']['cssUI'];
    require VUI_APP_PATH . '/plugins/modifier.format_result.php';
    $intLogId = CLog::logId();
    //asResult队列
    //FE模板中的逻辑
    $intFlagConfuse = intval($data['uiData']['templateConfig']['confuseResult']);
    $intUseRender = intval($data['uiData']['templateConfig']['useRender']);
    $intIsFavoOn = intval($data['uiData']['templateConfig']['EnableFavo']);
    $bolIsPassportUserLogin = $data['uiData']['passport']['isPassportUserLogin'];
    $strUserName = $data['uiData']['passport']['passportUserName'];
    $strDisplayName = $data['uiData']['passport']['displayname'];
    $strSecureEmail = $data['uiData']['passport']['secureemail'];
    $strSecureMobil = $data['uiData']['passport']['securemobil'];
    $strUserDisplayInfo = strlen($strDisplayName) > 0 ? $strDisplayName : (strlen($strUserName) > 0 ? $strUserName : (strlen($strSecureEmail) > 0 ? $strSecureEmail : $strSecureMobil));
    $intIndex = (intval($data['uiData']['queryInfo']['pageNo']) - 1) * intval($data['uiData']['queryInfo']['resNum']) + 1;
    $arrHintData = array();
    if (!empty($data['uiData']['promptNode'])) {
        foreach ($data['uiData']['promptNode'] as $arrPromptNode) {
            if (!empty($arrPromptNode['promptContent']) && strlen($arrPromptNode['promptContent']) > 4) {
                $arrOnePromptContent = json_decode($arrPromptNode['promptContent'], true);
                $arrHintData = array_merge_recursive($arrHintData, $arrOnePromptContent);
            }
        }
    }
    // 遍历asResult队列
    if (!empty($data['uiData']['asResult']['item']) && is_array($data['uiData']['asResult']['item'])) {
        foreach ($data['uiData']['asResult']['item'] as $intKey => &$item) {
            $arrOneData = array();
            if ($item[comeFrome] == 'AS') {
                if ($intFlagConfuse == 0 && $intUseRender != 0 && !empty($item['dispData']['templateName'])) {
                    $arrExtData = array();
                    $arrExtData['resIndex'] = $intIndex;
                    $arrExtData['isFavoOn'] = $intIsFavoOn == 1 ? $data['uiData']['passport']['isFavoOn'] : false;
                    $arrExtData['hintData'] = $arrHintData;
                    $arrExtData['isUserLogin'] = $data['uiData']['passport']['isPassportUserLogin'];
                    $arrExtData['burstFlag'] = $item['burstFlag'];
                    $arrExtData['cssUI'] = $arrCssUi;
                    $arrExtData['resourceid'] = $item['dispData']['StdStg_new'];
                    $arrExtData['feData']['id'] = $intIndex;
                    $arrExtData['feData']['mu'] = $item['offsetInfo']['url'];
                    $arrExtData['feData']['y'] = $item['identifyStr'];
                    $arrExtData['feData']['rsv_stl'] = $item['dispData']['StdStl'];
                    // as的结果需要进行format_result
                    $item = smarty_modifier_format_result($item);
                    // 添加FE需要的extData信息,FE无需在模板中再添加
                    $item['resultData']['extData'] = $arrExtData;
                    //$strType = 'result';
                    $strType = empty($item['resultData']['tplData']['strategy']['type']) ? 'result' : $item['resultData']['tplData']['strategy']['type'];
                    $strTemplateName = $item['strategy']['tempName'];
                    // 子进程common_render时需要的type字段
                    $arrOneData['render_type'] = $strType;
                    // 子进程common_render时需要的templateName字段
                    $arrOneData['render_template'] = $strTemplateName;
                    // 用于子进程从uiData中取数据时使用
                    // as的直接取$data['uiData'][$strQueueName]['item'][$intQueueId]
                    // aladdin的取$data['uiData'][$strQueueName]['item'][$intQueueId]['dispData']
                    $arrOneData['type'] = 'as';
                    $arrRenderDataDetail = array();
                    // 子进程取数据时,去查找的队列(asResult,leftResult,leftResult,topResult)
                    $arrRenderDataDetail['queueName'] = 'asResult';
                    // 子进程取数据时,队列中的位置
                    $arrRenderDataDetail['queueId'] = $intKey;
                    $arrOneData['render_data'] = $arrRenderDataDetail;
                    // 标识单条结果,用于curl_multi发/取数据,以及后续的数据填充
                    $key = $strType . '_' . $strTemplateName . '_' . $arrRenderDataDetail['queueName'] . '_' . $arrRenderDataDetail['queueId'] . '_' . $intLogId;
                    $item['multi_render_key'] = $key;
                    $arrAsData[$key] = $arrOneData;
                }
            } elseif ($item[comeFrome] == 'SP') {
                #if (!in_array(intval($item ['dispData'] ['StdStg']), array(4, 19, 34, 23)) && $item ['dispData'] ['strategy'] ['tempName'] != 'naturalresult') {
                if ($item['dispData']['strategy']['tempName'] != 'naturalresult') {
                    if (isset($item['dispData']['resultData']['extData'])) {
                        $item['dispData']['resultData']['extData']['feData']['y'] = $item['identifyStr'];
                        $item['dispData']['resultData']['extData']['feData']['mu'] = $item['offsetInfo']['url'];
                        $item['dispData']['resultData']['extData']['feData']['id'] = $intIndex;
                        $item['dispData']['resultData']['extData']['feData']['wrapByAladdin'] = 'true';
                        $item['dispData']['resultData']['extData']['feData']['isUserLogin'] = $bolIsPassportUserLogin;
                        $item['dispData']['resultData']['extData']['feData']['username'] = $strUserName;
                        $item['dispData']['resultData']['extData']['feData']['userDisplayInfo'] = $strUserDisplayInfo;
                        $item['dispData']['resultData']['extData']['feData']['cssUI'] = $arrCssUi;
                        $item['dispData']['resultData']['extData']['feData']['rsv_stl'] = $item['dispData']['StdStl'];
                    }
                    $item['dispData']['resultData']['extData']['burstFlag'] = $item['burstFlag'];
                    if (!empty($item['dispData']['strategy']) && !empty($item['dispData']['strategy']['ctplOrPhp'])) {
                        $strType = empty($item['dispData']['strategy']['type']) ? 'aladdin' : $item['dispData']['strategy']['type'];
                        $strTemplateName = $item['dispData']['strategy']['tempName'];
                        $arrOneData['render_type'] = $strType;
                        $arrOneData['render_template'] = $strTemplateName;
                        $arrRenderDataDetail = array();
                        $arrRenderDataDetail['queueName'] = 'asResult';
                        $arrRenderDataDetail['queueId'] = $intKey;
                        $arrOneData['render_data'] = $arrRenderDataDetail;
                        $key = $strType . '_' . $strTemplateName . '_' . $arrRenderDataDetail['queueName'] . '_' . $arrRenderDataDetail['queueId'] . '_' . $intLogId;
                        $item['dispData']['multi_render_key'] = $key;
                        $arrAlaData[$key] = $arrOneData;
                    }
                }
            } else {
                continue;
            }
            if ($intFlagConfuse == 0) {
                $intIndex++;
            }
        }
    }
    // 左侧队列
    if (!empty($data['uiData']['leftResult']['item']) && is_array($data['uiData']['leftResult']['item'])) {
        foreach ($data['uiData']['leftResult']['item'] as $intKey => &$item) {
            if (isset($item['dispData']['resultData']['extData'])) {
                $item['dispData']['resultData']['extData']['feData']['y'] = $item['identifyStr'];
                $item['dispData']['resultData']['extData']['feData']['mu'] = $item['itemUrl'];
                $item['dispData']['resultData']['extData']['feData']['id'] = $intKey + 1;
                $item['dispData']['resultData']['extData']['feData']['wrapByAladdin'] = 'true';
                $item['dispData']['resultData']['extData']['feData']['fm'] = 'alxl';
                $item['dispData']['resultData']['extData']['feData']['catid'] = $item['dispData']['category_id'];
                $item['dispData']['resultData']['extData']['feData']['cardid'] = $item['dispData']['card_id'];
                $item['dispData']['resultData']['extData']['feData']['ename'] = $item['dispData']['entityname'];
                $item['dispData']['resultData']['extData']['feData']['uri'] = $item['dispData']['uri'];
                $item['dispData']['resultData']['extData']['feData']['cssUI'] = $arrCssUi;
                $item['dispData']['resultData']['extData']['feData']['rsv_stl'] = $item['dispData']['StdStl'];
                $item['dispData']['resultData']['extData']['burstFlag'] = $item['burstFlag'];
            }
            $arrOneData = array();
            $strType = empty($item['dispData']['strategy']['type']) ? 'aladdin' : $item['dispData']['strategy']['type'];
            $strTemplateName = $item['dispData']['strategy']['tempName'];
            $key = md5(serialize($item['dispData'])) . '_' . $strType . '_' . $strTemplateName;
            $arrOneData['render_type'] = $strType;
            $arrOneData['render_template'] = $strTemplateName;
            $arrRenderDataDetail = array();
            $arrRenderDataDetail['queueName'] = 'leftResult';
            $arrRenderDataDetail['queueId'] = $intKey;
            $arrOneData['render_data'] = $arrRenderDataDetail;
            $key = $strType . '_' . $strTemplateName . '_' . $arrRenderDataDetail['queueName'] . '_' . $arrRenderDataDetail['queueId'] . '_' . $intLogId;
            $item['dispData']['multi_render_key'] = $key;
            $arrAlaData[$key] = $arrOneData;
        }
    }
    // 右侧队列
    if (!empty($data['uiData']['rightResult']['item']) && is_array($data['uiData']['rightResult']['item'])) {
        foreach ($data['uiData']['rightResult']['item'] as $intKey => &$item) {
            if (isset($item['dispData']['resultData']['extData'])) {
                $item['dispData']['resultData']['extData']['feData']['cssUI'] = $arrCssUi;
                $item['dispData']['resultData']['extData']['feData']['hasOffset'] = 1;
            }
            $arrOneData = array();
            $strType = empty($item['dispData']['strategy']['type']) ? 'aladdin' : $item['dispData']['strategy']['type'];
            $strTemplateName = $item['dispData']['strategy']['tempName'];
            // $key =
            // md5(serialize($item['dispData'])).'_'.$strType.'_'.$strTemplateName;
            $arrOneData['render_type'] = $strType;
            $arrOneData['render_template'] = $strTemplateName;
            $arrRenderDataDetail = array();
            $arrRenderDataDetail['queueName'] = 'rightResult';
            $arrRenderDataDetail['queueId'] = $intKey;
            $arrOneData['render_data'] = $arrRenderDataDetail;
            $key = $strType . '_' . $strTemplateName . '_' . $arrRenderDataDetail['queueName'] . '_' . $arrRenderDataDetail['queueId'] . '_' . $intLogId;
            $item['dispData']['multi_render_key'] = $key;
            $arrAlaData[$key] = $arrOneData;
        }
    }
    // 上侧队列
    if (!empty($data['uiData']['topResult']['item']) && is_array($data['uiData']['topResult']['item'])) {
        foreach ($data['uiData']['topResult']['item'] as $intKey => &$item) {
            if (isset($item['dispData']['resultData']['extData'])) {
                $item['dispData']['resultData']['extData']['feData']['cssUI'] = $arrCssUi;
            }
            $arrOneData = array();
            $strType = empty($item['dispData']['strategy']['type']) ? 'aladdin' : $item['dispData']['strategy']['type'];
            $strTemplateName = $item['dispData']['strategy']['tempName'];
            // $key =
            // md5(serialize($item['dispData'])).'_'.$strType.'_'.$strTemplateName;
            $arrOneData['render_type'] = $strType;
            $arrOneData['render_template'] = $strTemplateName;
            $arrRenderDataDetail = array();
            $arrRenderDataDetail['queueName'] = 'topResult';
            $arrRenderDataDetail['queueId'] = $intKey;
            $arrOneData['render_data'] = $arrRenderDataDetail;
            $key = $strType . '_' . $strTemplateName . '_' . $arrRenderDataDetail['queueName'] . '_' . $arrRenderDataDetail['queueId'] . '_' . $intLogId;
            $item['dispData']['multi_render_key'] = $key;
            $arrAlaData[$key] = $arrOneData;
        }
    }
    // 	file_put_contents('/home/work/search/view-ui/pre_data.log',var_export($data,true));
}