app.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | 应用设置
  13. // +----------------------------------------------------------------------
  14. return [
  15. // 应用名称
  16. 'app_name' => '',
  17. // 应用地址
  18. // 'app_host' => \think\facade\Env::get('app.app_host',''),
  19. 'app_host' => request()->domain(),
  20. // 应用调试模式
  21. 'app_debug' => \think\facade\Env::get('app.app_debug',false),
  22. // 应用Trace
  23. 'app_trace' => false,
  24. // 是否支持多模块
  25. 'app_multi_module' => true,
  26. // 入口自动绑定模块
  27. 'auto_bind_module' => false,
  28. // 注册的根命名空间
  29. 'root_namespace' => [],
  30. // 默认输出类型
  31. 'default_return_type' => 'json',
  32. // 默认AJAX 数据返回格式,可选json xml ...
  33. 'default_ajax_return' => 'json',
  34. // 默认JSONP格式返回的处理方法
  35. 'default_jsonp_handler' => 'jsonpReturn',
  36. // 默认JSONP处理方法
  37. 'var_jsonp_handler' => 'callback',
  38. // 默认时区
  39. 'default_timezone' => 'Asia/Shanghai',
  40. // 是否开启多语言
  41. 'lang_switch_on' => false,
  42. // 默认全局过滤方法 用逗号分隔多个
  43. //'default_filter' => '',
  44. 'default_filter' => 'trim,remove_xss',
  45. // 默认语言
  46. 'default_lang' => 'zh-cn',
  47. // 应用类库后缀
  48. 'class_suffix' => false,
  49. // 控制器类后缀
  50. 'controller_suffix' => false,
  51. // +----------------------------------------------------------------------
  52. // | 模块设置
  53. // +----------------------------------------------------------------------
  54. // 默认模块名
  55. 'default_module' => 'admin',
  56. // 禁止访问模块
  57. 'deny_module_list' => ['common'],
  58. // 默认控制器名
  59. 'default_controller' => 'Index',
  60. // 默认操作名
  61. 'default_action' => 'index',
  62. // 默认验证器
  63. 'default_validate' => '',
  64. // 默认的空模块名
  65. 'empty_module' => '',
  66. // 默认的空控制器名
  67. 'empty_controller' => 'Error',
  68. // 操作方法前缀
  69. 'use_action_prefix' => false,
  70. // 操作方法后缀
  71. 'action_suffix' => '',
  72. // 自动搜索控制器
  73. 'controller_auto_search' => false,
  74. // +----------------------------------------------------------------------
  75. // | URL设置
  76. // +----------------------------------------------------------------------
  77. // PATHINFO变量名 用于兼容模式
  78. 'var_pathinfo' => 's',
  79. // 兼容PATH_INFO获取
  80. 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
  81. // pathinfo分隔符
  82. 'pathinfo_depr' => '/',
  83. // HTTPS代理标识
  84. 'https_agent_name' => '',
  85. // IP代理获取标识
  86. 'http_agent_ip' => 'X-REAL-IP',
  87. // URL伪静态后缀
  88. 'url_html_suffix' => 'html',
  89. // URL普通方式参数 用于自动生成
  90. 'url_common_param' => false,
  91. // URL参数方式 0 按名称成对解析 1 按顺序解析
  92. 'url_param_type' => 0,
  93. // 是否开启路由延迟解析
  94. 'url_lazy_route' => false,
  95. // 是否强制使用路由
  96. 'url_route_must' => false,
  97. // 合并路由规则
  98. 'route_rule_merge' => false,
  99. // 路由是否完全匹配
  100. 'route_complete_match' => false,
  101. // 使用注解路由
  102. 'route_annotation' => false,
  103. // 域名根,如thinkphp.cn
  104. 'url_domain_root' => '',
  105. // 是否自动转换URL中的控制器和操作名
  106. 'url_convert' => true,
  107. // 默认的访问控制器层
  108. 'url_controller_layer' => 'controller',
  109. // 表单请求类型伪装变量
  110. 'var_method' => '_method',
  111. // 表单ajax伪装变量
  112. 'var_ajax' => '_ajax',
  113. // 表单pjax伪装变量
  114. 'var_pjax' => '_pjax',
  115. // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
  116. 'request_cache' => false,
  117. // 请求缓存有效期
  118. 'request_cache_expire' => null,
  119. // 全局请求缓存排除规则
  120. 'request_cache_except' => [],
  121. // 是否开启路由缓存
  122. 'route_check_cache' => false,
  123. // 路由缓存的Key自定义设置(闭包),默认为当前URL和请求类型的md5
  124. 'route_check_cache_key' => '',
  125. // 路由缓存类型及参数
  126. 'route_cache_option' => [],
  127. // 默认跳转页面对应的模板文件
  128. 'dispatch_success_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
  129. 'dispatch_error_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
  130. // 异常页面的模板文件
  131. 'exception_tmpl' => Env::get('root_path') . 'think_exception.tpl',
  132. // 错误显示信息,非调试模式有效
  133. 'error_message' => '页面错误!请稍后再试~',
  134. // 显示错误信息
  135. 'show_error_msg' => false,
  136. // 异常处理handle类 留空使用 \think\exception\Handle
  137. 'exception_handle' => '',
  138. // 上传文件最大限制
  139. 'max_upload_file_size' => 200*1024*1024,
  140. // 上传文件限制
  141. 'max_upload_img' => [
  142. 'size' => 5*1024*1024,
  143. 'ext' => 'jpg,png,jpeg'
  144. ],
  145. //短信配置
  146. 'sms_config' => [
  147. 'qx_corpid' => '',
  148. 'qx_pwd' => '',
  149. 'name' => '肿瘤医院' // 短信签名
  150. ],
  151. // 加密key
  152. 'encryption_key' => 'N2U0O1D9A0J5JLWY',
  153. 'gdkey' => '090bb76e4a23ca73a35f03752dadc1cb', // 高德地图key
  154. 'gdsecret' => 'eadeb2a9e5185fac21e72caaffd68da1', // 高德地图安全秘钥
  155. 'max_send_sms' => 5, // 每个手机号每天发送手机号的数量
  156. 'jpush' => [ // 极光推送
  157. 'appkey' => '879bc5b1762b667c7af95133',
  158. 'mastersecret' => '05e4a318f44b44c2c955b959'
  159. ],
  160. 'ucode' => 'jlwyn', //二维码标识 //正式使用后不可修改
  161. 'visit_url' => '/wap/visitor/#/pages/index/add?orgId=', // 访客端
  162. 'shop_url' => config("app.app_host").'/wap/shop', // 点餐端
  163. 'ph_url' => '/wap/ph', // 陪护端
  164. 'screen_url' => config("app.app_host").'/wap/screen/#', // 大屏端
  165. 'xshop_url' => 'http://******/xshop', // 商城端
  166. 'machine_admin' => [ // 极光推送
  167. 'id' => '999999999',
  168. 'name' => '超级管理员',
  169. 'card' => '9999999999'
  170. ],
  171. 'hwsms' => [ // 华为短信配置
  172. 'account' => '',
  173. 'password' => '',
  174. 'sign' => '',
  175. 'ip' => '139.9.32.119',
  176. 'port' => 18312,
  177. 'templateId' => 'SMS_21113000020'
  178. ],
  179. 'reissue_count' => 5,
  180. 'reissue_day' => 31,
  181. //------微信小程序配置---------
  182. 'wx_mini_config' => [
  183. 'app_id' => 'wx5e9b589db64ca5b2',
  184. 'secret' => '16f6156c87d628a255df26acac9a202c',
  185. // 下面为可选项
  186. // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
  187. 'response_type' => 'array',
  188. 'log' => [
  189. 'level' => 'error',
  190. 'file' => env('runtime_path').'/log/wechat.log',
  191. ],
  192. ],
  193. //------微信公众号配置---------
  194. /* 'wx_config' => [
  195. 'app_id' => 'wx2f0195c58ad8c3ec',
  196. 'secret' => '29452e7ad4db9fb53ddc1a8ab66eca2a',
  197. 'mch_id' => '', // 商户号
  198. 'key' => '', // API 密钥
  199. // 如需使用敏感接口(如退款、发送红包等)需要配置 API 证书路径(登录商户平台下载 API 证书)
  200. 'cert_path' => env('root_path').'public/certs/apiclient_cert.pem',
  201. 'key_path' => env('root_path').'public/certs/apiclient_key.pem',
  202. // 下面为可选项
  203. // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
  204. 'response_type' => 'array',
  205. 'log' => [
  206. 'level' => 'error',
  207. 'file' => env('runtime_path').'/log/wechat.log',
  208. ],
  209. ],*/
  210. 'wx_config' => [
  211. // 'app_id' => 'wx98c5fd5111be3125',
  212. // 'secret' => '0f6b3f1eb5198b0e89cff977d67c3740',
  213. 'app_id' => 'wx439b9d9527727911',
  214. 'secret' => '3a667f19a68cae15bd4276c7edad6346',
  215. 'mch_id' => '1685985755', // 商户号
  216. 'key' => '29452e7ad4db9fb53ddc1a8ab66ecb2a', // API 密钥 操作密码:667421
  217. // 如需使用敏感接口(如退款、发送红包等)需要配置 API 证书路径(登录商户平台下载 API 证书)
  218. 'cert_path' => env('root_path').'public/certs/apiclient_cert.pem',
  219. 'key_path' => env('root_path').'public/certs/apiclient_key.pem',
  220. // 下面为可选项
  221. // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名
  222. 'response_type' => 'array',
  223. 'log' => [
  224. 'level' => 'error',
  225. 'file' => env('runtime_path').'/log/wechat.log',
  226. ],
  227. ],
  228. 'weather_key'=>'125cc579816bceb875b413794c2b13d4',//获取聚合天气接口的key
  229. //-----登录限流配置--------
  230. 'login_throttles' => [
  231. 'enabled' => true, // 是否开启限流 true=开启 false=不开启
  232. 'time' => 1*60, // 间隔时间(s)
  233. 'attempts' => 5, // 最大登录次数
  234. 'lock' => 30*60 // 锁定时间(s)
  235. ],
  236. // 'addr_url' => 'https://mdyg.sdmingde.cn/h5/repair/index?code=',
  237. 'addr_url' => request()->domain().'/h5/repair/index?code=',
  238. // 上传excel文件
  239. 'max_upload_excel' => [
  240. 'size' => 30*1024*1024,
  241. 'ext' => 'xls,xlsx',
  242. // 'type' => implode(',',[
  243. // 'application/vnd.ms-excel',
  244. // 'application/msexcel',
  245. // 'application/x-msexcel',
  246. // 'application/x-ms-excel',
  247. // 'application/x-excel',
  248. // 'application/x-dos_ms_excel',
  249. // 'application/xls',
  250. // 'application/x-xls',
  251. // 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  252. // 'application/zip'
  253. // ])
  254. ],
  255. 'security_app' => [ // 安全保卫报警按钮配置
  256. 'id' => '',
  257. 'secret' => ''
  258. ],
  259. ];