app.php 9.5 KB

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