Commit 7b94057e by hank

upload

parent c8f74e10
......@@ -166,7 +166,8 @@ import {
getTempalteDetail,
getFilmDetail,
updateFilmInfo,
createFilm
createFilm,
upload
} from "@/api/api";
import axios from "axios";
import { setTimeout } from "timers";
......@@ -449,9 +450,15 @@ export default {
}, 1000);
},
uploadAfter(file) {
console.log(file);
this.editObj.value = file.content;
this.valueChange();
// console.log(file, upload);
upload(file.file).then(res => {
console.log(res.data);
this.editObj.value = res.data.data;
this.valueChange();
}).catch(e => {
console.log(e)
this.$toast('上传失败')
})
},
preview() {
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