// +---------------------------------------------------------------------- use \think\facade\Env; use think\facade\Request; // +---------------------------------------------------------------------- // | 应用设置 // +---------------------------------------------------------------------- //定位到项目根目录 E:\wh\projects\boom_im $root_path = str_replace('config','',__DIR__); list($debug,$trace,$sys_env) = [false,false,'DEV']; if (!function_exists('is_main_domain')) { function is_main_domain($domain, $main_domain) { $exp_arr = explode('.', $domain); $str = $exp_arr[count($exp_arr) - 2] . '.' . $exp_arr[count($exp_arr) - 1]; return in_array($str, $main_domain);//$str == $main_domain; } } if (!function_exists('auto_choose_app_conf')) { function auto_choose_app_conf(&$debug,&$trace,&$sys_env){ $domain = Request::host(); //获取当前域名 if(in_array($domain, ['aaa.excn.top'])){ //正式 - 全域名 $debug = false; $trace = false; $sys_env = 'PROD'; } //测试 else if(in_array($domain, ['ybx_prediagnosis.excn.top'])) { $debug = true; $trace = false; $sys_env = 'DEV'; } else { //本地 $debug = true; $trace = false; $sys_env = 'LOCAL'; } } } auto_choose_app_conf($debug,$trace,$sys_env); return [ // 应用名称 'app_name' => '', // 应用地址 'app_host' => '', // 应用调试模式 'app_debug' => $debug, // 应用Trace 'app_trace' => $trace, // 是否支持多模块 'app_multi_module' => true, // 入口自动绑定模块 'auto_bind_module' => false, // 注册的根命名空间 'root_namespace' => [], // 默认输出类型 'default_return_type' => 'html', // 默认AJAX 数据返回格式,可选json xml ... 'default_ajax_return' => 'json', // 默认JSONP格式返回的处理方法 'default_jsonp_handler' => 'jsonpReturn', // 默认JSONP处理方法 'var_jsonp_handler' => 'callback', // 默认时区 'default_timezone' => 'Asia/Shanghai', // 是否开启多语言 'lang_switch_on' => false, // 默认全局过滤方法 用逗号分隔多个 'default_filter' => '', // 默认语言 'default_lang' => 'zh-cn', // 应用类库后缀 'class_suffix' => false, // 控制器类后缀 'controller_suffix' => false, // +---------------------------------------------------------------------- // | 模块设置 // +---------------------------------------------------------------------- // 默认模块名 'default_module' => 'index', // 禁止访问模块 'deny_module_list' => ['common'], // 默认控制器名 'default_controller' => 'Index', // 默认操作名 'default_action' => 'index', // 默认验证器 'default_validate' => '', // 默认的空模块名 'empty_module' => '', // 默认的空控制器名 'empty_controller' => 'Error', // 操作方法前缀 'use_action_prefix' => false, // 操作方法后缀 'action_suffix' => '', // 自动搜索控制器 'controller_auto_search' => false, // +---------------------------------------------------------------------- // | URL设置 // +---------------------------------------------------------------------- // PATHINFO变量名 用于兼容模式 'var_pathinfo' => 's', // 兼容PATH_INFO获取 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], // pathinfo分隔符 'pathinfo_depr' => '/', // HTTPS代理标识 'https_agent_name' => '', // IP代理获取标识 'http_agent_ip' => 'X-REAL-IP', // URL伪静态后缀 'url_html_suffix' => 'html', // URL普通方式参数 用于自动生成 'url_common_param' => false, // URL参数方式 0 按名称成对解析 1 按顺序解析 'url_param_type' => 0, // 是否开启路由延迟解析 'url_lazy_route' => false, // 是否强制使用路由 'url_route_must' => false, // 合并路由规则 'route_rule_merge' => false, // 路由是否完全匹配 'route_complete_match' => false, // 使用注解路由 'route_annotation' => false, // 域名根,如thinkphp.cn 'url_domain_root' => '', // 是否自动转换URL中的控制器和操作名 'url_convert' => true, // 默认的访问控制器层 'url_controller_layer' => 'controller', // 表单请求类型伪装变量 'var_method' => '_method', // 表单ajax伪装变量 'var_ajax' => '_ajax', // 表单pjax伪装变量 'var_pjax' => '_pjax', // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 'request_cache' => false, // 请求缓存有效期 'request_cache_expire' => null, // 全局请求缓存排除规则 'request_cache_except' => [], // 是否开启路由缓存 'route_check_cache' => false, // 路由缓存的Key自定义设置(闭包),默认为当前URL和请求类型的md5 'route_check_cache_key' => '', // 路由缓存类型及参数 'route_cache_option' => [], // 默认跳转页面对应的模板文件 'dispatch_success_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl', 'dispatch_error_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl', // 异常页面的模板文件 'exception_tmpl' => Env::get('think_path') . 'tpl/think_exception.tpl', // 错误显示信息,非调试模式有效 'error_message' => '页面错误!请稍后再试~', // 显示错误信息 'show_error_msg' => false, // 异常处理handle类 留空使用 \think\exception\Handle 'exception_handle' => '\\app\\common\\exception\\SystemException', 'pay_config'=>[ 'wechat' => [ //小白菜商城 ], ], //数字人-报告生成接口(预问诊)(h5,固定问答,自由问答这几个在前端翔宇处配置key) 'ai_num_report_config'=>[ 'base_url'=>'https://ue-ai.excn.top/api/v1/chat/completions', //'APIKey'=>'fastgpt-jrmdlpu4ijKDl8dvh0zkHmk7m2smjXpM4stas9UnNQJOyjkNmGKM', 'APIKey'=>'fastgpt-wgZVEbXVl2egotIcTdDOmhhrbfyrtmWMyjz8Fqa1L581OegT9gMpvb', ], //听译-报告生成接口(问诊) 'ai_listen_report_config'=>[ 'base_url'=>'https://ue-ai.excn.top/api/v1/chat/completions', 'APIKey'=>'fastgpt-aA4mHjZZ3IVGX8mnwUHW8Ip9qdXfp8cWok26l0fRKQHa01hfsZCPF9', ], //听译-健康小洞察 'ai_health_insight_config'=>[ 'base_url'=>'https://serverfastgpt.excn.top/api/v1/chat/completions', 'APIKey'=>'fastgpt-slpyh4HgrcmxeKFKHK58OXwOUAqPvz5aa6kfyAhmGA8tK0cQef6WUhNDZ8nPDaZ', ], //医生提示,问诊提示 'ai_doctor_tips_config'=>[ 'base_url'=> 'https://ue-ai.excn.top/api/v1/chat/completions', 'APIKey'=>'fastgpt-b5JYnBaeESH2ExiwEg95PE3qP4SZNxUflCqZTLINslzefLQ9W2JJmXwfMyS', ], //听译-讯飞录音接口 'xunfei_record_config'=>[ //优一 'appid'=>'de02dasd', 'APIKey'=>'31ce3f96c062958df3c426da4903540c', 'secretKey'=>'MjcyOGE5ODg3ODM2ZWU5MTNiODc0M2Zl', //测试 //'appid'=>'d482af59', //'APIKey'=>'0d20dab630904ad8676d9075375a1914', //'secretKey'=>'Yjg0YTAyNmE5OGUwNDE3YjU4NWE4NmZh', ], //azure文本转语音服务 'voice_to_text_service'=>[ 'base_url'=> 'https://eastasia.tts.speech.microsoft.com/cognitiveservices/v1', 'APIKey'=>'090287baa7b14fcfb060a70bd1863f2f', ], //量表处理ai 'scale_processing_ai_config'=>[ 'base_url'=>'https://ue-ai.excn.vip/api/v1/chat/completions', 'APIKey'=>'fastgpt-fBwUxCwO4AE6aBEa6kmPl6BfCVr8vqKOe8F80nZG6zRgjQ9kNnD9', ], //基本信息读取接口(传图片地址)【一张图片一个chatid】 'basic_information_read_config'=>[ 'base_url'=>'https://ue-ai.excn.vip/api/v1/chat/completions', 'APIKey'=>'fastgpt-xQfBX6pAIFsEBlssRsPOo2kHJ80STZxkTahbThzVVY8fU0n5fomUd7YuLr', ], //药品、影像、病历上传AI分析 'medicine_image_report_config'=>[ 'base_url'=>'https://ue-ai.excn.vip/api/v1/chat/completions', 'APIKey'=>'fastgpt-cTEwcjNHtYLNa0ockBMGZmJJMS2XIvHQGjfg8AlPlnyNzg58555gKDtPz', 'notify_url'=>'https://ybx_prediagnosis.excn.top/api/Drugsimagesmedicaltasknotify/notify' ], //听译优医AI助手 'ai_medical_assistant_config'=>[ 'base_url'=>'https://ue-ai.excn.vip/api/v1/chat/completions', 'APIKey'=>'fastgpt-qglbpakk93NM7tLmhBxAIMk0AcyItx3RaLzifNgNAXRcc1sfd42Z', ], //阿里云oss配置 'aliyun_oss_config' => [ //项目应用名称 'bucket'=>'wanlliuyinli-adm',//每创建一个bucket必须标明前缀,代表这个bucket属于哪个项目 'UserPrincipalName'=>'wanghua@1113242774600735.onaliyun.com', 'Password'=>'(BgvEvL#7FQ%ZXRVc0kYCrOa2kd9ace!', 'AccessKeyId'=>'LTAI5tPqn1n7jugviVoGqFfa', 'AccessKeySecret'=>'BRoB5TdcUAFEuIR11BbN3R47Cm4Yep', //https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints?spm=a2c4g.11186623.0.0.41ae2effA6oZar 'region_id'=>'cn-chengdu',//这里配置不能包含oss-前缀,否则提示:Invalid signing region in Authorization header //西南1(成都) //oss-cn-chengdu //oss-cn-chengdu.aliyuncs.com //oss-cn-chengdu-internal.aliyuncs.com 'endpoint'=>'oss-cn-chengdu.aliyuncs.com',//成都节点 'sts_endpoint'=>'sts.cn-chengdu.aliyuncs.com',//sts服务节点 //邮件配置 'accountName'=>'libin@mail.excn.vip',//发信服务地址 'fromAlias'=>'优一科技',//发信人昵称 ], //短信配置 'sms_config'=>[ //短信配置 start //主号 //'AccessKeyId'=>'LTAI5tSEhubcsKbZsNM1GGZQ', //'AccessKeySecret'=>'JgjBrCDYXMNsiLmoaE2bjMZFw7F9fu', //副号 'AccessKeyId'=>'LTAI5tPqn1n7jugviVoGqFfa', 'AccessKeySecret'=>'BRoB5TdcUAFEuIR11BbN3R47Cm4Yep', //优一科技 验证码配置 'sms_sign_name'=>'优一科技',//关联签名 'sms_template_code'=>'SMS_471455330',//模板CODE 'sms_template_name'=>'智语医助',//模板名称 //短信配置 end ], //业务基础架构配置 'service_framework_config'=>[ //内网访问架构中放行的端口 'inner_allow_ports'=>[8080], //错误重定向URL 'auth_err_redirect_url'=>'/index/err/checkfailed', 'sign_token'=>'ASbn56&1^%_qsdcvb', //业务架构调试模式 false 关闭, true开启 'debug'=>false, ], //当前系统环境类型 'sys_env'=>$sys_env, //系统日志驱动 'sys_log_type'=>'file',//file mysql email ];