58 lines
1.7 KiB
PHP
58 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* This service file is part of item.
|
|
*
|
|
* @author ctexthuang
|
|
* @contact ctexthuang@qq.com
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Service\Api\System;
|
|
|
|
use App\Cache\Redis\Common\ConfigCache;
|
|
use App\Constants\ConfigCode;
|
|
use App\Service\Api\BaseService;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
|
|
class MiniWxConfigService extends BaseService
|
|
{
|
|
/**
|
|
* @var ConfigCache
|
|
*/
|
|
#[Inject]
|
|
protected ConfigCache $configCache;
|
|
|
|
/**
|
|
* @return array
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function handle(): array
|
|
{
|
|
$res = [
|
|
'logo' => $this->configCache->getConfigValueByKey(ConfigCode::APP_LOGO),
|
|
'about_us' => [
|
|
'synopsis' => $this->configCache->getConfigValueByKey(ConfigCode::ABOUT_US_SYNOPSIS),
|
|
'jump_page' => [
|
|
[
|
|
'title' => '营业执照',
|
|
'url' => $this->configCache->getConfigValueByKey(ConfigCode::BUSINESS_LICENSE)
|
|
],
|
|
[
|
|
'title' => '用户使用协议',
|
|
'url' => $this->configCache->getConfigValueByKey(ConfigCode::USER_AGREEMENT)
|
|
],
|
|
[
|
|
'title' => '用户隐私协议',
|
|
'url' => $this->configCache->getConfigValueByKey(ConfigCode::USER_PRIVACY_AGREEMENT)
|
|
],
|
|
]
|
|
]
|
|
];
|
|
|
|
return $this->return->success('success', $res);
|
|
}
|
|
} |