當前位置: 首頁>>代碼示例>>PHP>>正文


PHP company::getPushApi方法代碼示例

本文整理匯總了PHP中company::getPushApi方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::getPushApi方法的具體用法?PHP company::getPushApi怎麽用?PHP company::getPushApi使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在company的用法示例。


在下文中一共展示了company::getPushApi方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: config


//.........這裏部分代碼省略.........
                             $guide_pic_arr[$guide_type][$k]['ios'] = $url;
                         }
                     }
                 }
             }
             if (!$guide_pic_arr) {
                 $guide_pic_arr = $guide_pic;
             }
             $app_info['guide_pic'] = $guide_pic_arr;
         }
     }
     if ($this->settings['data_url']) {
         $app_info['base_url'] = trim($this->settings['data_url']['path'], '/') . '/' . $app_info['user_id'] . '/';
     }
     //天氣接口
     if (WEATHER_API) {
         $app_info['weather_api'] = WEATHER_API;
     }
     //統計接口
     if (STATISTICS_API) {
         $app_info['statistics_api'] = STATISTICS_API;
     }
     //會員接口
     if (MEMBER_API) {
         $app_info['member_api'] = MEMBER_API;
     }
     //互助接口
     if (SEEKHELP_API) {
         $app_info['seekhelp_api'] = SEEKHELP_API;
     }
     //獲取推送id和key
     include_once ROOT_PATH . 'lib/class/company.class.php';
     $companyApi = new company();
     $push_api = $companyApi->getPushApi($this->user['user_id']);
     if ($push_api) {
         $app_info['push_api'] = $push_api;
         $app_info['prov_id'] = $push_api['prov_id'];
     }
     //獲取APP打包程序數據
     $app_info['client'] = $this->api->get_version_info($app_id);
     //獲取APP模板信息
     $temp_info = $this->api->detail('app_template', array('id' => $app_info['temp_id']));
     if ($temp_info) {
         if (unserialize($temp_info['pic'])) {
             $temp_info['pic'] = unserialize($temp_info['pic']);
             if (IS_REPLACE && REPLACE_IMG_DOMAIN) {
                 $temp_info['pic']['host'] = REPLACE_IMG_DOMAIN;
             }
         }
         $app_info['template'] = $temp_info;
         //獲取APP模板的屬性
         include_once CUR_CONF_PATH . 'lib/appTemplate.class.php';
         $tempApi = new appTemplate();
         $temp_attr = $tempApi->get_attribute($app_info['temp_id'], $app_id, true);
         if ($temp_attr) {
             $temp_attr = $temp_attr[$app_info['temp_id']];
             foreach ($temp_attr as $k => $attr) {
                 if ($attr['mark'] == 'homeBackground') {
                     unset($temp_attr[$k]);
                     continue;
                 }
                 if (is_string($attr['attr_value']) && strpos($attr['attr_value'], '|')) {
                     $arr = explode('|', $attr['attr_value']);
                     $arr_list = array();
                     foreach ($arr as $value) {
                         $vv = explode(':', $value);
開發者ID:h3len,項目名稱:Project,代碼行數:67,代碼來源:app.php

示例2: getAppAllInfo

 public function getAppAllInfo()
 {
     $app_id = intval($this->input['id']);
     if (!$app_id) {
         $this->errorOutput(NO_APP_ID);
     }
     //獲取APP信息
     $app_info = $this->api->detail('app_info', array('id' => $app_id, 'del' => 0));
     if (!$app_info) {
         $this->errorOutput(APP_NOT_EXISTS);
     }
     $app_info['is_open_weather'] = 1;
     //天氣默認都開啟
     // 獲取融雲的 production_app_key
     $rcAppKey = $this->_im->get_rckey($app_id);
     if ($rcAppKey) {
         $app_info['rcAppKey'] = $rcAppKey;
     } else {
         //創建融雲應用
         $rc_info = $this->_im->apply_signature($app_id, $app_info['name'], $app_info['brief']);
         $app_info['rcAppKey'] = $rc_info['rc_key'];
     }
     if ($this->user['user_id']) {
         $user_info = $this->companyApi->getUserInfoByUserId($this->user['user_id']);
     } elseif ($app_info['user_id']) {
         $user_info = $this->companyApi->getUserInfoByUserId($app_info['user_id']);
     }
     if (!$user_info) {
         $this->errorOutput(USER_NOT_EXISTS);
     }
     $app_info['user_info'] = $user_info;
     if ($app_info['guide_effect']) {
         $app_info['guide_effect_num'] = $this->settings['guide_effect_setting'][$app_info['guide_effect']];
     }
     //處理默認城市
     if (!$app_info['city']) {
         $app_info['city'] = $this->settings['default_city']['city'];
     }
     //分享平台數據
     if (isset($app_info['share_plant']) && $app_info['share_plant']) {
         $app_info['share_plant'] = @unserialize($app_info['share_plant']);
     } else {
         $app_info['share_plant'] = array();
     }
     //額外配置數據
     if (isset($app_info['extras']) && $app_info['extras']) {
         $app_info['extras'] = @unserialize($app_info['extras']);
     } else {
         $app_info['extras'] = $this->settings['app_extras'];
     }
     //獲取推送id和key
     $pushInfo = $this->_company->getPushApi($this->user['user_id']);
     if ($pushInfo && is_array($pushInfo)) {
         $app_info['push_info'] = $pushInfo;
     }
     //應用圖標
     if ($app_info['icon'] && unserialize($app_info['icon'])) {
         $app_info['icon'] = unserialize($app_info['icon']);
         if (IS_REPLACE && REPLACE_IMG_DOMAIN) {
             $app_info['icon']['host'] = REPLACE_IMG_DOMAIN;
         }
         $app_icon = array('web' => $app_info['icon']);
         if ($this->settings['icon_size']) {
             $path = $app_info['icon']['host'] . $app_info['icon']['dir'];
             $file = $app_info['icon']['filepath'] . $app_info['icon']['filename'];
             if ($this->settings['icon_size']['android']) {
                 foreach ($this->settings['icon_size']['android'] as $android) {
                     //兼容原來的附件,dir存在就說明是原來的附件
                     if ($app_info['icon']['dir']) {
                         $size = $android['width'] . 'x' . $android['height'];
                         $url = $path . $size . '/' . $file;
                     } else {
                         $url = $path . $file . '!' . $android['thumb'];
                     }
                     $app_icon['android'][$android['key']] = $url;
                 }
             }
             if ($this->settings['icon_size']['ios']) {
                 foreach ($this->settings['icon_size']['ios'] as $ios) {
                     //兼容原來的附件,dir存在就說明是原來的附件
                     if ($app_info['icon']['dir']) {
                         $size = $ios['width'] . 'x' . $ios['height'];
                         $url = $path . $size . '/' . $file;
                     } else {
                         $url = $path . $file . '!' . $ios['thumb'];
                     }
                     $app_icon['ios'][$ios['key']] = $url;
                 }
             }
         }
         if ($app_icon) {
             $app_info['icon'] = $app_icon;
         }
     }
     //啟動圖
     if ($app_info['startup_pic'] && unserialize($app_info['startup_pic'])) {
         $app_info['startup_pic'] = unserialize($app_info['startup_pic']);
         if (IS_REPLACE && REPLACE_IMG_DOMAIN) {
             $app_info['startup_pic']['host'] = REPLACE_IMG_DOMAIN;
         }
//.........這裏部分代碼省略.........
開發者ID:h3len,項目名稱:Project,代碼行數:101,代碼來源:app.php


注:本文中的company::getPushApi方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。