|  |  |  | 
|---|
|  |  |  | var form = layui.form; | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | initUserValue(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | form.render(); | 
|---|
|  |  |  | 
|---|
|  |  |  | elem: '#febs-form-group-date' | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | layedit.set({   //设置图片接口 | 
|---|
|  |  |  | uploadImage: { | 
|---|
|  |  |  | url: 'admin/goods/uploadFileBase64', //接口url | 
|---|
|  |  |  | type: 'post', | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //创建一个编辑器 | 
|---|
|  |  |  | var index = layedit.build('lay_edit',{ | 
|---|
|  |  |  | height: 300 | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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", { | 
|---|
|  |  |  | 
|---|
|  |  |  | "thumb": newsInfo.thumb, | 
|---|
|  |  |  | "content": newsInfo.content, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | layedit.setContent(index, newsInfo.content, false); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | </script> | 
|---|