文件
mashangyoujiu/Application/Super/View/Plug/add_class.html

121 行
3.4 KiB
HTML
可执行文件

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>添加插件分类</title>
<style>
html,body{
background-color: rgb(246, 248, 249);
font-size: 0;
margin: 0;
padding: 0;
}
.box{
border: 1px solid #bbb;
border-radius: 5px;
background-color: white;
padding-bottom: 20px;
}
.list{
display: flex;
flex-direction: row;
align-items: flex-start;
margin: 10px 0;
}
.title{
background-color: #f5f5f5;
color: black;
font-size: 18px;
border-bottom: 1px solid #e6e6e6;
line-height: 60px;
border-radius: 5px 5px 0 0;
text-indent: 15px;
}
.left_name{
width: 100px;
text-align: right;
font-size: 14px;
line-height: 56px;
color: #666;
margin-right: 20px;
}
.list>input{
margin: 10px 0;
width: 300px;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
outline: none;
}
.list>select{
width: 322px;
margin: 10px 0;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
outline: none;
font-size: 14px;
color: #333;
}
.list>textarea{
resize: none;
width: 300px;
height: 100px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
outline: none;
font-size: 14px;
color: #333;
}
.save{
font-size: 16px;
width: 50px;
background-color: #009688;
color: white;
text-align: center;
padding: 8px 10px;
border-radius: 5px;
margin: 50px 200px;
cursor: pointer;
}
.save:hover{
background-color: #099688;
}
</style>
</head>
<body style="padding: 50px">
<div class="box">
<div class="title">添加插件分类</div>
<div class="list">
<div class="left_name">分类名称:</div>
<input type="text" id="class_name" name="class_name" placeholder="分类名称">
</div>
<div class="save">创建</div>
</div>
</body>
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<script src="__PUBLIC__/js/tips.js"></script>
<script>
$('.save').click(function () {
if(!$('#class_name').val().trim()){
showTips('请输入分类名称');
return;
}
$.post("{:U('doAddClass')}",{
class_name:$('#class_name').val().trim()
},function (res) {
if(res.status==1){
showTips(res.msg,function () {
location.replace("{:U('index')}");
})
}else {
showTips(res.msg);
}
})
})
</script>
</html>