fix 文章发布上传文件地址错误

This commit is contained in:
不做码农
2022-01-14 20:32:07 +08:00
parent 4fefb4282d
commit a855a0db6b
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -128,10 +128,9 @@ export default {
$imgAdd(pos, $file) {
var formdata = new FormData();
formdata.append("file", $file);
// 这里没有服务器供大家尝试,可将下面上传接口替换为你自己的服务器接口
upload(formdata).then((res) => {
console.log(JSON.stringify(res));
this.$refs.md.$img2Url(pos, res.data);
this.$refs.md.$img2Url(pos, res.data.url);
});
},
change(value, render) {