chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材 添加系统版本配置文件(.version)和常量定义文件(.constant) 更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件 添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
86
app/controller/api/pc/PublicController.php
Normal file
86
app/controller/api/pc/PublicController.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\controller\api\pc;
|
||||
|
||||
|
||||
use app\Request;
|
||||
use app\services\other\CityAreaServices;
|
||||
use crmeb\services\SystemConfigService;
|
||||
|
||||
class PublicController
|
||||
{
|
||||
|
||||
/**
|
||||
* 获取城市数据
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCity(Request $request, CityAreaServices $services)
|
||||
{
|
||||
[$pid] = $request->getMore([
|
||||
[['pid', 'd'], 0],
|
||||
], true);
|
||||
return app('json')->success($services->getCityTreeList((int)$pid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司信息
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCompanyInfo()
|
||||
{
|
||||
$data = SystemConfigService::more(['contact_number', 'links_open', 'links_list', 'company_address', 'copyright', 'record_No', 'site_name', 'site_keywords', 'site_description', 'pc_logo', 'filing_list']);
|
||||
$logoUrl = $data['pc_logo'] ?? '';
|
||||
if (strstr($logoUrl, 'http') === false && $logoUrl) {
|
||||
$logoUrl = sys_config('site_url') . $logoUrl;
|
||||
}
|
||||
$logoUrl = str_replace('\\', '/', $logoUrl);
|
||||
$data['logoUrl'] = $logoUrl;
|
||||
if ($data['links_open']) {
|
||||
$linksList = $data['links_list'];
|
||||
$linksList = is_array($linksList) ? $linksList : [];
|
||||
$edition = $volume = [];
|
||||
foreach ($linksList as $key => $row) {
|
||||
$volume[$key] = $row['sort'];
|
||||
$edition[$key] = $row['url'];
|
||||
}
|
||||
array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $linksList);
|
||||
$data['links_list'] = $linksList;
|
||||
} else {
|
||||
$data['links_list'] = [];
|
||||
}
|
||||
if ($data['filing_list']) {
|
||||
$filingList = $data['filing_list'];
|
||||
$filingList = is_array($filingList) ? $filingList : [];
|
||||
$edition = $volume = [];
|
||||
foreach ($filingList as $key => $row) {
|
||||
$volume[$key] = $row['sort'];
|
||||
$edition[$key] = $row['url'];
|
||||
}
|
||||
array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $filingList);
|
||||
$data['filing_list'] = $filingList;
|
||||
} else {
|
||||
$data['filing_list'] = [];
|
||||
}
|
||||
return app('json')->successful($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取关注微信二维码
|
||||
* @return mixed
|
||||
*/
|
||||
public function getWechatQrcode()
|
||||
{
|
||||
$data['wechat_qrcode'] = sys_config('wechat_qrcode');
|
||||
return app('json')->successful($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user