Commit 7b94057e by hank

upload

parent c8f74e10
...@@ -166,7 +166,8 @@ import { ...@@ -166,7 +166,8 @@ import {
getTempalteDetail, getTempalteDetail,
getFilmDetail, getFilmDetail,
updateFilmInfo, updateFilmInfo,
createFilm createFilm,
upload
} from "@/api/api"; } from "@/api/api";
import axios from "axios"; import axios from "axios";
import { setTimeout } from "timers"; import { setTimeout } from "timers";
...@@ -449,9 +450,15 @@ export default { ...@@ -449,9 +450,15 @@ export default {
}, 1000); }, 1000);
}, },
uploadAfter(file) { uploadAfter(file) {
console.log(file); // console.log(file, upload);
this.editObj.value = file.content; upload(file.file).then(res => {
console.log(res.data);
this.editObj.value = res.data.data;
this.valueChange(); this.valueChange();
}).catch(e => {
console.log(e)
this.$toast('上传失败')
})
}, },
preview() { preview() {
this.message({ this.message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment