<!DOCTYPE html><html><head> <tajuk>管理员列表 - 后台管理系统</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"> .span pengepala{background:#009688;margin-left:30px;padding:10px;color:#ffffff;} .header div{border-bottom:solid 2px #009688;margin-top: 8px;} .header button :right;margin-top:-5px;} </style></head><body style="padding:10px; box-sizing: border-box;"><form class="layui- borang"> <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" required lay-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-btn layui-btn-fluid" id="up_test_img">上传图片</button> </div> <div class="layui-form-mid layui-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> <!--基本信息 tamat--> <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="开启" checked=""> <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.element; var layedit = layui.layedit; layedit.build('content',{ tinggi: 300, // 设置编 器= layui.upload; upload.render({ elem : "#up_test_img", url: "/admin/upload/upload_img", multiple: true, done: function(res,title){ return layer.msg("上传失败," +res.msg); }lain{ $("#srcimg").append('<div class="upload_pic_li" style="position:relative; width:100px; px 10px; px:left; margin ><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> '); , codeconfig: {hide: true, // Sama ada kotak pilihan bahasa pengekodan lalai:' javascript '// hide Format bahasa lalai apabila ia benar , , , , alat: [ , , , 'strong' //Bold , , ,'italic' //Italic , , ,'underline' //underline , , , ,'del ' //Delete line , , ,'|' //Asing line , , , , 'left' //Jajaran kiri , ' tengah' // Penjajaran tengah , 'kanan' // Penjajaran kanan , 'pautan' // Hiperpautan , 'nyahpaut' // Kosongkan pautan , 'muka' // , ,' gambar / / /, masukkan gambar,' /Bantuan , , ,tinggi: 300, //Tetapkan ketinggian editor , , });; } } }); function save(){ // Segerakkan kandungan editor teks kaya $.post("/admin/text/textadd",$('form').serialize(),function ( res) {if (res.code == 0) {menggunakan menggunakan menggunakan menggunakan - - - - - - - hingga 0); ;