当前位置: 首页>>代码示例>>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;未经允许,请勿转载。