فهرست منبع

图片上传服务bugfix

kevin_zhangl 3 سال پیش
والد
کامیت
86ed0510e8
2فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 5 2
      backendEle/src/views/shop/goods-add.vue
  2. 2 2
      backendEle/src/views/shop/index.vue

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

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

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

@@ -280,7 +280,7 @@
                 this.$router.push({path: `/shop/goods-add`})
             },
             upLoadSuccess(file){
-                this.form.cover = tool.getLocaleLink(file, '/uploads/');
+                this.form.cover = tool.getLocaleLink(file, '/files/');
                 this.form.coverOrigin = file
                 this.img_show=false;
             },
@@ -345,7 +345,7 @@
                     //   })
 
                     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()