FileService::getFileUrl(), 'copyright' => ConfigService::get('shop', 'copyright', ''), 'record_number' => ConfigService::get('shop', 'record_number', ''), 'record_system_link' => ConfigService::get('shop', 'record_system_link', ''), 'name' => ConfigService::get('shop', 'name'), 'logo' => FileService::getFileUrl(ConfigService::get('shop', 'logo')), 'admin_login_image' => FileService::getFileUrl(ConfigService::get('shop', 'admin_login_image')), 'favicon' => FileService::getFileUrl(ConfigService::get('shop','favicon')), 'document_status' => ConfigService::get('shop','document_status',1), 'version' => config('project.version'), ]; return $data; } public static function getVedioConfig():array { $vedio_setting = ConfigService::get('shop', 'vedio_set', ''); $vedio_setting['file_url'] = FileService::getFileUrl( $vedio_setting['file_url']); $data = [ 'vedio_setting' =>$vedio_setting ]; return $data; } public static function setVedioConfig($params) { try { $is_vedio_show = $params['is_vedio_show']; $file_url = $params['file_url']; if(!empty($file_url)){ $file_url = FileService::setFileUrl($file_url); } $data['is_vedio_show']=$is_vedio_show; $data['file_url'] = $file_url; ConfigService::set('shop', 'vedio_set', $data); return true; } catch (\Exception $e) { return $e->getMessage(); } } /** * @notes 获取菜单权限 * @param array $adminInfo * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author cjhao * @date 2021/8/25 20:33 */ public static function getAuth(array $adminInfo):array { $data = [ 'root' => $adminInfo['root'], 'auth' => [], ]; if(1 == $adminInfo['root']){ return $data; } $adminAuthCache = new AdminAuthCache($adminInfo['admin_id']); $pageAuth = $adminAuthCache->getAdminPageAuth(); $data['auth'] = $pageAuth; return $data; } /** * @notes 获取营销中心模块 * @return array * @author cjhao * @date 2021/9/11 11:43 */ public static function getMarketingModule():array { $configModule = Config::get('module'); return $configModule['marketing']; } /** * @notes 获取应用中心模块 * @return array * @author cjhao * @date 2021/9/24 16:55 */ public static function getAppModule():array { $configModule = Config::get('module'); return $configModule['apply']; } /** * @notes 正版检测 * @return mixed * @author ljj * @date 2023/5/16 11:49 上午 */ public static function checkLegal() { $check_domain = config('project.check_domain'); $product_code = config('project.product_code'); $domain = $_SERVER['HTTP_HOST']; $result = \Requests::get($check_domain.'/api/version/productAuth?code='.$product_code.'&domain='.$domain); $result = json_decode($result->body,true); return $result['data']; } }