app.php 9.6 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. // 默认语言
  44. 'default_lang' => 'zh-cn',
  45. // 应用类库后缀
  46. 'class_suffix' => false,
  47. // 控制器类后缀
  48. 'controller_suffix' => false,
  49. // +----------------------------------------------------------------------
  50. // | 模块设置
  51. // +----------------------------------------------------------------------
  52. // 默认模块名
  53. 'default_module' => 'admin',
  54. // 禁止访问模块
  55. 'deny_module_list' => ['common'],
  56. // 默认控制器名
  57. 'default_controller' => 'Index',
  58. // 默认操作名
  59. 'default_action' => 'index',
  60. // 默认验证器
  61. 'default_validate' => '',
  62. // 默认的空模块名
  63. 'empty_module' => '',
  64. // 默认的空控制器名
  65. 'empty_controller' => 'Error',
  66. // 操作方法前缀
  67. 'use_action_prefix' => false,
  68. // 操作方法后缀
  69. 'action_suffix' => '',
  70. // 自动搜索控制器
  71. 'controller_auto_search' => false,
  72. // +----------------------------------------------------------------------
  73. // | URL设置
  74. // +----------------------------------------------------------------------
  75. // PATHINFO变量名 用于兼容模式
  76. 'var_pathinfo' => 's',
  77. // 兼容PATH_INFO获取
  78. 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
  79. // pathinfo分隔符
  80. 'pathinfo_depr' => '/',
  81. // HTTPS代理标识
  82. 'https_agent_name' => '',
  83. // IP代理获取标识
  84. 'http_agent_ip' => 'X-REAL-IP',
  85. // URL伪静态后缀
  86. 'url_html_suffix' => 'html',
  87. // URL普通方式参数 用于自动生成
  88. 'url_common_param' => false,
  89. // URL参数方式 0 按名称成对解析 1 按顺序解析
  90. 'url_param_type' => 0,
  91. // 是否开启路由延迟解析
  92. 'url_lazy_route' => false,
  93. // 是否强制使用路由
  94. 'url_route_must' => false,
  95. // 合并路由规则
  96. 'route_rule_merge' => false,
  97. // 路由是否完全匹配
  98. 'route_complete_match' => false,
  99. // 使用注解路由
  100. 'route_annotation' => false,
  101. // 域名根,如thinkphp.cn
  102. 'url_domain_root' => '',
  103. // 是否自动转换URL中的控制器和操作名
  104. 'url_convert' => true,
  105. // 默认的访问控制器层
  106. 'url_controller_layer' => 'controller',
  107. // 表单请求类型伪装变量
  108. 'var_method' => '_method',
  109. // 表单ajax伪装变量
  110. 'var_ajax' => '_ajax',
  111. // 表单pjax伪装变量
  112. 'var_pjax' => '_pjax',
  113. // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
  114. 'request_cache' => false,
  115. // 请求缓存有效期
  116. 'request_cache_expire' => null,
  117. // 全局请求缓存排除规则
  118. 'request_cache_except' => [],
  119. // 是否开启路由缓存
  120. 'route_check_cache' => false,
  121. // 路由缓存的Key自定义设置(闭包),默认为当前URL和请求类型的md5
  122. 'route_check_cache_key' => '',
  123. // 路由缓存类型及参数
  124. 'route_cache_option' => [],
  125. // 默认跳转页面对应的模板文件
  126. 'dispatch_success_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
  127. 'dispatch_error_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl',
  128. // 异常页面的模板文件
  129. 'exception_tmpl' => Env::get('root_path') . 'think_exception.tpl',
  130. // 错误显示信息,非调试模式有效
  131. 'error_message' => '页面错误!请稍后再试~',
  132. // 显示错误信息
  133. 'show_error_msg' => false,
  134. // 异常处理handle类 留空使用 \think\exception\Handle
  135. 'exception_handle' => '',
  136. // 上传文件最大限制
  137. 'max_upload_file_size' => 200*1024*1024,
  138. // 上传文件限制
  139. 'max_upload_img' => [
  140. 'size' => 5*1024*1024,
  141. 'ext' => 'jpg,png,jpeg'
  142. ],
  143. //短信配置
  144. 'sms_config' => [
  145. 'qx_corpid' => '',
  146. 'qx_pwd' => '',
  147. 'name' => '肿瘤医院' // 短信签名
  148. ],
  149. // 加密key
  150. 'encryption_key' => 'J2Y0A2T1E0C0HBLF',
  151. // 'gdmap' => 'ce7d8de041bde1fca7fa240a5936c15d', // 高德地图key
  152. // 'gdmap' => '8bd01c5dc5f4037eeb5652614e6f2692', // 高德地图key
  153. 'gdmap' => 'd65102f453a16310c714cf916102a535', // 高德地图key
  154. 'gdkey' => '9f12059fcd94d28c0d40a1f9f326d85e', // 高德地图安全秘钥
  155. 'max_send_sms' => 5, // 每个手机号每天发送手机号的数量
  156. 'jpush' => [ // 极光推送
  157. 'appkey' => '47566d1ef7fec7234b40d794',
  158. 'mastersecret' => 'dc374b56a6c960af850abd50'
  159. ],
  160. 'ucode' => 'hbzyy', //二维码标识 //正式使用后不可修改
  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. 'weather_key'=>'125cc579816bceb875b413794c2b13d4',//获取聚合天气接口的key
  211. //-----登录限流配置--------
  212. 'login_throttles' => [
  213. 'enabled' => true, // 是否开启限流 true=开启 false=不开启
  214. 'time' => 1*60, // 间隔时间(s)
  215. 'attempts' => 5, // 最大登录次数
  216. 'lock' => 30*60 // 锁定时间(s)
  217. ],
  218. 'addr_url' => 'https://mdyg.sdmingde.cn/h5/repair/index?code=',
  219. // 上传excel文件
  220. 'max_upload_excel' => [
  221. 'size' => 30*1024*1024,
  222. 'ext' => 'xls,xlsx',
  223. // 'type' => implode(',',[
  224. // 'application/vnd.ms-excel',
  225. // 'application/msexcel',
  226. // 'application/x-msexcel',
  227. // 'application/x-ms-excel',
  228. // 'application/x-excel',
  229. // 'application/x-dos_ms_excel',
  230. // 'application/xls',
  231. // 'application/x-xls',
  232. // 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  233. // 'application/zip'
  234. // ])
  235. ],
  236. 'security_app' => [ // 安全保卫报警按钮配置
  237. 'id' => '',
  238. 'secret' => ''
  239. ],
  240. ];