模板文件目录更改
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
// SentCMS常量定义
|
||||
define('sent_version', '4.0.0');
|
||||
define('sent_path_addons', __DIR__ . '/../addons' . DS);
|
||||
define('sent_path_addons', __DIR__ . '/../addons/');
|
||||
|
||||
//字符串解密加密
|
||||
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
|
||||
|
||||
1044
composer.lock
generated
Normal file
1044
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@ return [
|
||||
// 驱动方式
|
||||
'type' => 'File',
|
||||
// 缓存保存目录
|
||||
'path' => '',
|
||||
'path' => app()->getRuntimePath() . 'cache',
|
||||
// 缓存前缀
|
||||
'prefix' => '',
|
||||
// 缓存有效期 0表示永久缓存
|
||||
|
||||
@@ -46,7 +46,7 @@ return [
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => Env::get('database.charset', 'utf8'),
|
||||
// 数据库表前缀
|
||||
'prefix' => Env::get('database.prefix', 'sent_'),
|
||||
'prefix' => Env::get('database.prefix', ''),
|
||||
// 数据库调试模式
|
||||
'debug' => Env::get('database.debug', true),
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
@@ -58,7 +58,7 @@ return [
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => false,
|
||||
'fields_strict' => true,
|
||||
// 是否需要进行SQL性能分析
|
||||
'sql_explain' => false,
|
||||
// 是否需要断线重连
|
||||
|
||||
@@ -29,23 +29,25 @@ return [
|
||||
'channels' => [
|
||||
'file' => [
|
||||
// 日志记录方式
|
||||
'type' => 'File',
|
||||
'type' => 'File',
|
||||
// 日志保存目录
|
||||
'path' => '',
|
||||
'path' => app()->getRuntimePath() . 'log',
|
||||
// 单文件日志写入
|
||||
'single' => false,
|
||||
'single' => false,
|
||||
// 独立日志级别
|
||||
'apart_level' => [],
|
||||
'apart_level' => [],
|
||||
// 最大日志文件数量
|
||||
'max_files' => 0,
|
||||
'max_files' => 0,
|
||||
// 使用JSON格式记录
|
||||
'json' => false,
|
||||
'json' => false,
|
||||
// 日志处理
|
||||
'processor' => null,
|
||||
'processor' => null,
|
||||
// 关闭通道日志写入
|
||||
'close' => false,
|
||||
'close' => false,
|
||||
// 日志输出格式化
|
||||
'format' => '[%s][%s] %s',
|
||||
'format' => '[%s][%s] %s',
|
||||
// 是否实时写入
|
||||
'realtime_write' => false,
|
||||
],
|
||||
// 其它日志通道配置
|
||||
],
|
||||
|
||||
@@ -8,6 +8,8 @@ return [
|
||||
'type' => 'Think',
|
||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||
'auto_rule' => 1,
|
||||
// 模板基础路径
|
||||
'view_base' => '',
|
||||
// 模板路径
|
||||
'view_path' => '',
|
||||
// 模板后缀
|
||||
|
||||
@@ -14,5 +14,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
return [
|
||||
// 内置Html 支持扩展
|
||||
'type' => 'Html',
|
||||
'type' => 'Html',
|
||||
// 读取的日志通道名
|
||||
'channel' => '',
|
||||
];
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 1.1 KiB |
2
public/static/.gitignore
vendored
Normal file
2
public/static/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
@@ -288,58 +288,58 @@ define(['jquery', 'toastr','layer'], function($, Toastr, Layer){
|
||||
toastr: Toastr,
|
||||
layer: Layer
|
||||
},
|
||||
lang: function () {
|
||||
var args = arguments,
|
||||
string = args[0],
|
||||
i = 1;
|
||||
string = string.toLowerCase();
|
||||
//string = typeof Lang[string] != 'undefined' ? Lang[string] : string;
|
||||
if (typeof Lang !== 'undefined' && typeof Lang[string] !== 'undefined') {
|
||||
if (typeof Lang[string] == 'object')
|
||||
return Lang[string];
|
||||
string = Lang[string];
|
||||
} else if (string.indexOf('.') !== -1 && false) {
|
||||
var arr = string.split('.');
|
||||
var current = Lang[arr[0]];
|
||||
for (var i = 1; i < arr.length; i++) {
|
||||
current = typeof current[arr[i]] != 'undefined' ? current[arr[i]] : '';
|
||||
if (typeof current != 'object')
|
||||
break;
|
||||
}
|
||||
if (typeof current == 'object')
|
||||
return current;
|
||||
string = current;
|
||||
} else {
|
||||
string = args[0];
|
||||
}
|
||||
return string.replace(/%((%)|s|d)/g, function (m) {
|
||||
// m is the matched format, e.g. %s, %d
|
||||
var val = null;
|
||||
if (m[2]) {
|
||||
val = m[2];
|
||||
} else {
|
||||
val = args[i];
|
||||
// A switch statement so that the formatter can be extended. Default is %s
|
||||
switch (m) {
|
||||
case '%d':
|
||||
val = parseFloat(val);
|
||||
if (isNaN(val)) {
|
||||
val = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return val;
|
||||
});
|
||||
}
|
||||
lang: function () {
|
||||
var args = arguments,
|
||||
string = args[0],
|
||||
i = 1;
|
||||
string = string.toLowerCase();
|
||||
//string = typeof Lang[string] != 'undefined' ? Lang[string] : string;
|
||||
if (typeof Lang !== 'undefined' && typeof Lang[string] !== 'undefined') {
|
||||
if (typeof Lang[string] == 'object')
|
||||
return Lang[string];
|
||||
string = Lang[string];
|
||||
} else if (string.indexOf('.') !== -1 && false) {
|
||||
var arr = string.split('.');
|
||||
var current = Lang[arr[0]];
|
||||
for (var i = 1; i < arr.length; i++) {
|
||||
current = typeof current[arr[i]] != 'undefined' ? current[arr[i]] : '';
|
||||
if (typeof current != 'object')
|
||||
break;
|
||||
}
|
||||
if (typeof current == 'object')
|
||||
return current;
|
||||
string = current;
|
||||
} else {
|
||||
string = args[0];
|
||||
}
|
||||
return string.replace(/%((%)|s|d)/g, function (m) {
|
||||
// m is the matched format, e.g. %s, %d
|
||||
var val = null;
|
||||
if (m[2]) {
|
||||
val = m[2];
|
||||
} else {
|
||||
val = args[i];
|
||||
// A switch statement so that the formatter can be extended. Default is %s
|
||||
switch (m) {
|
||||
case '%d':
|
||||
val = parseFloat(val);
|
||||
if (isNaN(val)) {
|
||||
val = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return val;
|
||||
});
|
||||
}
|
||||
};
|
||||
//将Layer暴露到全局中去
|
||||
window.Layer = Layer;
|
||||
//将Toastr暴露到全局中去
|
||||
window.Toastr = Toastr;
|
||||
//将语言方法暴露到全局中去
|
||||
window.__ = Sent.lang;
|
||||
//将语言方法暴露到全局中去
|
||||
window.__ = Sent.lang;
|
||||
//将Sent渲染至全局
|
||||
window.Sent = Sent;
|
||||
|
||||
|
||||
1
view/README.md
Normal file
1
view/README.md
Normal file
@@ -0,0 +1 @@
|
||||
如果不使用模板,可以删除该目录
|
||||
Reference in New Issue
Block a user