This commit is contained in:
BianLzhaoMin 2025-05-23 16:00:12 +08:00
parent 85d90fae5d
commit 1c91a67142
1 changed files with 26 additions and 25 deletions

View File

@ -123,36 +123,37 @@
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 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')
}
// 删除文件
function deleteFile(this) {
console.log(this, 'this')
}
getUploadFile()
getUploadFile()
})
});