laiguoran 2 лет назад
Родитель
Сommit
aecb35f65b
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      app/public/js/profile.js

+ 3 - 2
app/public/js/profile.js

@@ -168,11 +168,12 @@ $(document).ready(function() {
 
         // 上传签章
         $('#stamp-upload').change(function () {
-            if ($('#show-stamp .stamp-show').length >= 5) {
+            const hadstamp = $('#show-stamp .stamp-show').length;
+            const files = this.files;
+            if (hadstamp + files.length >= 5) {
                 toastr.error('最多只能5个签章');
                 return
             }
-            const files = this.files;
             const formData = new FormData();
             for (const file of files) {
                 if (file === undefined) {