Browse Source

修改忽略文件

wangzeyan
王泽彦 11 months ago
parent
commit
990ba95b22
  1. 2
      .gitignore
  2. 15
      niucloud/app/adminapi/config/config.php
  3. 21
      niucloud/app/adminapi/config/route.php
  4. 15
      niucloud/app/api/config/config.php
  5. 21
      niucloud/app/api/config/route.php
  6. 32
      niucloud/config/app.php
  7. 51
      niucloud/config/cache.php
  8. 39
      niucloud/config/captcha.php
  9. 24
      niucloud/config/console.php
  10. 20
      niucloud/config/cookie.php
  11. 5
      niucloud/config/cron.php
  12. 63
      niucloud/config/database.php
  13. 24
      niucloud/config/filesystem.php
  14. 45
      niucloud/config/gateway_worker.php
  15. 30
      niucloud/config/imgcaptcha.php
  16. 79
      niucloud/config/install.php
  17. 27
      niucloud/config/lang.php
  18. 45
      niucloud/config/log.php
  19. 8
      niucloud/config/middleware.php
  20. 16
      niucloud/config/niucloud.php
  21. 26
      niucloud/config/oauth.php
  22. 33
      niucloud/config/pay.php
  23. 22
      niucloud/config/poster.php
  24. 45
      niucloud/config/route.php
  25. 19
      niucloud/config/session.php
  26. 36
      niucloud/config/sms.php
  27. 44
      niucloud/config/terminal.php
  28. 10
      niucloud/config/trace.php
  29. 98
      niucloud/config/upload.php
  30. 6
      niucloud/config/version.php
  31. 31
      niucloud/config/view.php
  32. 68
      niucloud/core/printer/sdk/yilianyun/config/YlyConfig.php

2
.gitignore

@ -7,5 +7,3 @@
/.idea /.idea
/niucloud/runtime /niucloud/runtime
/niucloud/vendor /niucloud/vendor
/niucloud/config
config

15
niucloud/app/adminapi/config/config.php

@ -0,0 +1,15 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
return [
// 默认输出类型
'default_return_type' => 'json',
];

21
niucloud/app/adminapi/config/route.php

@ -0,0 +1,21 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
return [
// 是否强制使用路由
'url_route_must' => true,
// 合并路由规则
'route_rule_merge' => true,
// 路由是否完全匹配
'route_complete_match' => true,
// 是否自动转换URL中的控制器和操作名
'url_convert' => false,
];

15
niucloud/app/api/config/config.php

@ -0,0 +1,15 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
return [
// 默认输出类型
'default_return_type' => 'json',
];

21
niucloud/app/api/config/route.php

@ -0,0 +1,21 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
return [
// 是否强制使用路由
'url_route_must' => true,
// 合并路由规则
'route_rule_merge' => true,
// 路由是否完全匹配
'route_complete_match' => true,
// 是否自动转换URL中的控制器和操作名
'url_convert' => true,
];

32
niucloud/config/app.php

@ -0,0 +1,32 @@
<?php
// +----------------------------------------------------------------------
// | 应用设置
// +----------------------------------------------------------------------
return [
// 应用地址
'app_host' => env('app.host', ''),
// 应用的命名空间
'app_namespace' => '',
// 是否启用路由
'with_route' => true,
// 默认应用
'default_app' => 'index',
// 默认时区
'default_timezone' => 'Asia/Shanghai',
// 应用映射(自动多应用模式有效)
'app_map' => [],
// 域名绑定(自动多应用模式有效)
'domain_bind' => [],
// 禁止URL访问的应用列表(自动多应用模式有效)
'deny_app_list' => [],
// 异常页面的模板文件
'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
// 错误显示信息,非调试模式有效
'error_message' => '页面错误!请稍后再试~',
// 显示错误信息
'show_error_msg' => false,
];

51
niucloud/config/cache.php

@ -0,0 +1,51 @@
<?php
// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------
return [
// 默认缓存驱动
'default' => env('cache.driver', 'file'),
// 缓存连接方式配置
'stores' => [
'file' => [
// 驱动方式
'type' => 'File',
// 缓存保存目录
'path' => app()->getRuntimePath() . 'cache' . DIRECTORY_SEPARATOR,
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
// 缓存标签前缀
'tag_prefix' => 'tag:',
// 序列化机制 例如 ['serialize', 'unserialize']
'serialize' => [],
],
// 更多的缓存连接
// redis
'redis' => [
// 驱动方式
'type' => 'redis',
// 服务器地址
'host' => env('redis.redis_hostname', '127.0.0.1'),
// 端口
'port' => env('redis.port', '6379'),
// 密码
'password' => env('redis.redis_password', ''),
// 缓存有效期 0表示永久缓存
'expire' => 0 ,
// 缓存前缀
'prefix' => '',
// 缓存标签前缀
'tag_prefix' => 'tag:',
// 数据库 0号数据库
'select' => env('redis.select', 0),
'serialize' => [],
// 服务端主动关闭
'timeout' => 0
],
],
];

39
niucloud/config/captcha.php

@ -0,0 +1,39 @@
<?php
// +----------------------------------------------------------------------
// | Captcha配置文件
// +----------------------------------------------------------------------
return [
//验证码位数
'length' => 4,
// 验证码字符集合
'codeSet' => '1234567890',
// 验证码过期时间
'expire' => 1800,
// 是否使用中文验证码
'useZh' => false,
// 是否使用算术验证码
'math' => false,
// 是否使用背景图
'useImgBg' => false,
//验证码字符大小
'fontSize' => 14,
// 是否使用混淆曲线
'useCurve' => true,
//是否添加杂点
'useNoise' => true,
// 验证码字体 不设置则随机
'fontttf' => '',
//背景颜色
'bg' => [243, 251, 254],
// 验证码图片高度
'imageH' => 36,
// 验证码图片宽度
'imageW' => 100,
// 添加额外的验证码设置
// verify => [
// 'length'=>4,
// ...
//],
];

24
niucloud/config/console.php

@ -0,0 +1,24 @@
<?php
// +----------------------------------------------------------------------
// | 控制台配置
// +----------------------------------------------------------------------
use core\dict\DictLoader;
$data = [
// 指令定义
'commands' => [
'addon:install' => 'app\command\Addon\Install',
'addon:uninstall' => 'app\command\Addon\Uninstall',
'menu:refresh' => 'app\command\Menu',
//消息队列 自定义命令
'queue:work' => 'app\command\queue\Queue',
'queue:restart' => 'app\command\queue\Queue',
'queue:listen' => 'app\command\queue\Queue',
//计划任务 自定义命令
'cron:schedule' => 'app\command\schedule\Schedule',
//wokrerman的启动停止和重启
'workerman' => 'app\command\workerman\Workerman',
],
];
return (new DictLoader("Console"))->load($data);

20
niucloud/config/cookie.php

@ -0,0 +1,20 @@
<?php
// +----------------------------------------------------------------------
// | Cookie设置
// +----------------------------------------------------------------------
return [
// cookie 保存时间
'expire' => 0,
// cookie 保存路径
'path' => '/',
// cookie 有效域名
'domain' => '',
// cookie 启用安全传输
'secure' => false,
// httponly设置
'httponly' => false,
// 是否使用 setcookie
'setcookie' => true,
// samesite 设置,支持 'strict' 'lax'
'samesite' => '',
];

5
niucloud/config/cron.php

@ -0,0 +1,5 @@
<?php
return [
'tasks' => []
];

63
niucloud/config/database.php

@ -0,0 +1,63 @@
<?php
return [
// 默认使用的数据库连接配置
'default' => env('database.driver', 'mysql'),
// 自定义时间查询规则
'time_query_rule' => [],
// 自动写入时间戳字段
// true为自动识别类型 false关闭
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
'auto_timestamp' => true,
// 时间字段取出后的默认时间格式
'datetime_format' => 'Y-m-d H:i:s',
// 时间字段配置 配置格式:create_time,update_time
'datetime_field' => '',
// 数据库连接配置信息
'connections' => [
'mysql' => [
// 数据库类型
'type' => env('database.type', 'mysql'),
// 服务器地址
'hostname' => env('database.hostname', '127.0.0.1'),
// 数据库名
'database' => env('database.database', ''),
// 用户名
'username' => env('database.username', 'root'),
// 密码
'password' => env('database.password', ''),
// 端口
'hostport' => env('database.hostport', '3306'),
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => env('database.charset', 'utf8mb4'),
// 数据库表前缀
'prefix' => env('database.prefix', 'ns_'),
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效
'rw_separate' => false,
// 读写分离后 主服务器数量
'master_num' => 1,
// 指定从服务器序号
'slave_no' => '',
// 是否严格检查字段是否存在
'fields_strict' => true,
// 是否需要断线重连
'break_reconnect' => false,
// 监听SQL
'trigger_sql' => env('app_debug', true),
// 开启字段缓存
'fields_cache' => false,
],
// 更多的数据库配置信息
],
];

24
niucloud/config/filesystem.php

@ -0,0 +1,24 @@
<?php
return [
// 默认磁盘
'default' => env('filesystem.driver', 'local'),
// 磁盘列表
'disks' => [
'local' => [
'type' => 'local',
'root' => app()->getRuntimePath() . 'storage',
],
'public' => [
// 磁盘类型
'type' => 'local',
// 磁盘路径
'root' => app()->getRootPath() . 'public/storage',
// 磁盘路径对应的外部URL路径
'url' => '/storage',
// 可见性
'visibility' => 'public',
],
// 更多的磁盘配置信息
],
];

45
niucloud/config/gateway_worker.php

@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | Workerman设置 仅对 php think worker:gateway 指令有效
// +----------------------------------------------------------------------
return [
// 扩展自身需要的配置
'protocol' => 'websocket', // 协议 支持 tcp udp unix http websocket text
'host' => '0.0.0.0', // 监听地址
'port' => 2348, // 监听端口
'socket' => '', // 完整监听地址
'context' => [], // socket 上下文选项
'register_deploy' => true, // 是否需要部署register
'businessWorker_deploy' => true, // 是否需要部署businessWorker
'gateway_deploy' => true, // 是否需要部署gateway
// Register配置
'registerAddress' => '127.0.0.1:1236',
// Gateway配置
'name' => 'thinkphp',
'count' => 1,
'lanIp' => '127.0.0.1',
'startPort' => 2000,
'daemonize' => false,
'pingInterval' => 30,
'pingNotResponseLimit' => 0,
'pingData' => '{"type":"ping"}',
// BusinsessWorker配置
'businessWorker' => [
'name' => 'BusinessWorker',
'count' => 1,
'eventHandler' => '\think\worker\Events',
],
];

30
niucloud/config/imgcaptcha.php

@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
/**
* 请将该文件放置于config目录
*/
use think\facade\Cache;
return [
'font_file' => '', //自定义字体包路径, 不填使用默认值
//文字验证码
'click_world' => [
'backgrounds' => []
],
//滑动验证码
'block_puzzle' => [
'backgrounds' => [], //背景图片路径, 不填使用默认值
'templates' => [], //模板图
'offset' => 10, //容错偏移量
],
//水印
'watermark' => [
'fontsize' => 12,
'color' => '#ffffff',
'text' => ''
],
'cache' => [
'constructor' => [Cache::class, 'instance']
]
];

79
niucloud/config/install.php

@ -0,0 +1,79 @@
<?php
$addon_dir = root_path() . 'addon';
$addons = array_diff(scandir($addon_dir), ['.', '..']);
foreach ($addons as $addon) {
$install_php = $addon_dir . DIRECTORY_SEPARATOR . $addon . DIRECTORY_SEPARATOR . 'install.php';
if (file_exists($install_php)) {
$addon_info = json_decode(file_get_contents($addon_dir . DIRECTORY_SEPARATOR . $addon . DIRECTORY_SEPARATOR . 'info.json'), true);
if (!isset($addon_info['type']) || $addon_info['type'] != 'app') continue;
return include $install_php;
}
}
return [
'website_name' => 'NIUCLOUD-ADMIN',
// logo
'logo' => 'logo.jpg',
// 官网地址
'website_url' => 'https://www.niucloud.com',
// 论坛地址
'bbs_url' => 'http://bbs.niucloud.com',
// 编译帮助手册
'build_manual' => 'https://www.kancloud.cn/niushop/niucloud-admin-app/3199825',
// 安装协议
'agreement' => '<strong>版权所有 (c)2023,niucloud-admin保留所有权利。</strong>
<p>
感谢您选择niucloud-admin【以下简称niucloud】,niucloud-admin后台采用thinkphp6+php8+mysql,前端采用uniapp前后端分离的技术开发,全部源码开放。 <br/>
为了使您正确并合法的使用本软件,请您在使用前务必阅读清楚下面的协议条款:
</p>
<p>
<strong>一、本协议适用于niucloud-admin框架以及框架内所有应用,使用前请您务必仔细阅读本协议须知并勾选接受或者不接受,如不接受此协议,那么您无权利继续注册并使用本协议涉及的所有服务,如果您继续注册,登录,订阅等行为,则视为默认接受本协议。niucloud官方对本授权协议拥有最终解释权。</strong>
</p>
<p>
<strong>二、协议许可权利 </strong>
<ol>
<li>1、用户接受并承诺遵守本协议才可登录niucloud-admin官网订购应用,如果用户不同意,那么不允许在niucloud-admin官网注册账号并登录体验。</li>
<li>2、用户必须是具有独立民事责任行为能力的自然人、法人或其他组织个人。若用户不具备前述资格,那么该用户及其监护人应承担导致的一切后果。并且官方有权利对其账号进行冻结,对官方造成的利益损害有权进行申诉索赔。</li>
<li>3、用户可登录niucloud-admin官网下载并安装免费版应用。</li>
<li>4、若需要安装付费版应用,用户需要登录niucloud-admin官网付费并订购付费版应用后才可下载安装。</li>
<li>5、在更新niucloud-admin框架到最新版时,请务必对原整站内容进行备份,否则niucloud官方对升级过程中造成的数据丢失等问题不承担任何责任。</li>
<li>6、niucloud官方下架应用造成的无法更新,官方不承担任何责任。</li>
<li>7、niucloud官方因商业需求,暂停应用的更新,官方不承担任何责任。</li>
<li>8、niucloud官网有权根据需要不时地制订、修改本协议或各类规则,并以公示的方式进行公告,不再单独通知用户。变更后的协议和规则一经公布后,立即自动生效。如用户不同意相关变更,应当立即停止使用niucloud-admin付费应用。如果用户继续订阅、使用niucloud-admin付费应用,即表示用户接受经修订的协议。</li>
</ol>
</p>
<p>
<strong>三、协议规定的约束和限制</strong>
<ol>
<li>1、请尊重开发人员劳动成果,严禁对本框架进行转卖、销售或二次开发后转卖、销售等商业行为。</li>
<li>2、任何企业和个人不允许对程序代码以任何形式任何目的再发布。</li>
<li>3、基于niucloud-admin应用从事的任何商业行为,都与niucloud官方无关。</li>
<li>4、授权niucloud-admin付费应用时,必须要确保授权信息主体录入的准确性,否则出现的法律纠纷与niucloud官方无关,需要自行解决。</li>
<li>5、应用金额以最终结算价格为准,已售出的应用不做任何差价补偿。</li>
<li>6、如果用户利用特殊手段以低价或者免费获得付费应用,niucloud官方有权对应用进行回收。</li>
<li>7、niucloud-admin付费应用一旦完成交易下载源码,不得以任何形式和理由进行退款,请在购买前仔细阅读本协议。</li>
<li>8、基于niucloud-admin框架进行应用的开发,必须保留框架版权信息。</li>
</ol>
</p>
<p>
<strong>四、知识产权声明</strong>
<ol>
<li>1、niucloud-admin框架应用源代码所有权和著作权归niucloud官方所有,基于niucloud-admin框架开发的应用,所有权和著作权归应用开发商所有。</li>
<li>2、niucloud-admin框架所依托的代码、文字、图片等著作权、专利权及其他知识产权均归niucloud官方所有,除另外有特别声明。</li>
</ol>
</p>
<p><strong>五、有限担保和免责声明</strong></p>
<p>
本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。<br/>
用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。
电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装niucloud-admin框架,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。
</p>',
// 站点名称
'admin_site_name' => 'NIUCLOUD ADMIN',
// admin 端登录页默认图
'admin_login_bg' => 'install/img/niushop_login_index_left.jpg',
// admin 端默认logo
'admin_logo' => 'install/img/logo.jpg'
];

27
niucloud/config/lang.php

@ -0,0 +1,27 @@
<?php
// +----------------------------------------------------------------------
// | 多语言设置
// +----------------------------------------------------------------------
return [
// 默认语言
'default_lang' => env('lang.default_lang', 'zh-cn'),
// 允许的语言列表
'allow_lang_list' => ['zh-cn', 'en'],
// 多语言自动侦测变量名
'detect_var' => 'lang',
// 是否使用Cookie记录
'use_cookie' => false,
// 多语言cookie变量
'cookie_var' => 'lang',
// 多语言header变量
'header_var' => 'lang',
'extend_list' => [
],
// Accept-Language转义为对应语言包名称
'accept_language' => [
'zh-hans-cn' => 'zh-cn',
],
// 是否支持语言分组
'allow_group' => true,
];

45
niucloud/config/log.php

@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | 日志设置
// +----------------------------------------------------------------------
return [
// 默认日志记录通道
'default' => env('log.channel', 'file'),
// 日志记录级别
'level' => [],
// 日志类型记录的通道 ['error'=>'email',...]
'type_channel' => [],
// 关闭全局日志写入
'close' => false,
// 全局日志处理 支持闭包
'processor' => null,
// 日志通道列表
'channels' => [
'file' => [
// 日志记录方式
'type' => 'File',
// 日志保存目录
'path' => '',
// 单文件日志写入
'single' => false,
// 独立日志级别
'apart_level' => [],
// 最大日志文件数量
'max_files' => 0,
// 使用JSON格式记录
'json' => false,
// 日志处理
'processor' => null,
// 关闭通道日志写入
'close' => false,
// 日志输出格式化
'format' => '[%s][%s] %s',
// 是否实时写入
'realtime_write' => false,
],
// 其它日志通道配置
],
];

8
niucloud/config/middleware.php

@ -0,0 +1,8 @@
<?php
// 中间件配置
return [
// 别名或分组
'alias' => [],
// 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
'priority' => [],
];

16
niucloud/config/niucloud.php

@ -0,0 +1,16 @@
<?php
return [
'auth' => [
'code' => env('niucloud.code', ''),//授权码
'secret' => env('niucloud.secret', ''),//授权秘钥
],
'http' => [
'max_retries' => 1,// 重试次数,默认 1,指定当 http 请求失败时重试的次数。
'retry_delay' => 1000,//重试延迟间隔(单位:ms),默认 500
'timeout' => 5.0,//最大运行时间(超时)
'verify' => false,//请求时验证SSL证书行为。设置成 true 启用SSL证书验证,默认使用操作系统提供的CA包。设置成 false 禁用证书验证(这是不安全的!)。设置成字符串启用验证,并使用该字符串作为自定义证书CA包的路径。
],
'response_type' => 'array',
];

26
niucloud/config/oauth.php

@ -0,0 +1,26 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
return [
//默认驱动
'default' => 'wechat',
//驱动厂商列表及参数-第三方授权
'drivers' => [
//微信公众号
'wechat' => [
],
//微信小程序
'weapp' => [
]
]
];

33
niucloud/config/pay.php

@ -0,0 +1,33 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
use core\dict\DictLoader;
$system = [
//默认驱动
'default' => 'wechatpay',
//驱动
'drivers' => [
//微信
'wechatpay' => [],
//支付宝
'alipay' => [],
//余额
'balancepay' => [
'driver' => 'app\service\core\paytype\CoreBalanceService', //反射类的名字
],
'offlinepay' => [
'driver' => 'app\service\core\paytype\CoreOfflineService'
]
]
];
return (new DictLoader("Config"))->load(['data' => $system, 'name' => 'pay']);

22
niucloud/config/poster.php

@ -0,0 +1,22 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
return [
//默认驱动
'default' => 'poster',
//驱动厂商列表及参数-海报
'drivers' => [
//牛云默认海报
'poster' => [
]
]
];

45
niucloud/config/route.php

@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | 路由设置
// +----------------------------------------------------------------------
return [
// pathinfo分隔符
'pathinfo_depr' => '/',
// URL伪静态后缀
'url_html_suffix' => 'html',
// URL普通方式参数 用于自动生成
'url_common_param' => true,
// 是否开启路由延迟解析
'url_lazy_route' => false,
// 是否强制使用路由
'url_route_must' => false,
// 合并路由规则
'route_rule_merge' => false,
// 路由是否完全匹配
'route_complete_match' => false,
// 访问控制器层名称
'controller_layer' => 'controller',
// 空控制器名
'empty_controller' => 'Error',
// 是否使用控制器后缀
'controller_suffix' => false,
// 默认的路由变量规则
'default_route_pattern' => '[\w\.]+',
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
'request_cache_key' => false,
// 请求缓存有效期
'request_cache_expire' => null,
// 全局请求缓存排除规则
'request_cache_except' => [],
// 默认控制器名
'default_controller' => 'Index',
// 默认操作名
'default_action' => 'index',
// 操作方法后缀
'action_suffix' => '',
// 默认JSONP格式返回的处理方法
'default_jsonp_handler' => 'jsonpReturn',
// 默认JSONP处理方法
'var_jsonp_handler' => 'callback',
];

19
niucloud/config/session.php

@ -0,0 +1,19 @@
<?php
// +----------------------------------------------------------------------
// | 会话设置
// +----------------------------------------------------------------------
return [
// session name
'name' => 'PHPSESSID',
// SESSION_ID的提交变量,解决flash上传跨域
'var_session_id' => '',
// 驱动方式 支持file cache
'type' => 'file',
// 存储连接标识 当type使用cache的时候有效
'store' => null,
// 过期时间
'expire' => 1440,
// 前缀
'prefix' => '',
];

36
niucloud/config/sms.php

@ -0,0 +1,36 @@
<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
use core\dict\DictLoader;
$system = [
//默认驱动
'default' => 'aliyun',
//驱动厂商列表及参数-短信
'drivers' => [
//阿里云
'aliyun' => [
'driver' => 'core\sms\Aliyun', //反射类的名字
'app_key' => '',
'secret_key' => '',
'sign' => '',
],
//腾讯云
'tencent' => [
'secret_id' => '',
'secret_key' => '',
'sign' => '',
'app_id' => '',
]
]
];
return (new DictLoader("Config"))->load(['data' => $system, 'name' => 'sms']);

44
niucloud/config/terminal.php

@ -0,0 +1,44 @@
<?php
// +----------------------------------------------------------------------
// | Trace设置 开启调试模式后有效
// +----------------------------------------------------------------------
return [
// 命令行
'commands' => [
// 查看版本的命令
'version' => [
'npm' => 'npm -v',
'node' => 'node -v',
],
'npm-admin' => [
'cwd' => 'admin',
'command' => 'npm install',
],
'npm-web' => [
'cwd' => 'web',
'command' => 'npm install',
],
'npm-uni-app' => [
'cwd' => 'uni-app',
'command' => 'npm install',
],
'composer-install' => [
'cwd' => 'niucloud',
'command' => 'composer update',
],
// 切换到国内镜像
'set-mirror' => [
//切换到淘宝镜像
'npm' => 'npm config set registry https://registry.npmjs.org',
//切换到阿里云镜像
'composer' => 'composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/',
],
],
];

10
niucloud/config/trace.php

@ -0,0 +1,10 @@
<?php
// +----------------------------------------------------------------------
// | Trace设置 开启调试模式后有效
// +----------------------------------------------------------------------
return [
// 内置Html和Console两种方式 支持扩展
'type' => env('app_trace_type', 'Html'),
// 读取的日志通道名
'channel' => '',
];

98
niucloud/config/upload.php

@ -0,0 +1,98 @@
<?php
use core\dict\DictLoader;
$system = [
'default' => 'local',//默认驱动
'drivers' => [
//本地上传
'local' => [],
//七牛云
'qiniu' => [
'access_key' => '',
'secret_key' => '',
'bucket' => ''
],
//阿里云
'aliyun' => [
'access_key' => '',
'secret_key' => '',
'endpoint' => '',
'bucket' => ''
],
//腾讯云
'tencent' => [
'access_key' => '',
'secret_key' => '',
'region' => '',
'bucket' => ''
],
],
// 默认规则
'rules' => [
'image' => [
'ext' => ['jpg', 'jpeg', 'png', 'gif'],
'mime' => ['image/jpeg', 'image/gif', 'image/png'],
'size' => 10485760
],
'video' => [
'ext' => ['mp4'],
'mime' => ['video/mp4'],
'size' => 104857600
],
'wechat' => [
'ext' => ['pem', 'key'],
'mime' => [
'application/x-x509-ca-cert',
'application/octet-stream',
'application/x-iwork-keynote-sffkey'
],
'size' => 2097152
],
'aliyun' => [
'ext' => ['crt'],
'mime' => [
'application/x-x509-ca-cert',
'application/octet-stream'
],
'size' => 2097152
],
'applet' => [
'ext' => ['zip', 'rar'],
'mime' => [
'application/zip',
'application/vnd.rar',
'application/x-zip-compressed'
],
'size' => 2097152
],
'excel' => [
'ext' => ['xls', 'xlsx'],
'mime' => [
'application/vnd.ms-excel',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
],
'size' => 10485760
]
],
'thumb' => [
'thumb_type' => [
'big' => [
'width' => 1200,
'height' => 1200,
],
'mid' => [
'width' => 800,
'height' => 800,
],
'small' => [
'width' => 200,
'height' => 200,
],
]
]
];
return (new DictLoader("Config"))->load(['data' => $system, 'name' => 'upload']);

6
niucloud/config/version.php

@ -0,0 +1,6 @@
<?php
return [
'version' => '1.5.1',
'code' => '2025022201'
];

31
niucloud/config/view.php

@ -0,0 +1,31 @@
<?php
// +----------------------------------------------------------------------
// | 模板设置
// +----------------------------------------------------------------------
return [
// 模板引擎类型使用Think
'type' => 'Think',
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
'auto_rule' => 1,
// 模板目录名
'view_dir_name' => 'view',
// 模板后缀
'view_suffix' => 'html',
// 模板文件名分隔符
'view_depr' => DIRECTORY_SEPARATOR,
// 模板引擎普通标签开始标记
'tpl_begin' => '{',
// 模板引擎普通标签结束标记
'tpl_end' => '}',
// 标签库标签开始标记
'taglib_begin' => '{',
// 标签库标签结束标记
'taglib_end' => '}',
'tpl_cache' => false, //模板缓存,部署模式后改为true
'tpl_replace_string' => [
'INSTALL_IMG' => '/install/img',
'INSTALL_CSS' => '/install/css',
'INSTALL_JS' => '/install/js',
]
];

68
niucloud/core/printer/sdk/yilianyun/config/YlyConfig.php

@ -0,0 +1,68 @@
<?php
namespace core\printer\sdk\yilianyun\config;
use InvalidArgumentException;
class YlyConfig
{
private $clientId = '';
private $clientSecret = '';
private $requestUrl = "https://open-api.10ss.net";
private $log;
public function __construct($clientId, $clientSecret)
{
if ($clientId == null || $clientId == "") {
throw new InvalidArgumentException("clientId is required");
}
if ($clientSecret == null || $clientSecret == "") {
throw new InvalidArgumentException("clientSecret is required");
}
$this->clientId = $clientId;
$this->clientSecret = $clientSecret;
}
public function getClientId()
{
return $this->clientId;
}
public function getClientSecret()
{
return $this->clientSecret;
}
public function getRequestUrl()
{
return $this->requestUrl;
}
public function setRequestUrl($requestUrl)
{
$this->requestUrl = $requestUrl;
}
public function getLog()
{
return $this->log;
}
public function setLog($log)
{
if (!method_exists($log, "info")) {
throw new InvalidArgumentException("logger need have method 'info(\$message)'");
}
if (!method_exists($log, "error")) {
throw new InvalidArgumentException("logger need have method 'error(\$message)'");
}
$this->log = $log;
}
}
Loading…
Cancel
Save