Commit df2231ad by 徐高华

token

parent 2aead32b
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>计划</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script type="text/javascript">
Date.prototype.format = function (fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
"S": this.getMilliseconds() //毫秒
};
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
var dateNum = 1 ;
var endDate = new Date();
var host = "" ;
function search(retData) {
$("#tb_teletext").html("");
var htm = "" ;
if(!retData.result || !retData.result.result || retData.result.result.length==0) {
alert("无数据")
return ;
}
for(var i=0;i<retData.result.result.length;i++) {
var item = retData.result.result[i] ;
var eid = item.enterpriseId ;
var createTime = new Date(item.createTime).format("yyyy-MM-dd hh:mm:ss");
var sendTime = new Date(item.executeTime).format("yyyy-MM-dd hh:mm:ss");
var list = item.itemList ;
var title = item.planName ;
htm+='<tr class="info"><td>'+item.enterpriseName+"("+eid+")" +'</td><td>'+createTime+'</td><td>'+sendTime+'</td><td>'+title+'</td><td>'+item.preCount+'</td><td>'+item.sendCont+'</td></tr>';
}
$("#tb_teletext").html(htm);
}
function coupon() {
$.ajax({
type:"post",
url: host+'/marketing-operation/plan/card-statistics?pageSize=1000&endTime='+endDate,
success:function(retData) {
search(retData)
}
});
}
function ecm() {
$.ajax({
type:"post",
url: host+'/marketing-operation/plan/ecm-statistics?pageSize=1000&endTime='+endDate,
success:function(retData) {
search(retData)
}
});
}
function sms() {
$.ajax({
type:"post",
url: host+'/marketing-operation/plan/sms-statistics?pageSize=1000&endTime='+endDate,
success:function(retData) {
search(retData)
}
});
}
function ai() {
$.ajax({
type:"post",
url: host+'/marketing-operation/plan/ai-statistics?pageSize=1000&endTime='+endDate,
success:function(retData) {
search(retData)
}
});
}
function dateType(num,obj) {
dateNum = num - 1;
$(".btn").css("color","black") ;
$(obj).css("color","red") ;
if(dateNum<15) {
endDate=new Date((new Date()/1000+(86400*dateNum))*1000).format("yyyy-MM-dd 23:59:59");//增加n天后的日期
/* alert(endDate); */
}
}
</script>
</head>
<body>
<div class="container" id="couponDiv">
<div class="tab-pane" id="tab2" style="padding:5px">
<h2>
<button onclick="dateType(1,this)" class="btn">当天</button>
<button onclick="dateType(2,this)" class="btn">近2天</button>
<button onclick="dateType(7,this)" class="btn">近7天</button>
</h2>
<button onclick="coupon()">卡券</button>
<button onclick="ecm()">ECM</button>
<button onclick="sms()">短信</button>
<button onclick="ai()">AI</button>
<table class="table table-bordered">
<thead><tr><th>商户</th><th>创建时间</th><th>发送时间</th><th>计划名称</th><th>预计人数</th><th>发送人数</th></tr></thead>
<tbody id="tb_teletext">
</tbody>
</table>
</div>
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment