From cbe03642b43b6b32ac3a6b1f6ef83e11e71edade Mon Sep 17 00:00:00 2001 From: lifei6671 Date: Tue, 27 Nov 2018 15:28:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=A1=B9=E7=9B=AE=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/book/index.tpl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/views/book/index.tpl b/views/book/index.tpl index 05f7ef15..ab8dec46 100644 --- a/views/book/index.tpl +++ b/views/book/index.tpl @@ -473,7 +473,8 @@ var $then = $("#importBookDialogForm"); book.book_name = $then.find("input[name='book_name']").val(); book.identify = $then.find("input[name='identify']").val(); - book.description = $then.find('textarea[name="description"]').val() + book.description = $then.find('textarea[name="description"]').val(); + book.itemId = $then.find("select[name='itemId']").val(); return book; } @@ -575,7 +576,7 @@ drawBookCover("bookCover",txt); } }).on("click","#btnImportBook",function () { - console.log("aa"); + var $then = $(this).parents("#importBookDialogForm"); var itemId = $then.find("input[name='itemId']").val(); @@ -601,7 +602,7 @@ return showError("描述信息不超过500个字符","#import-book-form-error-message"); } var filesCount = $('#import-book-upload').fileinput('getFilesCount'); - console.log(filesCount) + if (filesCount <= 0) { return showError("请选择需要上传的文件","#import-book-form-error-message"); }