This commit is contained in:
BianLzhaoMin 2025-05-23 16:02:03 +08:00
parent 1c91a67142
commit 157156faf1
1 changed files with 29 additions and 30 deletions

View File

@ -123,39 +123,38 @@
layer.msg('请求失败')
}
})
// 获取上传的文件
function getUploadFile() {
$.ajax({
url: ctxPath + '/upload/getFile',
type: 'GET',
success: function (res) {
console.log(res, 'res文件列表')
if (res.obj && res.obj.length > 0) {
res.obj.forEach(item => {
$('.password-book-list').append(
'<div class="password-book-item">' +
'<span>' + item.fileName + '</span>' +
'<span data-id="' + item.id + '" onclick="deleteFile(this)">删除</span>' +
'</div>'
)
})
}
}
})
}
// 删除文件
function deleteFile(this) {
console.log(this, 'this')
}
getUploadFile()
})
});
// 获取上传的文件
function getUploadFile() {
$.ajax({
url: ctxPath + '/upload/getFile',
type: 'GET',
success: function (res) {
console.log(res, 'res文件列表')
if (res.obj && res.obj.length > 0) {
res.obj.forEach(item => {
$('.password-book-list').append(
'<div class="password-book-item">' +
'<span>' + item.fileName + '</span>' +
'<span data-id="' + item.id + '" onclick="deleteFile(this)">删除</span>' +
'</div>'
)
})
}
}
})
}
// 删除文件
function deleteFile(this) {
console.log(this, 'this')
}
getUploadFile()
</script>
</body>