zhujindu 2 tygodni temu
rodzic
commit
c3560b7563
1 zmienionych plików z 9 dodań i 4 usunięć
  1. 9 4
      src/components/deleteUploadImgTaskPhoto.vue

+ 9 - 4
src/components/deleteUploadImgTaskPhoto.vue

@@ -197,6 +197,14 @@ export default {
       console.log(source);
       // 0=企业微信,1=H5相机
       if (this.userInfo.photoMethod == '0') {
+        this.imgArr = this.imgArr.concat(
+          localIds.map((item) => {
+            return {
+              mediaId: '',
+              fileUrl: item,
+            };
+          }),
+        );
         this.syncUpload(localIds);
       } else {
         this.$emit('upDataDetail');
@@ -220,10 +228,7 @@ export default {
           localId: localId,
           isShowProgressTips: 0, // 默认为1,显示进度提示
           success: (res) => {
-            this.imgArr.push({
-              mediaId: res.serverId,
-              fileUrl: localId,
-            });
+            this.imgArr[localIds.length - 1].mediaId = res.serverId;
             this.syncUpload(localIds, callback);
           },
         });