<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!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/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/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 mr-20"
			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="pd-20">
	
 	<form action="${pageContext.request.contextPath }/secure/message/sendMessage" class="form form-horizontal" id="form-addGoods" method="POST" >
		
		
		<div class="row cl">
			<label id="integralLabel" class="form-label col-2"><span class="c-red">*</span>发送内容：</label>
			<div id="integralDiv" class="formControls col-2">
				<textarea id="content"  name="content" class="textarea-text" placeholder="" style="width:800px;height:300px;"></textarea>
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>消息url：</label>
			<div class="formControls col-5">
				<input id="url" type="text" name="url" id="" placeholder="格式:http://www.baidu.com" value="" class="input-text" ></div>
		</div>
		
		<div class="row cl">
			<label id="integralLabel" class="form-label col-2"><span class="c-red">*</span>目标平台：</label>
			<div id="integralDiv" class="formControls col-8">
			
				<input type="radio" id="aa" name="platform" value="all" checked><label for="aa">所有用户</label> &nbsp;&nbsp;&nbsp;&nbsp;
				<input type="radio" id="bb" name="platform" value="android" ><label for="bb"> 安卓android 用户</label>&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="radio" id="cc" name="platform" value="ios"><label for="cc">  苹果IOS 用户</label>&nbsp;&nbsp;
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2">目标人群：</label>
			<div class="formControls col-6">
			<input id="user" name="tag" type="hidden" readonly="readonly"  style="width:50%;"  class="input-text" value=""  >
			
				<input id="username"  name="username"  readonly="readonly" 
				  type="text"  placeholder="默认所有" value="" class="input-text" style="width:50%">
			
			 <span onclick="  goods_edit('选择用户','${pageContext.request.contextPath }/secure/message/listuser','','400');"> 
					 	选择接受用户
			</span>  
			</div>
		</div>
		
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<button onClick="return checkMessage();" class="btn btn-primary radius" type="submit">
					<i class="Hui-iconfont">&#xe632;</i>立即发送
				</button>
			</div>
		</div>
	</form>
 	
 	
	</div>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/js/page/jqPaginator.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/goods/js/utils.js"></script>
	<script type="text/javascript">
	/*$(document).ready(function(){
		$('#beginDate').datepicker();//时间控件
        $('#endDate').datepicker();
	});*/
	
	function  checkMessage(){
		//消息内容
		if(!commonLengthJdg('content',1,200,null,true)){
			layer.msg("消息内容不能为空!",{icon: 2,time:2000});
			return false;
		}
		
		//url
		if(!commonLengthJdg('url',1,200,null,true)){
			layer.msg("消息URL不能为空!",{icon: 2,time:2000});
			return false;
		}
		
		return true;
	}
	/**
	 * 打开界面
	 */
	function goods_edit(title,url,id,w,h){
		/*layer_show(title,url,w,h);*/
		var iWidth = 1000;
	var iHeight = 700;
	var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
	var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
	 window.open(url, title, "width=" + iWidth + ", height=" + iHeight + ",top=" + iTop + ",left=" + iLeft + ",toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no,alwaysRaised=yes,depended=yes");
		 

	}
	
	/* ,function(){
		$.ajax({
	        url: '${pageContext.request.contextPath }/admin/product/updateStatus',
	        type: "POST",
	        dataType: "json",
	        data: {productId : id},
	        error:function(){
	      	  layer.msg(data,{icon: 5,time:2000});
	        },
	        success:  function(data){
	      		obj.val(data);
	        }
	    });
	} */
	
	


/**
 * 打开修改商品界面
 */

</script>
</body>
</html>