Sfoglia il codice sorgente

修改配置,准备部署

lizhen_gitee 1 anno fa
parent
commit
3cbed14b0c
2 ha cambiato i file con 23 aggiunte e 18 eliminazioni
  1. 14 17
      application/config.php
  2. 9 1
      application/database.php

+ 14 - 17
application/config.php

@@ -1,28 +1,17 @@
 <?php
 
-// +----------------------------------------------------------------------
-// | ThinkPHP [ WE CAN DO IT JUST THINK ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
-// +----------------------------------------------------------------------
-// | Author: liu21st <liu21st@gmail.com>
-// +----------------------------------------------------------------------
-use think\Env;
 
-return [
+
+$config = [
     // +----------------------------------------------------------------------
     // | 应用设置
     // +----------------------------------------------------------------------
     // 应用命名空间
     'app_namespace'          => 'app',
     // 应用调试模式
-    'app_debug'              => Env::get('app.debug', false),
     'app_debug'              => true,
     // 应用Trace
-    'app_trace'              => Env::get('app.trace', false),
-    'app_trace'              => true,
+    'app_trace'              => false,
     // 应用模式状态
     'app_status'             => '',
     // 是否支持多模块
@@ -312,11 +301,19 @@ return [
     'domain_cdnurl' => 'https://mingxiang-1320843483.cos.ap-nanjing.myqcloud.com',
 //    'domain_cdnurl' => 'http://mingxiang.com',
     //h5页面地址
-    'h5_url' => 'http://mingxiangweb.huxiukeji.cn',
+    'h5_url' => 'http://www.mxjy888.com',
 
     //小程序
     'wxMiniProgram' => [
-        'appid'=>'wxfbf1d5e8ade16b4d', //公司测试
-        'secret'=>'eea1bbac593f085d726b752300ba6ee7', //公司测试
+        'appid'=>'', //公司测试
+        'secret'=>'', //公司测试
     ],
 ];
+
+//实际配置
+$dev_config = [];
+if(is_file(APP_PATH.'config_dev.php')) {
+    $dev_config = include_once APP_PATH.'config_dev.php';
+}
+
+return array_merge($config, $dev_config);

+ 9 - 1
application/database.php

@@ -12,7 +12,7 @@
 
 use think\Env;
 
-return [
+$database_config =  [
     // 数据库类型
     'type'            => Env::get('database.type', 'mysql'),
     // 服务器地址
@@ -54,3 +54,11 @@ return [
     // 是否需要进行SQL性能分析
     'sql_explain'     => false,
 ];
+
+//实际配置
+$dev_config = [];
+if(is_file(APP_PATH.'database_dev.php')) {
+    $dev_config = include_once APP_PATH.'database_dev.php';
+}
+
+return array_merge($database_config, $dev_config);