优化移动端弹窗大小判断

优化上传文件名过滤
pull/347/MERGE v1.3.2.20220113
Karson 2022-01-13 14:41:43 +08:00
parent ff85bb3b21
commit d785d321f7
6 changed files with 24 additions and 8 deletions

View File

@ -181,6 +181,7 @@ class Upload
$suffix = $this->fileInfo['suffix'];
}
$filename = $filename ? $filename : ($suffix ? substr($this->fileInfo['name'], 0, strripos($this->fileInfo['name'], '.')) : $this->fileInfo['name']);
$filename = xss_clean(strip_tags(htmlspecialchars($filename)));
$md5 = $md5 ? $md5 : md5_file($this->fileInfo['tmp_name']);
$replaceArr = [
'{year}' => date("Y"),

View File

@ -292,7 +292,7 @@ return [
//允许跨域的域名,多个以,分隔
'cors_request_domain' => 'localhost,127.0.0.1',
//版本号
'version' => '1.3.1.20220112',
'version' => '1.3.2.20220113',
//API接口地址
'api_url' => 'https://api.fastadmin.net',
],

View File

@ -7,7 +7,7 @@
"private": true,
"dependencies": {
"jquery": "^2.1.4",
"bootstrap": "~3.3.7",
"bootstrap": "^3.3.7",
"font-awesome": "^4.6.1",
"bootstrap-table": "fastadmin-bootstraptable#~1.11.5",
"jstree": "~3.3.2",

View File

@ -187,8 +187,13 @@ define(['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, undefine
}
}, options ? options : {});
if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0)) {
options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
if (top.$(".tab-pane.active").length > 0) {
options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
} else {
options.area = [$(window).width() + "px", $(window).height() + "px"];
options.offset = ["0px", "0px"];
}
}
return Layer.open(options);
},

View File

@ -845,8 +845,13 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u
}
}, options ? options : {});
if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0)) {
options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
if (top.$(".tab-pane.active").length > 0) {
options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
} else {
options.area = [$(window).width() + "px", $(window).height() + "px"];
options.offset = ["0px", "0px"];
}
}
return Layer.open(options);
},

View File

@ -838,8 +838,13 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u
}
}, options ? options : {});
if ($(window).width() < 480 || (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && top.$(".tab-pane.active").size() > 0)) {
options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
if (top.$(".tab-pane.active").length > 0) {
options.area = [top.$(".tab-pane.active").width() + "px", top.$(".tab-pane.active").height() + "px"];
options.offset = [top.$(".tab-pane.active").scrollTop() + "px", "0px"];
} else {
options.area = [$(window).width() + "px", $(window).height() + "px"];
options.offset = ["0px", "0px"];
}
}
return Layer.open(options);
},