2020-04-02 14:48:29 +08:00
|
|
|
<html>
|
2020-01-10 17:59:09 +08:00
|
|
|
|
2020-04-02 14:48:29 +08:00
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<title>盒子倒计时设置</title>
|
|
|
|
</head>
|
|
|
|
<link rel="stylesheet" href="/static/layui/css/layui.css">
|
|
|
|
<script src="/static/layui/layui.all.js"></script>
|
|
|
|
<script src="/static/layui/layui.js"></script>
|
|
|
|
<script src="/static/js/jquery-3.2.1.js"></script>
|
|
|
|
<script src="/static/js/user.js"></script>
|
2020-01-10 17:59:09 +08:00
|
|
|
|
2020-04-02 14:48:29 +08:00
|
|
|
<body>
|
|
|
|
<form class="layui-form" action="" style="width: 60%;">
|
|
|
|
<div class="layui-form-item">
|
|
|
|
<label class="layui-form-label">标题</label>
|
|
|
|
<div class="layui-input-block">
|
|
|
|
<input type="text" id="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off"
|
|
|
|
class="layui-input">
|
2020-01-02 02:10:13 +08:00
|
|
|
</div>
|
2020-04-02 14:48:29 +08:00
|
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
|
|
<label class="layui-form-label">URL</label>
|
|
|
|
<div class="layui-input-block">
|
|
|
|
<input type="text" id="url" required lay-verify="required" placeholder="请输入活动地址" autocomplete="off"
|
|
|
|
class="layui-input">
|
2020-01-02 02:10:13 +08:00
|
|
|
</div>
|
2020-04-02 14:48:29 +08:00
|
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
|
|
<label class="layui-form-label">开始时间</label>
|
|
|
|
<div class="layui-input-block">
|
|
|
|
<input type="button" id="start" required lay-verify="required" placeholder="开始时间" autocomplete="off"
|
|
|
|
class="layui-input">
|
2020-01-02 02:10:13 +08:00
|
|
|
</div>
|
2020-04-02 14:48:29 +08:00
|
|
|
</div>
|
|
|
|
<div class="layui-form-item">
|
|
|
|
<label class="layui-form-label">结束时间</label>
|
|
|
|
<div class="layui-input-block">
|
|
|
|
<input type="button" id="end" required lay-verify="required" placeholder="结束时间" autocomplete="off"
|
|
|
|
class="layui-input">
|
2020-01-02 02:10:13 +08:00
|
|
|
</div>
|
2020-04-02 14:48:29 +08:00
|
|
|
</div>
|
|
|
|
<div class="layui-form-item" style="margin-left: 85%;">
|
|
|
|
<input id="subbutton" type="button" value="提交" class="layui-btn" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
<script>
|
|
|
|
layui.use('laydate', function () {
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
var form = layui.form;
|
|
|
|
|
|
|
|
laydate.render({
|
|
|
|
elem: '#start',
|
|
|
|
type: 'datetime'
|
2020-01-02 02:10:13 +08:00
|
|
|
});
|
2020-04-02 14:48:29 +08:00
|
|
|
laydate.render({
|
|
|
|
elem: '#end',
|
|
|
|
type: 'datetime',
|
|
|
|
min: 0
|
|
|
|
})
|
|
|
|
});
|
|
|
|
$('#subbutton').click(function (event) {
|
|
|
|
$.post("/admin/magicbox/activity.do", { 'title': $('#title').val(), 'url': $('#url').val(), 'start': $('#start').val(), 'end': $('#end').val() }, function (data) {
|
|
|
|
var json = JSON.parse(data);
|
|
|
|
layer.alert(json.msg)
|
|
|
|
})
|
2020-01-02 02:10:13 +08:00
|
|
|
})
|
2020-04-02 14:48:29 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</html>
|