|
@@ -47,8 +47,9 @@ Component({
|
|
that.editorCtx = res.context;
|
|
that.editorCtx = res.context;
|
|
let { content } = that.data;
|
|
let { content } = that.data;
|
|
let html = content;
|
|
let html = content;
|
|
- if (html) that.editorCtx.setContents({ html })
|
|
|
|
- }).exec()
|
|
|
|
|
|
+ if (html) that.editorCtx.setContents({ html });
|
|
|
|
+ }).exec();
|
|
|
|
+
|
|
},
|
|
},
|
|
// 编辑器值改变时触发
|
|
// 编辑器值改变时触发
|
|
bindInput: function (e) {
|
|
bindInput: function (e) {
|
|
@@ -79,14 +80,14 @@ Component({
|
|
_uploadImage: function (tempFilePath) {
|
|
_uploadImage: function (tempFilePath) {
|
|
let that = this;
|
|
let that = this;
|
|
wx.uploadFile({
|
|
wx.uploadFile({
|
|
- url: `${app.globalData.serverUrl}/files/court/elimg/upload`,
|
|
|
|
|
|
+ url: `${app.globalData.fileUrl}/files/court/elimg/upload`,
|
|
filePath: tempFilePath,
|
|
filePath: tempFilePath,
|
|
name: 'file',
|
|
name: 'file',
|
|
formData: {},
|
|
formData: {},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
let arr = JSON.parse(res.data);
|
|
let arr = JSON.parse(res.data);
|
|
if (arr.errcode == '0') {
|
|
if (arr.errcode == '0') {
|
|
- that.editorCtx.insertImage({ src: app.globalData.serverUrl + arr.uri });
|
|
|
|
|
|
+ that.editorCtx.insertImage({ src: app.globalData.fileUrl + arr.uri });
|
|
} else {
|
|
} else {
|
|
wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 })
|
|
wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 })
|
|
}
|
|
}
|