Commit 36aa31cd by 朱继来

添加cms配置

parent 33a08254
<?php
/**
* 传递数据以易于阅读的样式格式化后输出
*/
function p($data)
{
// 定义样式
$str='<pre style="display: block;padding: 9.5px;margin: 44px 0 0 0;font-size: 13px;line-height: 1.42857;color: #333;word-break: break-all;word-wrap: break-word;background-color: #F5F5F5;border: 1px solid #CCC;border-radius: 4px;">';
// 如果是boolean或者null直接显示文字;否则print
if (is_bool($data)) {
$show_data=$data ? 'true' : 'false';
}elseif (is_null($data)) {
$show_data='null';
}else{
$show_data=print_r($data,true);
}
$str.=$show_data;
$str.='</pre>';
echo $str;
}
/**
* 统一密码加密
* @param [type] $pwd [description]
* @return [type] [description]
*/
function pwdhash($pwd, $salt)
{
return md5(md5($pwd).$salt);
}
/**
* 获取浏览器及相关设备信息
* return array
*/
function getAgentInfo()
{
$agent = $_SERVER['HTTP_USER_AGENT'];
$brower = array(
'MSIE' => 1,
'Trident/' => 1,
'Firefox' => 2,
'MicroMessenger' => 9,
'QQBrowser' => 11,
'QQ/' => 3,
'UCBrowser' => 4,
'Edge' => 5,
'Chrome' => 6,
'Opera' => 7,
'OPR' => 7,
'Safari' => 8,
);
$system = array(
'Windows' => 1,
'Android' => 2,
'iPhone' => 3,
'Windows Phone' => 4,
'iPad' => 5
);
$browser_num = 0;//未知
$system_num = 0;//未知
foreach ($brower as $bro => $val) {
if (stripos($agent, $bro) !== false) {
$browser_num = $val;
break;
}
}
foreach ($system as $sys => $val) {
if (stripos($agent, $sys) !== false) {
$system_num = $val;
break;
}
}
return array('sys' => $system_num, 'bro' => $browser_num);
}
/**
* 判断访问站点(优先适用传过来的参数)
* @return [type] [description]
*/
function platform()
{
$pf = I('request.pf', -1, 'intval');
if ($pf == -1) {
if ($_SERVER['HTTP_HOST'] == 'api.liexin.com') {
return 1;
}
$url_arr = explode('//', $_SERVER['HTTP_HOST']);
$domain_arr = explode('/', $url_arr['0']);
switch ($domain_arr['0']) {
case 'www.liexin.com' :
case 'www.ichunt.com' :
case 't.ichunt.com' :
case 'sz.ichunt.com' :
case 'member.ichunt.net' :
return 1; break;
case 'm.liexin.com' :
case 'm.ichunt.com' :
case 'tm.ichunt.com' :
case 'szm.ichunt.com' :
return 2; break;
default :
return -1;
}
} else {
return $pf;
}
}
// curl post
function post_curl($url, $data, $headers = array(), $cookie = array())
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
if (strpos($url, 'https://') !== false) {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
}
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
/**
* 生成随机数
*
* @param $length int 随机数长度
* @param $numeric boolean 是否为纯数字
* @return string 随机数
*/
function random($length, $numeric = 0) {
$seed = base_convert(md5(microtime().$_SERVER['DOCUMENT_ROOT']), 16, $numeric ? 10 : 35);
$seed = $numeric ? (str_replace('0', '', $seed).'012340567890') : ($seed.'zZ'.strtoupper($seed));
if($numeric) {
$hash = '';
} else {
$hash = chr(rand(1, 26) + rand(0, 1) * 32 + 64);
$length--;
}
$max = strlen($seed) - 1;
for($i = 0; $i < $length; $i++) {
$hash .= $seed{mt_rand(0, $max)};
}
return $hash;
}
//URL安全的字符串编码
function urlsafe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+','/','='), array('-','_',''), $data);
return $data;
}
/**
* 验证整数
* @param string $str
* @param int $sign 是否带符号,0否 1是 2全部
* @return boolean
*/
function isInt($str, $sign = 2) {
if (strlen($str) === 1 && is_numeric($str)) {
return true;
}
$regStr = '/^[\-]?[1-9]{1}[0-9]{0,}$/';
if ($sign === 0) {
$regStr = '/^[1-9]{1}[0-9]{0,}$/';
} elseif ($sign === 1) {
$regStr = '/^[\-][1-9]{1}[0-9]{0,}$/';
}
return preg_match($regStr, $str) ? true : false;
}
/*移动端判断*/
function isMobile()
{
// 如果有HTTP_X_WAP_PROFILE则一定是移动设备
if (isset ($_SERVER['HTTP_X_WAP_PROFILE'])) {
return true;
}
// 如果via信息含有wap则一定是移动设备,部分服务商会屏蔽该信息
if (isset ($_SERVER['HTTP_VIA'])) {
// 找不到为flase,否则为true
return stristr($_SERVER['HTTP_VIA'], "wap") ? true : false;
}
// 脑残法,判断手机发送的客户端标志,兼容性有待提高
if (isset ($_SERVER['HTTP_USER_AGENT'])) {
$clientkeywords = array ('nokia',
'sony',
'ericsson',
'mot',
'samsung',
'htc',
'sgh',
'lg',
'sharp',
'sie-',
'philips',
'panasonic',
'alcatel',
'lenovo',
'iphone',
'ipod',
'blackberry',
'meizu',
'android',
'netfront',
'symbian',
'ucweb',
'windowsce',
'palm',
'operamini',
'operamobi',
'openwave',
'nexusone',
'cldc',
'midp',
'wap',
'mobile'
);
// 从HTTP_USER_AGENT中查找手机浏览器的关键字
if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) {
return true;
}
}
// 协议法,因为有可能不准确,放到最后判断
if (isset ($_SERVER['HTTP_ACCEPT'])) {
// 如果只支持wml并且不支持html那一定是移动设备
// 如果支持wml和html但是wml在html之前则是移动设备
if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') === false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) {
return true;
}
}
return false;
}
/**
* [get_curl description]
* @param [type] $url [description]
* @return [type] [description]
*/
function get_curl($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
if (strpos($url, 'https://') !== false) {
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
}
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
/**
* [request description]
* @param [type] $url [description]
* @param [type] $params [description]
* @param [type] $ispost [description]
* @param [type] $https [description]
* @return [type] [description]
*/
function request($url, $params = false, $ispost = 0, $https = 0)
{
$httpInfo = array();
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if ($https) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 对认证证书来源的检查
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // 从证书中检查SSL加密算法是否存在
}
if ($ispost) {
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_URL, $url);
} else {
if ($params) {
if (is_array($params)) {
$params = http_build_query($params);
}
curl_setopt($ch, CURLOPT_URL, $url . '?' . $params);
} else {
curl_setopt($ch, CURLOPT_URL, $url);
}
}
$response = curl_exec($ch);
if ($response === FALSE) {
//echo "cURL Error: " . curl_error($ch);
return false;
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$httpInfo = array_merge($httpInfo, curl_getinfo($ch));
curl_close($ch);
return $response;
}
/**
* 使用专用redis读取写入
* @param [type] $key [description]
* @param string $value [description]
* @param [type] $option [description]
*/
function S_redis($key, $value = '', $option = null)
{
$options = array(
'type' => 'redisrw',
);
empty($option) && $option = array();
$options = array_merge($option, $options);
return S($key, $value, $options);
}
function getip() {
$unknown = 'unknown';
if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] && strcasecmp($_SERVER['HTTP_X_FORWARDED_FOR'], $unknown) ) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif ( isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], $unknown) ) {
$ip = $_SERVER['REMOTE_ADDR'];
}/*处理多层代理的情况或者使用正则方式:$ip = preg_match("/[\d\.]{7,15}/", $ip, $matches) ? $matches[0] : $unknown;*/
if (false !== strpos($ip, ','))
$ip = reset(explode(',', $ip));
return $ip;
}
/**
* rabbitmq 消息推送
*
*/
function pushMsg($config,$list_name,$arr){
if(!$config || !$list_name || !$arr){
return false;
}
$con = C($config);
$con['queue_name'] = $list_name;
$con['route_key'] = $list_name;
$con['vhost'] = $con['vhost']? $con['vhost']:'';
$con['exchangeType'] = AMQP_EX_TYPE_DIRECT;
$con['flags'] = AMQP_DURABLE;
$con['exchangename'] = 'CREDITHC_CS';
vendor('Mq.RabbitMQ');
try{
$MQ = \RabbitMQ :: init();
$MQ -> config($con);
$MQ -> connect();
$MQ -> publish(json_encode($arr));
//$ret = $MQ -> getMsg();
//dump(json_decode($ret,true));
}catch(\Exception $e){
// var_dump($e);
}
return true;
}
/**
* 获取CMS缓存数据
* @param [type] $key [键]
* @param string $field [字段]
* @param string $column [列]
* @param string $sort [排序]
* @param integer $limit [限制数量]
*/
function S_cms($key, $field='', $column='', $sort='', $limit='')
{
$datas = array();
$option = array(
'host' => C('FS_REDIS_HOST'),
'port' => C('FS_REDIS_PORT'),
'password' => C('FS_REDIS_PASSWORD')
);
$redis = new \Think\Cache\Driver\Redisrw($option);
$res = $field ? $redis->hget($key, $field) : $redis->hgetAll($key);
if (!$res) return $datas;
// 判断是否为数组
if (is_array($res)) {
foreach ($res as $k=>$v) {
$datas[] = json_decode($v, true);
}
if ($sort) {
array_multisort(array_column($datas, $sort), SORT_DESC, $datas); // 指定列排序
}
$datas = $limit ? array_slice($datas, 0, $limit) : $datas;
} else {
$datas = json_decode($res, true);
return $column ? $datas[$column] : $datas; // 返回指定列值
}
return $datas;
}
<?php
return array(
'LOAD_EXT_CONFIG' => 'config_db,config_url,config_pwd,config_param,config_supplier,chain_config,footstone_config,config_pcb',
'LOAD_EXT_CONFIG' => 'config_db,config_url',
'VAR_PAGE' => 'p',
'APP_SUB_DOMAIN_DEPLOY' => true,
'APP_SUB_DOMAIN_RULES' => array(
......
<?php
return array(
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '192.168.2.232', // 服务器地址
'DB_NAME' => 'liexin', // 数据库名
'DB_USER' => 'liexin', // 用户名
'DB_PWD' => 'liexin#zsyM', // 密码
'DB_PORT' => '3306', // 端口
'DB_PREFIX' => 'lie_', // 数据库表前缀
'DB_PARAMS' => array(), // 数据库连接参数
'DB_DEBUG' => true, // 数据库调试模式 开启后可以记录SQL日志
'DB_FIELDS_CACHE' => true, // 启用字段缓存
'DB_CHARSET' => 'utf8', // 数据库编码默认采用utf8
'DB_DEPLOY_TYPE' => 0, // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'DB_RW_SEPARATE' => false, // 数据库读写是否分离 主从式有效
'DB_MASTER_NUM' => 1, // 读写分离后 主服务器数量
'DB_SLAVE_NO' => '', // 指定从服务器序号
'DB_OTHER' => array(
'CMS' => array(
'db_type' => 'mysql',
'db_user' => 'ichuntcms',
'db_pwd' => 'ichuntcms#zsyM',
'db_host' => '192.168.2.232',
'db_port' => '3306',
'db_name' => 'ichuntcms',
'db_charset'=>'utf8',
),
'FS' => array(
'db_type' => 'mysql',
'db_user' => 'spu',
'db_pwd' => 'spu',
'db_host' => '192.168.1.234',
'db_port' => '3306',
'db_name' => 'liexin_spu',
'db_charset'=>'utf8',
),
),
/*撮合数据库*/
"MATCHES_DB_CONFIG" => array(
'db_type' => 'mysql',
'db_user' => 'matches',
'db_pwd' => 'matches#zsyM',
'db_host' => 'db1.ichunt.com',
'db_port' => '3306',
'db_name' => 'matches',
'db_prefix' => 'lie_',
'db_charset'=>'utf8',
),
//数据中心mysql 后面记得要拼接数据库名称
'SUPPLIER_CENTER_MYSQL' => 'mysql://root:HuntxB9#zsyM@192.168.2.232:3306/',
//Mongo
'DB_MONGO' => array(
'db_type' => 'mongo',
'db_user' => 'ichunt',
'db_pwd' => 'huntmon6699',
'db_host' => '192.168.1.237',
'db_port' => '27017',
'db_name' => 'logs',
'db_charset'=>'utf8',
),
'SUPPLIER_CENTER_DB_CONFIG' => array(
/* 数据库配置 */
'db_type' => 'mongo', // 数据库类型
'db_host' => '192.168.1.237',// 服务器地址
'db_name' => 'ichunt', // 数据库名
'db_user' => 'ichunt', // 用户名
'db_pwd' => 'huntmon6699', // 密码
'db_port' => '27017', // 端口
'db_prefix' => '', // 数据库表前缀
),
//REDIS
'REDIS_HOST' => '192.168.1.235,192.168.1.237',
'REDIS_PORT' => 6379,
'REDIS_PASSWORD' => 'icDb29mLy2s',
'REDIS_RW_SEPARATE' => true,
'DATA_CACHE_TIMEOUT'=> false,
'DATA_CACHE_PERSISTENT' => false,
//基石系统redis
'FS_REDIS_HOST'=>'192.168.1.235,192.168.1.237',
'FS_REDIS_PORT' => 6379,
'FS_REDIS_PASSWORD' => 'icDb29mLy2s',
//spu与sku的数据库连接
'SPU_SKU_MYSQL' => 'mysql://spu:spu@192.168.1.234:3306/',
//rabbitmq链接信息
'RABBITMQ_FLAG'=>true,//为true时打开记录信息
'RABBITMQ_CONFIG'=>array(
"host" => "192.168.2.232",
"port" => "5672",
"user_name" => "guest",
"password" => "guest",
),
//神策
'RABBITMQ_SENSOR_CONFIG'=>array(
"host" => "192.168.2.232",
"port" => "5672",
"user_name" => "guest",
"password" => "guest",
'vhost'=>'/'
),
);
\ No newline at end of file
<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller
{
public function _initialize()
{
$datas['logo'] = $this->apiBaseCache('pc_logo_set'); // logo
$datas['bottom_qrcode'] = $this->apiBaseCache('pc_bottom_qrcode'); // 底部二维码
foreach ($datas as $k => $v) {
$this->assign($k, $v['data']);
}
}
/**
* 通过bcat_id获取CMS分类数据 --- 图片、文字等
* @param [type] $tags [标签]
* @param [type] $where [搜索条件,用&连接,如:a=1&b=2]
* @param [type] $limit [数量]
* @return [type] [description]
*/
public function apiBaseCache($tags, $where='', $limit=1)
{
$cms = D('Home/Scms');
$datas = $cms->getBaseList($tags, $where, $limit);
if (!empty($datas)) {
return $this->apiReturn(0, '', $datas);
} else {
return $this->apiReturn(7004, '未找到数据');
}
}
/**
* 统一格式返回
* @param integer $code [description]
* @param string $msg [description]
* @param array $extend [description]
* @return [type] [description]
*/
protected function apiReturn($code = 0, $msg = '', $extend = array())
{
$data = array(
'err_code' => $code,
'err_msg' => $msg,
'data' => $extend,
);
if(isset($_GET['callback']) && !empty($_GET['callback'])){
echo $_GET['callback'].'('.json_encode($data).')';exit;
}else{
return $data;exit;
}
}
}
\ No newline at end of file
<?php
namespace Home\Controller;
use Think\Controller;
use Home\Controller\BaseController;
class IndexController extends Controller
class IndexController extends BaseController
{
/**
......@@ -12,6 +11,12 @@ class IndexController extends Controller
*/
public function index()
{
$datas['cooperation_pf'] = $this->apiBaseCache('pc_home_cooperation_pf', '', ''); // 合作平台
foreach ($datas as $k => $v) {
$this->assign($k, $v['data']);
}
$this->display('Index/index');
}
......
<?php
/**
* 获取CMS缓存
*/
namespace Home\Model;
class ScmsModel
{
/**
* 获取bcat_id
* @param [type] $key [键]
* @param integer $type [取值类型:1-通过tags,2-通过tem_id(楼层类目)]
* @return [type] [description]
*/
public function getBcatId($key, $type=1)
{
return $type == 1 ? S_cms('icsales:lie_base_cat:tags', $key, 'bcat_id') : S_cms('icsales:lie_base_cat:tem_id:'.$key);
}
/**
* 获取base数据
* @param [type] $key [键]
* @param string $limit [限制数量]
* @param integer $type [取值类型:1-通过bcat_id, 2-通过tem_id,3-通过model_id]
* @return [type] $condition [搜索条件,用&连接,如:a=1&b=2]
* @param [type] $table [表名]
* @return [type] [description]
*/
public function getBase($key, $limit='', $condition='', $type=1, $table='lie_base')
{
if ($type == 1)
$datas = S_cms('icsales:'.$table.':bcat_id:'.$key, '', '', 'sort');
else if ($type == 2)
$datas = S_cms('icsales:'.$table.':tem_id:'.$key, '', '', 'sort');
else
$datas = S_cms('icsales:'.$table.':model_id:'.$key, '', '', 'sort');
if (!$datas) return $datas;
if ($condition) {
parse_str($condition, $arr); // 解析条件,输出数组
$isTrue = true;
$datas = array_filter($datas, function($base) use ($arr, $isTrue) {
foreach ($arr as $k=>$v) {
if (isset($base[$k]) && $base[$k] != $v) { // 判断每个搜索条件是否存在且值相等,若不相等,则过滤对应的datas数组值
$isTrue = false;
}
}
return $isTrue;
});
array_multisort($datas); // 重新索引
}
$datas = $limit ? array_slice($datas, 0, $limit) : $datas;
return $datas;
}
/**
* 获取Base表配置内容
* @param [type] $tags [tags值]
* @param string $where [条件]
* @param string $limit [限制数量]
* @return [type] [description]
*/
public function getBaseList($tags, $where='', $limit=1)
{
$bcat_id = $this->getBcatId($tags); // 分类ID
return $this->getBase($bcat_id, $limit, $where);
}
/**
* 获取楼层模板
* @param [type] $key [键]
* @return [type] [description]
*/
public function getTemplate($key)
{
return S_cms('icsales:lie_template:tag:'.$key, '', '', 'sort');
}
/**
* 获取模块
* @param [type] $field [字段值]
* @param string $column [指定列]
* @return [type] [description]
*/
public function getModel($field, $column='')
{
return $column ? S_cms('icsales:lie_model:model_key', $field, $column) : S_cms('icsales:lie_model:model_key', $field);
}
/**
* 获取导航
* @param integer $model_id [所属模块ID]
* @param integer $parent_id [所属父级ID] <先查找模块下所有导航,遍历后,根据nav_id查找对应子级>
* @return [type] [description]
*/
public function getNavigation($model_id, $parent_id=0)
{
return $parent_id == 0 ? S_cms('icsales:lie_navigation:model_id:'.$model_id, '', '', 'sort') : S_cms('icsales:lie_navigation:model_id:'.$model_id.':parent_id:'.$parent_id, '', '', 'sort');
}
/**
* 获取帮助中心分类
* @param integer $model_id [所属模块ID]
* @param integer $parent_id [所属父级ID] <先查找模块下所有分类,遍历后,根据hccat_id查找对应子级>
* @return [type] [description]
*/
public function getHelpCenterCat($model_id, $parent_id=0)
{
return $parent_id == 0 ? S_cms('icsales:lie_help_center_cat:model_id:'.$model_id, '', '', 'sort') : S_cms('icsales:lie_help_center_cat:model_id:'.$model_id.':parent_id:'.$parent_id, '', '', 'sort');
}
/**
* 获取帮助中心内容
* @param [type] $hccat_id [帮助中心分类ID]
* @return [type] [description]
*/
public function getHelpCenter($hccat_id)
{
return S_cms('icsales:lie_help_center:hccat_id:'.$hccat_id, '', '', 'sort');
}
/**
* 获取底部链接分类
* @param integer $fcat_key [所属模块ID]
* @param integer $column [指定字段]
* @param integer $parent_id [所属父级ID] <先查找模块下所有分类,遍历后,根据fcat_id查找对应子级>
* @return [type] [description]
*/
public function getFooterLinkCat($fcat_key, $column='', $parent_id=0)
{
return $parent_id == 0 ? S_cms('icsales:lie_footer_link_cat:fcat_key', $fcat_key, $column, 'sort') : S_cms('icsales:lie_footer_link_cat:parent_id:'.$parent_id, '', '', 'sort');
}
/**
* 获取底部链接内容
* @param [type] $fcat_id [帮助中心分类ID]
* @return [type] [description]
*/
public function getFooterLink($fcat_id)
{
return S_cms('icsales:lie_footer_link:fcat_id:'.$fcat_id, '', '', 'sort');
}
/**
* 获取页面分类
* @param integer $model_id [所属模块ID]
* @return [type] [description]
*/
public function getPageCat($model_id)
{
return S_cms('icsales:lie_page_cat:model_id:'.$model_id);
}
/**
* 获取页面内容
* @param [type] $pagecat_id [页面分类ID]
* @return [type] [description]
*/
public function getPage($pagecat_id)
{
return S_cms('icsales:lie_page:pagecat_id:'.$pagecat_id);
}
/************************************** 信宏泰配置 **************************************/
/**
* 获取公司
* @return [type] [description]
*/
public function getCompany()
{
return S_cms('icsales:xht:lie_company', '', '', 'sort');
}
/**
* 获取公司信息
* @param [type] $com_id [公司ID]
* @return [type] [description]
*/
public function getCompanyInfo($com_id)
{
return S_cms('icsales:xht:lie_company_info:com_id:'.$com_id, '', '', 'sort');
}
/**
* 获取公司图片
* @param [type] $com_id [公司ID]
* @return [type] [description]
*/
public function getCompanyImg($com_id)
{
return S_cms('icsales:xht:lie_company_img:com_id:'.$com_id, '', '', 'sort');
}
}
\ No newline at end of file
<?php
return array(
//'配置项'=>'配置值'
);
\ No newline at end of file
\ No newline at end of file
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment