<!DOCTYPE html><html><head> <title>管理员列表 – 后台管理系统</title> <meta name="renderer" content="webkit"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, Minimum-scale=1.0, Maximum-scale=1.0, user-scalable=0"> <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" media="all"> <script type="text/javascript" src="/static/layui/layui.js"></script> <style type="text/css"> .header span{background:#009688;margin-left:30px;padding:10px;color:#ffffff;} .header div{border-bottom:solid 2px #009688;margin-top: 8px;} .header button{float :right;margin-top:-5px;} </style></head><body style="padding:10px; box-sizing: border-box;"><form class="layui- Formular"> <div class="layui-form-item"> <label class="layui-form-label">文章标题</label> <div class="layui-input-inline"> <input type="text" class="layui-input" name="textname" > </div> </div> <div class="layui-form-item"> <label class="layui-form-label">文章简介</label> <div class="layui-input-inline"> <textarea name="text" erforderlichlay-verify="required" placeholder="请输入" class="layui-textarea"></textarea> </div> </div> <div class="layui-form-item"> <label class="layui-form-label">文章封面</label> <div class="layui-input-inline"> <button type="button" class="layui-btnlayui-btn-fluid" id="up_test_img">上传图片</button> </div> <div class="layui-form-midlayui-word-aux">支持png,jpg,gif</div> </div> <div class="layui-form-item"> <label class="layui-form-label">封面预览</label> <div class="layui-input-block"> <div class="layui-upload-list" id="srcimg" style="width:90%;float:left;"></div> </div> </div> <!--基本信息 end--> <div class="layui-form-item"> <label class="layui-form-label">文章详情</label> <div class="layui-input-block"> <textarea id="content" name="content" style="display: none;" value=""></textarea> </div> </div> <div class="layui-form-item"> <label class="layui-form-label">状态</label> <div class="layui-input-block"> <input type="radio" name="status" value="1" title="开启" geprüft=""> <input type="radio" name="status" value="0" title="禁用"> </div> </div></form><div class="layui-form-item"> <div class="layui-input-block"> <button type="button" class="layui-btn" onclick="save()">保存</button> </div></div><script type="text/javascript"> layui.use(['layer','form','upload','laydate','layedit','element'],function(){ form =layui.form; layer =layui.layer; $ =layui. jquery; var element =layui.layedit; layedit.build('content',{ height: 300, //设置编辑器高度 } .upload; upload.render({ elem : "#up_test_img", url: "/admin/upload/upload_img", multiple: true, done: function(res,title){ if(res.code > 0){ return layer.msg("Beispielsweise" +res.msg); }else{ $("#srcimg").append('<div class="upload_pic_li" style="position:relative; width:100px; float:left; margin:0 10px 10px 0" ><img style="width:100px;height:100px;" src="'+ res.url +'" class="layui-upload-img" onmouseover="show_img(this)" onmouseleave="hide_img( )"><input type="hidden" name="test_img" value="'+res.data+'"/><a class="close-img" href="javascript:;" onclick=" deleteImage(''+res.data+'',this);return false;"></a></div>'); jpg |.png |.bmp |, Größe:'10240', devmode: true , codeconfig: {hide: true, // Ob das Auswahlfeld für die Codierungssprache standardmäßig „javascript“ ist // Das Standardformat der Sprache ausblenden, wenn es „true“ ist , , , , Tool: [ , , , 'strong' //Fett , , ,'italic' //Kursiv , , ,'underline' //Unterstrichen , , , ,'del ' //Zeile löschen , , ,'|' //Zeile trennen , , , , 'left' //Linksbündig , , ,'center' //Mittelausrichtung , ,'right' //Rechte Ausrichtung , , , ,'link' //Hyperlink , , , ,'unlink' //Link löschen , , , ,'face' //Ausdruck , , 'image' //Bild einfügen, ,'help' //Hilfe, , , ], ,height: 300, //Editorhöhe festlegen, , }); : 300, //Editorhöhe festlegen, }; } } }); function save(){ // Inhalt des Rich-Text-Editors synchronisieren $.post("/admin/text/textadd",$('form').serialize(),function ( res) {if (res.code == 0) {Verwendung der Verwendung der Verwendung der Verwendung von Verwendung von - - - - - bis 0); ;