rabin 3 ماه پیش
والد
کامیت
ab0ae19a61
3فایلهای تغییر یافته به همراه71 افزوده شده و 102 حذف شده
  1. 8 12
      config/env/localhost.php
  2. 32 47
      config/manage.php
  3. 31 43
      config/setting.php

+ 8 - 12
config/env/localhost.php

@@ -1,18 +1,15 @@
 <?php
-return array
-(
-    'db' => array
-    (
+return [
+    'db' => [
         'type' => 'Pdo',
         'host' => 'web-mysql',
         'port' => '3306',
         'name' => DEVER_PROJECT,
         'user' => 'root',
         'pwd' => '123456',
-    ),
+    ],
 
-    'log' => array
-    (
+    'log' => [
         'type' => 'Mongo',
         'host' => 'web-mongodb',
         'port' => '27017',
@@ -37,14 +34,13 @@ return array
         'user' => 'shemic',
         'precision' => 's',
         */
-    ),
+    ],
 
-    'redis' => array
-    (
+    'redis' => [
         'host' => 'server-redis', 
         'port' => '6379', 
         'password' => 
         'dm_redis_123', 
         'expire' => 2147483647
-    ),
-);
+    ],
+];

+ 32 - 47
config/manage.php

@@ -1,113 +1,98 @@
 <?php
 # 后台配置
-return array
-(
+return [
     # 设置系统
-    'system' => array
-    (
-        'sector' => array
-        (
+    'system' => [
+        'sector' => [
             'name' => '领域系统',
             'sort' => '1',
             'partition' => 'database.database',
             'info_table' => 'sector/info',
             'user_table' => 'sector/user',
             'role_table' => 'sector/role',
-        ),
-    ),
+        ],
+    ],
 
     # 设置模块
-    'module' => array
-    (
+    'module' => [
         # 领域系统下有三个模块,领域基础模块、领域账户模块、领域空间模块
-        'sector' => array
-        (
+        'sector' => [
             'system' => 'sector',
             'name' => '领域',
             'sort' => '1',
             'data_table' => 'sector/info',
-        ),
+        ],
 
-        'sector_user' => array
-        (
+        'sector_user' => [
             'system' => 'sector',
             'name' => '账户',
             'sort' => '2',
             'data_table' => 'sector/user',
-            'data_where' => array('id' => '{uid}'),
-        ),
+            'data_where' => ['id' => '{uid}'],
+        ],
 
-        'sector_place' => array
-        (
+        'sector_place' => [
             'system' => 'sector',
             'name' => '身份',
             'sort' => '3',
             'data_table' => 'place/info',
-            'data_where' => array('uid' => '{uid}'),
-        ),
-    ),
+            'data_where' => ['uid' => '{uid}'],
+        ],
+    ],
 
     # 父级菜单
-    'menu' => array
-    (
+    'menu' => [
         # 平台管理
-        'setting' => array
-        (
+        'setting' => [
             'name' => '配置',
             'icon' => 'settings-line',
             'sort' => '99',
             'module' => 'platform',
-        ),
+        ],
 
         # 领域管理
-        'sector' => array
-        (
+        'sector' => [
             'name' => '配置',
             'icon' => 'settings-line',
             'sort' => '100',
             'module' => 'sector',
-        ),
+        ],
 
         # 领域身份模块下的菜单
-        'sector_place_order' => array
-        (
+        'sector_place_order' => [
             'name' => '订单',
             'icon' => 'shopping-cart-2-line',
             'sort' => '98',
             'module' => 'sector_place',
             'app' => 'place_order',
-        ),
-        'sector_place_source' => array
-        (
+        ],
+        'sector_place_source' => [
             'name' => '资源',
             'icon' => 'settings-line',
             'sort' => '100',
             'module' => 'sector_place',
             'app' => 'place_source',
-        ),
-        'sector_place_channel' => array
-        (
+        ],
+        'sector_place_channel' => [
             'name' => '渠道',
             'icon' => 'album-line',
             'sort' => '101',
             'module' => 'sector_place',
             'app' => 'place_channel',
-        ),
-        'sector_place_user' => array
-        (
+        ],
+        'sector_place_user' => [
             'name' => '用户',
             'icon' => 'file-user-line',
             'sort' => '103',
             'module' => 'sector_place',
             'app' => 'place_user',
-        ),
-        'sector_place_set' => array
-        (
+        ],
+        'sector_place_set' => [
             'name' => '配置',
             'icon' => 'settings-2-line',
             'sort' => '114',
             'module' => 'sector_place',
             'app' => 'place',
-        ),
-    )
-);
+        ],
+    ]
+];

+ 31 - 43
config/setting.php

@@ -1,107 +1,95 @@
 <?php
-return array
-(
+return [
     # 项目通信token
     'token' => DEVER_PROJECT,
     # 语言包 暂时无用
     'lang' => 'zh-cn',
-    'lang_pack' => array('zh-cn' => '简体中文', 'en' => '英文'),
+    'lang_pack' => ['zh-cn' => '简体中文', 'en' => '英文'],
 
     # 定义类型 互动使用的
-    'type' => array
-    (
+    'type' => [
         # 资源
         1 => 'place_source/info',
         2 => 'place_source/content',
         3 => 'place_act/review',
-    ),
+    ],
 
     # 哪个项目支持接口标准输出再定义
     'output_app' => ['place_interface'],
     # 接口标准输出再定义
-    'output' => array
-    (
+    'output' => [
         # 这里可以将框架自带的接口标准输出标识改成其他,如code、status、data改名
         //'code' => 'codeId',# 直接改成codeId
-        //'data' => array('test', 'e'), # 将原来data数组里的e提取出来,赋值给test
+        //'data' => ['test', 'e'], # 将原来data数组里的e提取出来,赋值给test
         # 扩展输出
         'u' => 'place_interface/core.getUpdate',
-    ),
+    ],
 
     # 路由解析设置
-    'route' => array
-    (
+    'route' => [
         'api/notify/(.*?)' => 'notify.common?s=$1',
-    ),
+    ],
 
     # 日志设置
-    'log' => array('type' => 'file', 'host' => 'host', 'port' => 'port'),
+    'log' => ['type' => 'file', 'host' => 'host', 'port' => 'port'],
 
     # 调试的shell名
     'shell' => 'debug',
 
     # 定义session
-    //'session' => array('host' => '', 'port' => '', 'path' => '', 'cookie' => ''),
+    //'session' => ['host' => '', 'port' => '', 'path' => '', 'cookie' => ''],
 
     # 定义数据库
-    'database' => array
-    (
+    'database' => [
         # 是否自动建表 默认为true
         'create' => true,
         # sql优化,暂时无用
         'opt' => true,
-        //'default' => array($env['db'], $env['db1'], 'type' => 'Pdo'),//读写分离
+        //'default' => [$env['db'], $env['db1'], 'type' => 'Pdo'],//读写分离
         'default' => $env['db'],
         'log' => $env['log'],
 
         # 分区设置 
-        'partition' => array
-        (
+        'partition' => [
             # 当前数据库是否支持自动建库,不支持改成false,则database不会自动建库,而是类似table按照表拆分
             'create' => true,
             # 类型:database 按照库拆分(分库) table 按照表拆分(分表) field 按照字段拆分(分区) where 按照条件拆分(分条件) Dever::session('database', 1)可以设置值
             'database' => 'date("Y")',
             'table' => 'date("Ym")',
             # 字段类型分几种:range范围、list列表、hash哈希、key分区
-            'field' => array
-            (
+            'field' => [
                 'type' => 'range',
                 'field' => 'cdate', 
                 'value' => 'date("Y-m-d 23:60:60")'//date("Y-m-d 23:60:60", strtotime("-1 day"))'
-            ),
+            ],
             /*
-            'field' => array
-            (
+            'field' => [
                 'type' => 'list',
                 'field' => 'type', 
-                'value' => array('1', '2', '3'),//3个值3个分区,然后也可以用Dever::call("manage/admin.test")来返回数组
-            ),
-            'field' => array
-            (
+                'value' => ['1', '2', '3'],//3个值3个分区,然后也可以用Dever::call("manage/admin.test")来返回数组
+            ],
+            'field' => [
                 'type' => 'hash',
                 'field' => 'id', 
                 'value' => '5'//5个分区
-            ),
-            'field' => array
-            (
+            ],
+            'field' => [
                 'type' => 'key',
                 'field' => 'id', 
                 'value' => '5'
-            ),*/
-            # where类型,一般在表中设置array('id' => 1),
+            ],*/
+            # where类型,一般在表中设置['id' => 1],
             //'where' => 'Dever::call("manage/admin.test")'
-        ),
-    ),
+        ],
+    ],
 
     # 定义模板
-    'template' => array
-    (
+    'template' => [
         'name' => 'pc',//模板配置,如果有手机版,直接配置:'pc,mobile'
-        'replace' => array
-        (
+        'replace' => [
             '../' => '{$host}',
-        ),
-    ),
+        ],
+    ],
     # 定义redis
     'redis' => $env['redis'],
-);
+];