From 7e6bbd05a75b07cb0717812d0b51aad128361012 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Thu, 19 May 2022 18:43:42 +0800 Subject: [PATCH] fix some problem --- src/main/resources/templates/febs/views/modules/news/newsInfoUpdate.html | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/news/newsInfoUpdate.html b/src/main/resources/templates/febs/views/modules/news/newsInfoUpdate.html index cf3e101..b272524 100644 --- a/src/main/resources/templates/febs/views/modules/news/newsInfoUpdate.html +++ b/src/main/resources/templates/febs/views/modules/news/newsInfoUpdate.html @@ -101,6 +101,8 @@ var form = layui.form; form.render(); }); + + initUserValue(); }); form.render(); @@ -108,12 +110,14 @@ elem: '#febs-form-group-date' }); + layedit.set({ //设置图片接口 uploadImage: { url: 'admin/goods/uploadFileBase64', //接口url type: 'post', } }); + //创建一个编辑器 var index = layedit.build('lay_edit',{ height: 300 @@ -177,10 +181,7 @@ }); } - - initUserValue(); function initUserValue() { - console.log(newsInfo); var thumb = newsInfo.thumb; $('#thumbImage').html('<img src="' + thumb + '" alt="" class="layui-upload-img" style="width: 100px">') form.val("newsInfo-update-form", { @@ -191,6 +192,8 @@ "thumb": newsInfo.thumb, "content": newsInfo.content, }); + + layedit.setContent(index, newsInfo.content, false); } }); </script> \ No newline at end of file -- Gitblit v1.9.1