This commit is contained in:
parent
95f15a7387
commit
5cd3ec9b98
|
|
@ -97,11 +97,6 @@
|
||||||
// });
|
// });
|
||||||
|
|
||||||
layui.use('upload', function () {
|
layui.use('upload', function () {
|
||||||
|
|
||||||
if (fileList.length === 3) {
|
|
||||||
layer.msg('最多只能上传3个文件')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var upload = layui.upload;
|
var upload = layui.upload;
|
||||||
// 执行上传功能
|
// 执行上传功能
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
|
|
@ -134,6 +129,12 @@
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
fileList = res.obj
|
fileList = res.obj
|
||||||
|
|
||||||
|
if (fileList.length === 3) {
|
||||||
|
$('#upload-btn').attr('disabled', true)
|
||||||
|
} else {
|
||||||
|
$('#upload-btn').attr('disabled', false)
|
||||||
|
}
|
||||||
if (res.obj && res.obj.length > 0) {
|
if (res.obj && res.obj.length > 0) {
|
||||||
$('.password-book-list').empty()
|
$('.password-book-list').empty()
|
||||||
res.obj.forEach(item => {
|
res.obj.forEach(item => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue