mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 15:00:52 +00:00
【程序目录】优化功能
This commit is contained in:
parent
cb092b9fab
commit
d63e63d986
@ -85,6 +85,10 @@ class SystemCrud extends AuthController
|
||||
['deleteField', []],//删除的表字段
|
||||
]);
|
||||
|
||||
if (!preg_match('/^[\x{4e00}-\x{9fa5}a-zA-Z]+$/u', $data['menuName'])) return app('json')->fail('菜单名称只能是中文或者英文');
|
||||
if (!preg_match('/^[\x{4e00}-\x{9fa5}a-zA-Z]+$/u', $data['modelName'])) return app('json')->fail('模块名称只能是中文或者英文');
|
||||
if (!preg_match('/^[a-zA-Z_]+$/u', $data['tableName'])) return app('json')->fail('表名称只能是英文和下划线组成');
|
||||
|
||||
$fromField = $searchField = $hasOneField = $columnField = $tableIndex = [];
|
||||
|
||||
$dictionaryids = array_column($data['tableField'], 'dictionary_id');
|
||||
|
||||
@ -256,6 +256,7 @@ class SystemAttachmentServices extends BaseServices
|
||||
if (isset($pathinfo['extension']) && !in_array($pathinfo['extension'], ['avi', 'mp4', 'wmv', 'rm', 'mpg', 'mpeg', 'mov', 'flv', 'swf'])) {
|
||||
throw new AdminException(400558);
|
||||
}
|
||||
$data['chunkNumber'] = (int)$data['chunkNumber'];
|
||||
$public_dir = app()->getRootPath() . 'public';
|
||||
$dir = '/uploads/attach/' . date('Y') . DIRECTORY_SEPARATOR . date('m') . DIRECTORY_SEPARATOR . date('d');
|
||||
$all_dir = $public_dir . $dir;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user