FileService::getFileUrl(), // 网站名称 'web_name' => ConfigService::get('website', 'name'), // 网站图标 'web_favicon' => FileService::getFileUrl(ConfigService::get('website', 'web_favicon')), // 网站logo 'web_logo' => FileService::getFileUrl(ConfigService::get('website', 'web_logo')), // 登录页 'login_image' => FileService::getFileUrl(ConfigService::get('website', 'login_image')), // 版权信息 'copyright_config' => ConfigService::get('copyright', 'config', []), ]; return $config; } /** * @notes 根据类型获取字典类型 * @param $type * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/9/27 19:09 */ public static function getDictByType($type) { if (!is_string($type)) { return []; } $type = explode(',', $type); $lists = DictData::whereIn('type_value', $type)->select()->toArray(); $result = []; if ($lists) { foreach ($type as $item) { foreach ($lists as $dict) { if ($dict['type_value'] == $item) { $result[$item][] = $dict; } } } } foreach ($type as $t) { if (strpos($t, 'table.') !== false) { $appid = env('app.appid', 'daodao'); $data = CidConfig::where('Appid', $appid) ->where('Status', 1) ->field('Cid,Inner,Name') ->order('Cid ASC') ->select() ->toArray(); $result['cid_config'] = $data; } } return $result; } }