Browse Source

列表与编辑图片处理

zweizhao 7 years ago
parent
commit
d2dc07b906
2 changed files with 3 additions and 3 deletions
  1. 1 1
      pages/main/index/cert_edit.vue
  2. 2 2
      pages/main/index/cert_pro.vue

+ 1 - 1
pages/main/index/cert_edit.vue

@@ -153,7 +153,7 @@ export default {
       this.ruleForm.status_name = this.options.find(i => i.id === val).name
       this.ruleForm.status_name = this.options.find(i => i.id === val).name
     },
     },
     handleAvatarSuccess(res, file) {
     handleAvatarSuccess(res, file) {
-      this.ruleForm.img = URL.createObjectURL(file.raw);
+      this.ruleForm.img = res.data.file_url_abs
     },
     },
     beforeAvatarUpload(file) {
     beforeAvatarUpload(file) {
       return true
       return true

+ 2 - 2
pages/main/index/cert_pro.vue

@@ -138,7 +138,7 @@ export default {
   height: calc(100% - 40px);
   height: calc(100% - 40px);
 }
 }
 .img {
 .img {
-  width: 200px;
-  height: 160px;
+  width: 100%;
+  height: auto;
 }
 }
 </style>
 </style>