@ -14,6 +14,9 @@
< script src = "__JS__/kendo.dataviz.min.js" > < / script >
< script src = "__JS__/kendo.timezones.min.js" > < / script >
< script src = "__STATIC__/layer/layer.js" type = "text/javascript" > < / script >
< script src = "__STATIC__/juicer-min.js" type = "text/javascript" > < / script >
< script src = "__STATIC__/js.cookie.min.js" type = "text/javascript" > < / script >
<!-- 主体 -->
< div id = "indexMain" class = "index-main" >
<!-- 插件块 -->
@ -261,14 +264,173 @@
< / div >
< / div >
< / div >
< div id = "TestingTipShow" > < / div >
< script id = "TestingTipTpl" type = "text/template" >
< div style = "width: 100vw;height:100vh;padding: 0;position: absolute;top: 0;z-index: 9999;background-color:rgba(0,0,0,.6);right: 1px;" >
< div class = "layui-layer layui-layer-hui" style = "width:800px;height:480px;z-index: 19891015; top:28%; left:50%;margin-left: -400px;border-radius: 2%;background-color:white;color: #0a001f;" >
< div style = "padding: 15px 30px 15px 20px;font-size: 18px;" > 资源申请预警< / div >
< div class = "layui-layer-content" style = "font-size: 16px;color: red;text-align: left;" > 昨日至今部分资源号在单个游戏单个区服中当日申请资源已达到1万! 请前往处理。资源号见下表< / div >
< div class = "layui-layer-content" style = "font-size: 22px;padding: 5px 25px;height: 200px;overflow-x:hidden;overflow-y:scroll" >
< div class = "data_list" >
< div class = "" >
< table >
<!-- 表头 -->
< thead >
< tr >
< th > 游戏名称< / th >
< th > 区服名称< / th >
< th > 角色名称< / th >
< th > 测试账号< / th >
< th > 申请金额< / th >
< / tr >
< / thead >
<!-- 列表 -->
< tbody >
{@each tip_list as item}
< tr >
< td > ${item.game_name}< / td >
< td > ${item.server_name}< / td >
< td > ${item.role_name}< / td >
< td > ${item.user_account}< / td >
< td > ${item.apply_amount}< / td >
< / tr >
{@/each}
< / tbody >
< / table >
< / div >
< / div >
< / div >
< div style = "padding: 30px 0 0 30px;" >
< p > < input type = "checkbox" name = "ignore" value = "1" / > 以上资源号本日不再进行预警提示!< / p >
< / div >
< div style = "text-align: right;margin-top: 20px" >
< div style = "font-size: 28px;display: inline-block;" >
< div class = "search_list" style = "justify-content:flex-end;width:100%;" >
< div class = "input-list" style = "float: right;" >
< a class = "sch-btn" href = "javascript:;" style = "width: 150px;background: white;border: 1px solid black;color: black" id = "testingTipBack" > 返回< / a >
< / div >
< / div >
< / div >
< div style = "padding: 0 20px 0 0;font-size: 28px;display: inline-block;" >
< div class = "search_list" style = "justify-content:flex-end;width:100%;" >
< div class = "input-list" style = "float: right;" >
< a class = "sch-btn" href = "javascript:;" style = "width: 150px;" id = "goDailyCount" > 确认修改< / a >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / script >
< / block >
< block name = "script" >
< script >
//支付信息更新类
var TestingTip = {
defaultData:{
tip_list:[],
count:0,
ignore_list:[],
jump:''
}
,data : {}
,dataInit(){
this.setDayKey();
this.getLocalIgnoe();
var url = "{:U('TestingResource/dailyCountTip')}";
$.get(url,function(rep){
console.log(rep)
if(rep.status == 1){
if(rep.count > 0){
TestingTip.data.jump = rep.jump
TestingTip.makeData(rep.list)
TestingTip.display()
}
}
})
}
,setDayKey(){
var d = new Date();
this.data.daykey = 'index-tip-ignore-'+d.getFullYear()+"-"+d.getMonth()+1+"-"+d.getDate();;
}
,getLocalIgnoe(){
var ignore_list = Cookies.get(this.data.daykey);
if(!ignore_list){
this.data.ignore_list = this.defaultData.ignore_list;
return;
}
if(ignore_list.length > 1){
this.data.ignore_list = ignore_list.split(',');
}
}
,setLocalIgnoe(){
//获取key
var keys =Object.keys(this.data.tip_list);
var ignore_list = this.data.ignore_list;
ignore_list = ignore_list.concat(keys).join(",");
const ckey = this.data.daykey;
Cookies.set(ckey, ignore_list, { expires: 2 });
}
,removeLocalIgnoe(){
Cookies.remove(this.data.daykey);
}
,makeData(data){
const iglists = this.data.ignore_list;
const icount = this.data.ignore_list.length;
for (let index = 0; index < icount ; index + + ) {
const element = iglists[index];
if(data.hasOwnProperty(element)){
delete data[element];
}
}
this.data.count = Object.keys(data).length;
this.data.tip_list = data;
}
,display(){
if(this.data.count > 0){
var tpl = $("#TestingTipTpl").html();
var html = juicer(tpl, TestingTip.data);
$("#TestingTipShow").html(html);
this.event();
}
}
,remove(){
TestingTip.data = TestingTip.defaultData;
$("#TestingTipShow").html('');
}
,getIsIgnore(){
var flag = false;
$('input[name="ignore"]:checked').each(function(index, element) {
flag = true;
});
return flag;
}
,event(){
$("#goDailyCount,#testingTipBack").off("click");
$("#goDailyCount").on("click",function() {
if(TestingTip.getIsIgnore()){
TestingTip.setLocalIgnoe();
}
window.location.href = TestingTip.data.jump;
})
$("#testingTipBack").on("click",function() {
if(TestingTip.getIsIgnore()){
TestingTip.setLocalIgnoe();
}
TestingTip.remove();
})
}
}
< / script >
< script >
var datelist;
$(function() {
TestingTip.dataInit();
//点击时间显示日历 begin
$(".js-pt-calendar").click(function(){
$(".js-show-calendar").toggle();