lrf402788946 4 anni fa
parent
commit
3d0f550fe2

+ 1 - 1
src/views/adminCenter/refute/edit.vue

@@ -81,7 +81,7 @@ export default {
     },
     async toUpload({ file }, model) {
       // 上传,赋值
-      const res = await this.upload({ file, dir: refute });
+      const res = await this.upload({ file, dir: 'refute' });
       if (this.$checkRes(res)) {
         this.$set(this.form, model, [{ url: res.uri }]);
       }

+ 7 - 0
src/views/adminCenter/serve/edit.vue

@@ -111,6 +111,13 @@ export default {
     onOversize() {
       Toast('文件大小不能超过 10MB');
     },
+    async toUpload({ file }, model) {
+      // 上传,赋值
+      const res = await this.upload({ file, dir: 'serve' });
+      if (this.$checkRes(res)) {
+        this.$set(this.form, model, [{ url: res.uri }]);
+      }
+    },
   },
   computed: {
     ...mapState(['user', 'menuParams']),