zhujindu 2 týždňov pred
rodič
commit
d1ffc299de
1 zmenil súbory, kde vykonal 14 pridanie a 2 odobranie
  1. 14 2
      src/components/deleteUploadImgTaskPhoto.vue

+ 14 - 2
src/components/deleteUploadImgTaskPhoto.vue

@@ -164,8 +164,20 @@ export default {
         });
       }
     },
-    deleteImg(index) {
-      this.imgArr.splice(index, 1);
+    deleteImg(index, fileIdList) {
+      // <!-- 0=企业微信,1=H5相机 -->
+      if (this.userInfo.photoMethod == '1') {
+        removePhotoBatch({ fileIdList: fileIdList.split(',') }).then((res) => {
+          if (res.code == 200) {
+            this.$toast('删除成功!');
+            this.$emit('upDataDetail');
+          } else {
+            this.$toast('删除失败!');
+          }
+        });
+      } else {
+        this.imgArr.splice(index, 1);
+      }
     },
     previewsImg(index) {
       let urls = this.imgArr.map((item) => item.fileUrl);