7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
109 lines
3.1 KiB
HTML
109 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="renderer" content="webkit">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
<title>编辑选项-e订通后台</title>
|
||
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
||
<link rel="stylesheet" href="index.css">
|
||
<script src="layuiadmin/layui/layui.js"></script>
|
||
<script src="js/function.js"></script>
|
||
</head>
|
||
<body class="childrenBody">
|
||
<form class="layui-form">
|
||
<div style="padding:4px;">
|
||
<div align="center">
|
||
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit" style="font-weight:bold;width:100px;"> 保存设置 </button>
|
||
</div>
|
||
<div>
|
||
<table class="layui-table">
|
||
<colgroup>
|
||
<col width="60">
|
||
<col width="100">
|
||
<col>
|
||
<col width="100">
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>序号</th>
|
||
<th>是否启用</th>
|
||
<th>名称</th>
|
||
<th>终端隐藏</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="div_tbody">
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<script>
|
||
layui.use(['form','element','jquery','layer'],function(){
|
||
var $=layui.jquery,table=layui.table;
|
||
var form = layui.form;
|
||
var element = layui.element;
|
||
element.init();
|
||
$.ajax(
|
||
{
|
||
url: "./?_m=keyword&_a=set_select",
|
||
contentType: "application/json",
|
||
method: 'POST',
|
||
success: function (res) {
|
||
var json_data=$.parseJSON(res);
|
||
//加载数据
|
||
var html1="";
|
||
var data=json_data.data;
|
||
for(var i=0;i<data.length;i++){
|
||
var xh=i+1;
|
||
html1+='<tr><td>'+xh+'</td><td><input type="checkbox" id="is_show_'+data[i].id+'" name="is_show_'+data[i].id+'" lay-skin="switch" lay-text="启用|禁用"';
|
||
if(data[i].flag_ka=="y")
|
||
html1+=' checked';
|
||
html1+='></td><td><div class="layui-input-inline"><input type="text" id="title_'+data[i].id+'" name="title_'+data[i].id+'" class="layui-input" value="'+data[i].title+'"></div><div class="layui-input-inline">('+data[i].no+')</div></td><td><input type="checkbox" id="is_bd_'+data[i].id+'" name="is_bd_'+data[i].id+'" lay-skin="switch" lay-text="是|否"';
|
||
if(data[i].flag_bd=="y")
|
||
html1+=' checked';
|
||
html1+='></td></tr>';
|
||
}
|
||
$("#div_tbody").html(html1);
|
||
form.render();
|
||
},
|
||
error: function () {
|
||
layui.layer.msg("与服务器通信失败!");
|
||
}
|
||
}
|
||
);
|
||
//提交
|
||
form.on("submit(form1_submit)",function(data){
|
||
//弹出loading
|
||
var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8});
|
||
//提交
|
||
var url="./?_m=keyword&_a=save_select";
|
||
var post_data=data.field;
|
||
//alert(JSON.stringify(post_data));
|
||
$.ajax({
|
||
url:url,
|
||
contentType: "application/json",
|
||
method: 'GET',
|
||
data:post_data,
|
||
success: function (res) {
|
||
var json_data=$.parseJSON(res);
|
||
if(json_data.code==1){
|
||
//保存成功
|
||
//关闭loading
|
||
top.layer.close(index);
|
||
//刷新父页面
|
||
parent.location.reload();
|
||
}else{
|
||
//保存失败
|
||
//关闭loading
|
||
top.layer.close(index);
|
||
//layer.closeAll("iframe");
|
||
}
|
||
}
|
||
})
|
||
return false;
|
||
})
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |