소스 검색

优化店铺详情页和店铺编辑也定位功能和图片批量上传

zhujindu 1 년 전
부모
커밋
d951919614
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/components/uploadImgVStore.vue

+ 5 - 2
src/components/uploadImgVStore.vue

@@ -142,11 +142,14 @@ export default {
       });
       uploadImagev(form).then((res) => {
         if (res.code == 200) {
-          console.log(JSON.stringify(res.data));
           // that.imgArr = res.data.url;
+          let imgArr = [];
+          res.data.forEach((item) => {
+            imgArr.push(item.url);
+          });
           loind1.clear();
           that.$toast('上传成功!');
-          that.$emit('newimgarr', { fileUrl: res.data.url, type: that.type });
+          that.$emit('newimgarr', { fileUrl: imgArr.join(','), type: that.type });
         } else {
           that.$toast('上传失败!');
         }