支持删除密码,前端限制上传大小

支持删除密码,前端限制上传大小

Signed-off-by: 高雄 <admin@cxcp.com>
This commit is contained in:
高雄
2023-04-11 01:38:08 +00:00
committed by Gitee
parent 8916bee786
commit 55ca17203f

View File

@ -164,20 +164,19 @@
$.ajax({ $.ajax({
url: '${baseUrl}deleteFile?fileName=' + fileName +'&password='+password, url: '${baseUrl}deleteFile?fileName=' + fileName +'&password='+password,
success: function (data) { success: function (data) {
// console.log(data);
// 删除完成刷新table // 删除完成刷新table
if ("删除文件失败,密码错误!" === data) { if ("删除文件失败,密码错误!" === data.msg) {
alert(data); alert(data.msg);
} else { } else {
$('#table').bootstrapTable('refresh', {}); $('#table').bootstrapTable('refresh', {});
} }
}, },
error: function (data) { error: function (data) {
console.log(data);
return false; return false;
} }
}) })
}else{ }else{
//alert("取消");
return false; return false;
} }
@ -257,9 +256,6 @@
$("#btnSubmit").click(function () { $("#btnSubmit").click(function () {
var filepath = $("#size").val(); var filepath = $("#size").val();
var arr = filepath.split('\\'); //通过\分隔字符串,成字符串数组
var fileName = arr[arr.length-1]; //取最后一个,就是文件全名,含后缀
if(!checkFileSize(filepath)){ if(!checkFileSize(filepath)){
return false; return false;
} }