Пример #1
0
 public function processOperatorInfo($OperatorInfo)
 {
     //获取全局配置
     $oMenCache = new Base_Cache_Memcache("Complaint");
     $Setting = $oMenCache->get('setting');
     $NewOperatorInfo = array();
     if (isset($OperatorInfo['id'])) {
         $NewOperatorInfo['OperatorId'] = $OperatorInfo['id'];
         $NewOperatorInfo['ServiceLogUrl'] = $this->config->ScUrl . "/?question/selfHistoryQuestion/" . urlencode($OperatorInfo['login_name']);
     }
     if (isset($OperatorInfo['login_name'])) {
         $NewOperatorInfo['OperatorName'] = $OperatorInfo['login_name'];
     }
     if (isset($OperatorInfo['cno'])) {
         $NewOperatorInfo['Cno'] = $OperatorInfo['cno'];
     }
     if (isset($OperatorInfo['name'])) {
         $NewOperatorInfo['NickName'] = $OperatorInfo['name'];
     }
     if (isset($OperatorInfo['photo'])) {
         $NewOperatorInfo['PhotoLink'] = strlen(trim($OperatorInfo['photo'])) >= 1 ? trim($OperatorInfo['photo']) : $this->config->DefaultOperatorPic;
     }
     if (isset($OperatorInfo['tel']) && $Setting['telDisplay']) {
         $NewOperatorInfo['Tel'] = $OperatorInfo['tel'];
     }
     if (isset($OperatorInfo['mobile'])) {
         $NewOperatorInfo['Mobile'] = Base_Common::convertPhoneNum($OperatorInfo['mobile']);
     }
     if (isset($OperatorInfo['weixin'])) {
         $NewOperatorInfo['Weixin'] = $OperatorInfo['weixin'];
         $NewOperatorInfo['WeixinPhotoLink'] = $OperatorInfo['weixinPicUrl'];
     }
     if (isset($OperatorInfo['xnGroupId']) && $Setting['xnDisplay']) {
         $NewOperatorInfo['xn']['xnGroupId'] = $OperatorInfo['xnGroupId'];
         $XNDefault = $this->getXNDefault();
         $NewOperatorInfo['xn']['xnSiteId'] = $XNDefault['xnSiteId'];
         $NewOperatorInfo['xn']['xnSellerId'] = $XNDefault['xnSellerId'];
         $NewOperatorInfo['xn']['xnDefaultSettingId'] = $XNDefault['xnDefaultSettingId'];
     } else {
         if (isset($OperatorInfo['QQ']) && $Setting['qqDisplay']) {
             $NewOperatorInfo['QQ'] = $OperatorInfo['QQ'];
         }
     }
     return $NewOperatorInfo;
 }