Forráskód Böngészése

图片上传服务bugfix

kevin_zhangl 3 éve
szülő
commit
86ed0510e8

+ 5 - 2
backendEle/src/views/shop/goods-add.vue

@@ -129,13 +129,16 @@
             },
             },
             upLoadSuccess(file){
             upLoadSuccess(file){
                 this.form.cover=file;
                 this.form.cover=file;
+                this.form.cover = tool.getLocaleLink(file, '/files/');
+                this.form.coverOrigin = file
+                this.img_show=false;
             },
             },
             handlePictureCardPreview(file) {
             handlePictureCardPreview(file) {
                 this.dialogImageUrl = file.url;
                 this.dialogImageUrl = file.url;
                 this.dialogVisible = true;
                 this.dialogVisible = true;
                 this.file=file;
                 this.file=file;
                 // console.log(file);
                 // console.log(file);
-                
+
             },
             },
             handleDownload(file) {
             handleDownload(file) {
                 console.log(file);
                 console.log(file);
@@ -243,4 +246,4 @@
 .up_load{
 .up_load{
     width: 100px;
     width: 100px;
 }
 }
-</style>
+</style>

+ 2 - 2
backendEle/src/views/shop/index.vue

@@ -280,7 +280,7 @@
                 this.$router.push({path: `/shop/goods-add`})
                 this.$router.push({path: `/shop/goods-add`})
             },
             },
             upLoadSuccess(file){
             upLoadSuccess(file){
-                this.form.cover = tool.getLocaleLink(file, '/uploads/');
+                this.form.cover = tool.getLocaleLink(file, '/files/');
                 this.form.coverOrigin = file
                 this.form.coverOrigin = file
                 this.img_show=false;
                 this.img_show=false;
             },
             },
@@ -345,7 +345,7 @@
                     //   })
                     //   })
 
 
                     vueObj.form.coverOrigin = response.goodsInfo.COVER
                     vueObj.form.coverOrigin = response.goodsInfo.COVER
-                    vueObj.form.cover = tool.getLocaleLink(response.goodsInfo.COVER, '/uploads/')
+                    vueObj.form.cover = tool.getLocaleLink(response.goodsInfo.COVER, '/files/')
 
 
                     this.$forceUpdate()
                     this.$forceUpdate()