|
|
@ -60,7 +60,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
|
|
|
|
uploadUrl: location.origin + '/api' + "/common/upload", // 上传的图片服务器地址
|
|
|
|
headers: {
|
|
|
|
headers: {
|
|
|
|
Authorization: "Bearer " + getToken()
|
|
|
|
Authorization: "Bearer " + getToken()
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -194,7 +194,7 @@ export default {
|
|
|
|
// 获取光标所在位置
|
|
|
|
// 获取光标所在位置
|
|
|
|
let length = quill.getSelection().index;
|
|
|
|
let length = quill.getSelection().index;
|
|
|
|
// 插入图片 res.url为服务器返回的图片地址
|
|
|
|
// 插入图片 res.url为服务器返回的图片地址
|
|
|
|
quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
|
|
|
|
quill.insertEmbed(length, "image", location.origin + '/api' + res.fileName);
|
|
|
|
// 调整光标到最后
|
|
|
|
// 调整光标到最后
|
|
|
|
quill.setSelection(length + 1);
|
|
|
|
quill.setSelection(length + 1);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|