miduo_gm/src/main/resources/static/html/sendNotice.html

362 lines
14 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8"/>
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="..//favicon.ico" />
<link rel="Shortcut Icon" href="..//favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5shiv.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
<span class="c-gray en">&gt;</span>
公告管理
<span class="c-gray en">&gt;</span>
发送公告
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
<form class="form form-horizontal" id="form-article-add" action="/sendNotice" method="post"target="sendNotice">
<div id="tab-system" class="HuiTab">
<div class="tabBar cl">
<span>发送公告</span>
</div>
<div class="tabCon">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
服务器id</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="serverId" placeholder="服务器id, 全服邮件填写0" value="" class="input-text"/>
<span class="SERVERID"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
公告类型:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="contentType" class="input-text" id="contentType"><!--下拉列表-->
<option value="1" selected = "selected">文本</option>
<option value="2" >图片</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
跳转类型:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="isSkip" class="input-text" id="isSkip"><!--下拉列表-->
<option value="0" selected = "selected">无跳转</option>
<option value="1">游戏内跳转</option>
<option value="2" >游戏外跳转</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
跳转地址:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="skipUrl" placeholder="1:游戏内跳转,内容游戏方提供,2:游戏外跳转,配置请求链接即可" value="" class="input-text"/>
<span class="SKIPURL"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
游戏标签:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="gameLabel" class="input-text" id="gameLabel"><!--下拉列表-->
<option value="1" selected = "selected">公告</option>
<option value="2" >日常活动</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
弹出类型:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="popType" class="input-text" id="popType"><!--下拉列表-->
<option value="1" selected = "selected">登录前弹出</option>
<option value="2" >登录后弹出</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
弹出周期:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="popCycle" class="input-text" id="popCycle"><!--下拉列表-->
<option value="1" selected = "selected">每次登录</option>
<option value="2" >每日首次登录</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
概要标题:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="outline" placeholder="游戏内左侧标题"class="input-text"/>
<span class="OUTLINE"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
公告标题:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="noticeTitle" placeholder=""class="input-text"/>
<span class="NOTICETITLE"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
公告内容:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="noticeContent" placeholder=""class="input-text"/>
<span class="NOTICECONTENT"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
优先级:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="priorityLevel" placeholder="公告弹出优先级(1-10)"class="input-text"/>
<span class="PRIORITYLEVEL"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
开始时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })" id="datemin" class="input-text Wdate" style="width:180px;" name="startTime">
<span class="STARTTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
结束时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })" id="datemax" class="input-text Wdate" style="width:180px;" name="endTime">
<span class="ENDTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
显示开始时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })" id="dis_start_time" class="input-text Wdate" style="width:180px;" name="displayStartTime">
<span class="DISPLAYSTARTTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
显示结束时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })" id="dis_end_time" class="input-text Wdate" style="width:180px;" name="displayEndTime">
<span class="DISPLAYENDTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
版本号:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="version" placeholder="游戏版本号,0为所有"class="input-text"/>
<span class="VERSION"></span>
</div>
</div>
<div class="row cl">
<span class="c-red">*</span>
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
是否有红点:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="isRed" class="input-text" id="isRed"><!--下拉列表-->
<option value="1" selected = "selected"></option>
<option value="0" >没有</option>
</select>
</div>
</div>
</div>
<div class="tabCon">
</div>
</div>
<div class="row cl" style="text-align: center" >
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<button class="btn btn-primary radius" type="button" onclick="return sendNoticeCheck();" ><i class="Hui-iconfont">&#xe632;</i> 发送公告</button>
</div>
</div>
</form>
<iframe name='sendNotice' id="hidden_frame" style='display: none'></iframe>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="../h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="../lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="../lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="../lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
$(function(){
$('.skin-minimal input').iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue',
increaseArea: '20%'
});
$("#tab-system").Huitab({
index:0
});
});
$('#sendNotice').load(function () {
// 根据后台返回值处理结果
var j=$.parseJSON(text);
if(j.status!=0) {
alert(j.msg);
} else {
alert('导入成功');
//location.href='BookResourceList.jsp'
}
})
function sendNoticeCheck() {
var erroCode = $('.SERVERID');
var serverId = $("input[name='serverId']").val();
var contentType = document.getElementById("contentType").value;
var gameLabel = document.getElementById("gameLabel").value;
var popType = document.getElementById("popType").value;
var popCycle = document.getElementById("popCycle").value;
var isRed = document.getElementById("isRed").value;
var skipUrl = $("input[name='skipUrl']").val();
var outline = $("input[name='outline']").val();
var noticeTitle = $("input[name='noticeTitle']").val();
var noticeContent = $("input[name='noticeContent']").val();
var priorityLevel = $("input[name='priorityLevel']").val();
var startTime = $("input[name='startTime']").val();
var endTime = $("input[name='endTime']").val();
var displayStartTime = $("input[name='displayStartTime']").val();
var displayEndTime = $("input[name='displayEndTime']").val();
var version = $("input[name='version']").val();
var isSkip = document.getElementById("isSkip").value;
if (serverId === '' || serverId == null) {
erroCode.html('<span style="color: red; ">服务器id不能为空!</span>');
return false;
}
if (outline === '' || outline == null) {
erroCode = $('.OUTLINE');
erroCode.html('<span style="color: red; ">概要标题不能为空!</span>');
return false;
}
if (noticeTitle === '' || noticeTitle == null) {
erroCode = $('.NOTICETITLE');
erroCode.html('<span style="color: red; ">公告标题不能为空!</span>');
return false;
}
if (noticeContent === '' || noticeContent == null) {
erroCode = $('.NOTICECONTENT');
erroCode.html('<span style="color: red; ">公告内容不能为空!</span>');
return false;
}
if (priorityLevel === '' || priorityLevel == null || priorityLevel === 0) {
erroCode = $('.PRIORITYLEVEL');
erroCode.html('<span style="color: red; ">优先级不能为空!</span>');
return false;
}
if (startTime === '' || startTime == null) {
erroCode = $('.STARTTIME');
erroCode.html('<span style="color: red; ">开始时间不能为空!</span>');
return false;
}
if (endTime === '' || endTime == null) {
erroCode = $('.ENDTIME');
erroCode.html('<span style="color: red; ">结束时间不能为空!</span>');
return false;
}
if (displayStartTime === '' || displayStartTime == null) {
erroCode = $('.DISPLAYSTARTTIME');
erroCode.html('<span style="color: red; ">显示开始时间不能为空!</span>');
return false;
}
if (displayEndTime === '' || displayEndTime == null) {
erroCode = $('.DISPLAYENDTIME');
erroCode.html('<span style="color: red; ">显示结束时间不能为空!</span>');
return false;
}
if (version === '' || version == null) {
erroCode = $('.VERSION');
erroCode.html('<span style="color: red; ">版本号不能为空!</span>');
return false;
}
$.ajax({
type: "POST",
data: {
"serverId": serverId,
"contentType": contentType,
"isSkip": isSkip,
"gameLabel": gameLabel,
"popType": popType,
"popCycle": popCycle,
"isRed": isRed,
"skipUrl": skipUrl,
"outline": outline,
"noticeTitle": noticeTitle,
"noticeContent": noticeContent,
"priorityLevel": priorityLevel,
"startTime": startTime,
"endTime": endTime,
"displayStartTime":displayStartTime,
"displayEndTime":displayEndTime,
"version": version
},
url: "/sendNotice",
success: function (data) {
if (data == 0) {
layer.msg('发送公告成功!', {icon: 6, time: 1000});
}
if (data == 1) {
layer.msg('发送公告失败!', {icon: 6, time: 1000});
}
}
}
)
return true;
}
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>