Browse Source

文件上传处理

linwu 3 years ago
parent
commit
a1a88b2899
1 changed files with 9 additions and 0 deletions
  1. 9 0
      public/themes/default/views/app/content/buyhouse/list.blade.php

+ 9 - 0
public/themes/default/views/app/content/buyhouse/list.blade.php

@@ -610,6 +610,7 @@
                     this.imageDialogVisible = true;
                 },
                 uploadSuccessID(response, file, fileList) {
+                    fileList = this.dealImageList(fileList);
                     if (response.status) {
                         this.user.certificates = fileList
                     } else {
@@ -620,6 +621,7 @@
                     this.user.certificates = fileList
                 },
                 uploadSuccessMarry(response, file, fileList) {
+                    fileList = this.dealImageList(fileList);
                     if (response.status) {
                         this.user.marry_prove = fileList
                     } else {
@@ -630,6 +632,7 @@
                     this.user.marry_prove = fileList
                 },
                 uploadSuccessHousehold(response, file, fileList) {
+                    fileList = this.dealImageList(fileList);
                     if (response.status) {
                         this.user.household_register = fileList
                     } else {
@@ -640,6 +643,7 @@
                     this.user.household_register = fileList
                 },
                 uploadSuccessWork(response, file, fileList) {
+                    fileList = this.dealImageList(fileList);
                     if (response.status) {
                         this.user.work_prove = fileList
                     } else {
@@ -649,6 +653,11 @@
                 removeWork(file, fileList) {
                     this.user.work_prove = fileList
                 },
+                dealImageList(fileList) {
+                    for (var i in fileList) {
+                        fileList[i].url = fileList.response.path;
+                    }
+                },
 
                 //验证相关
                 validCertificates(rule, value, callback){