You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
shipin/app/api/controller/pc/PublicController.php

74 lines
2.4 KiB

<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\api\controller\pc;
use app\Request;
use app\services\pc\PublicServices;
class PublicController
{
protected $services;
public function __construct(PublicServices $services)
{
$this->services = $services;
}
/**
* 获取城市数据
* @param Request $request
* @return mixed
*/
public function getCity(Request $request)
{
list($pid) = $request->getMore([
[['pid', 'd'], 0],
], true);
return app('json')->success($this->services->getCity($pid));
}
/**
* 获取公司信息
* @return mixed
*/
public function getCompanyInfo()
{
$data['contact_number'] = sys_config('contact_number');
$data['company_address'] = sys_config('company_address');
$data['copyright'] = sys_config('nncnL_crmeb_copyright', '');
$data['record_No'] = sys_config('record_No');
$data['site_name'] = sys_config('site_name');
$data['site_keywords'] = sys_config('site_keywords');
$data['site_description'] = sys_config('site_description');
$data['network_security'] = sys_config('network_security');
$data['network_security_url'] = sys_config('network_security_url');
$data['icp_url'] = sys_config('icp_url');
$logoUrl = sys_config('pc_logo');
if (strstr($logoUrl, 'http') === false && $logoUrl) {
$logoUrl = sys_config('site_url') . $logoUrl;
}
$logoUrl = str_replace('\\', '/', $logoUrl);
$data['logoUrl'] = $logoUrl;
return app('json')->success($data);
}
/**
* 获取关注微信二维码
* @return mixed
*/
public function getWechatQrcode()
{
$data['wechat_qrcode'] = sys_config('wechat_qrcode');
return app('json')->success($data);
}
}