Ver código fonte

产品管理图片上传bug修复

zhuhao 2 anos atrás
pai
commit
7f4f98258c

+ 1 - 1
RMS-FrontEnd/src/views/components/common/menu/mixins.js

@@ -13,7 +13,7 @@ export const File = {
                 var FileUrl = this.$p + item.url
                 var isPicture = 0
             }else{
-                var FileUrl =  'http://139.224.24.90:8012/onlinePreview?url='+ btoa(encodeURIComponent(this.$p + item.url))
+                var FileUrl =  'http://192.224.24.90:8012/onlinePreview?url='+ btoa(encodeURIComponent(this.$p + item.url))
                 var isPicture = 0
             }
             const router = this.$router.resolve({

+ 6 - 3
RMS-FrontEnd/src/views/product/components/product.vue

@@ -182,7 +182,7 @@
           <el-input v-model="categoryForm.licenseRate" placeholder="请输入参考许可费率(许可费率介于0-1之间)"></el-input>
         </el-form-item>
         <el-form-item label="图片 ">
-          <el-upload ref="upload"  action="#" :auto-upload="false"  :on-change="handleChange"  list-type="picture" :show-file-list="false">
+          <el-upload ref="upload"  action="#" :auto-upload="false"  :on-change="handleChange1"  list-type="picture" :show-file-list="false">
             <span v-if="categoryForm.pictures&&categoryForm.pictures.length>0" class="avatar">
               <span class="deleteImg">
                 <span> 
@@ -276,7 +276,7 @@ export default {
   },
   computed: {
     userinfo() {
-      return this.$store.state.user.userinfo
+      return this.$store.state.admin.userinfo
     }
   },
   watch:{
@@ -613,7 +613,10 @@ export default {
       this.$set(this.productForm,'pictures', [{url:file.url}])
       this.file=[file.raw]
     },
-   
+    handleChange1(file, fileList) {
+      this.$set(this.categoryForm,'pictures', [{url:file.url}])
+      this.file=[file.raw]
+    },
   },
 }
 </script>

+ 1 - 1
RMS-FrontEnd/src/views/product/components/products.vue

@@ -190,7 +190,7 @@ export default {
   },
   computed: {
     userinfo() {
-      return this.$store.state.user.userinfo
+      return this.$store.state.admin.userinfo
     }
   },
   watch:{