You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
409 lines
18 KiB
409 lines
18 KiB
<!DOCTYPE html>
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<!--#include file="/widget/head.html"-->
|
|
<link href="../css/sendEmail.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
|
|
<body class="layui-layout-body" layadmin-themealias="default">
|
|
|
|
<div id="wrapper">
|
|
<!-- Navigation -->
|
|
<!--#include file="/widget/nav.html"-->
|
|
<div id="page-wrapper" class="layui-body layadmin-tabsbody-item layui-show layui-fluid layui-row layui-col-space15">
|
|
<div class="layui-card" id="card-page-wrapper">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<h2 class="page-header">封号禁言管理</h2>
|
|
</div>
|
|
</div>
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li role="presentation"><a role="tab" data-toggle="tab" id="titleSend">查看列表</a></li>
|
|
<li role="presentation" class="active"><a role="tab" data-toggle="tab" id="titleWrite">封号</a></li>
|
|
</ul>
|
|
<div >
|
|
<div role="tabpanel" class="tab-pane" id="write">
|
|
<div class="layui-form row">
|
|
<div class="col-md-4">
|
|
<div class="login-panel panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">封号</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<form role="form">
|
|
<div class="form-group">
|
|
<label>UID(填写)</label>
|
|
<input type="text" class="form-control" id="uid" placeholder="Enter Uid" lay-verify="required">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>时间(天)(填0为解封,上限9999)</label>
|
|
<input type="text" class="form-control" id="day" placeholder="Time" lay-verify="required">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="reasonType">封禁原因</label>
|
|
<select class="form-control " name="reasonType" id="reasonType" lay-search lay-filter>
|
|
<option value="0">请选择</option>
|
|
<option value="1">游戏内违规行为</option>
|
|
<option value="2">发布不良信息</option>
|
|
<option value="3">违规使用脚本外挂</option>
|
|
<option value="4">诽谤/辱骂他人</option>
|
|
<option value="5">其他</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group" id="otherReason" style="display: none;">
|
|
<label>其他原因</label>
|
|
<input type="text" class="form-control" id="otherStr" placeholder="Other Reason">
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="button" class=" pull-right layui-btn" id="stop" data-toggle="modal" data-target="#myModal">封号</button>
|
|
<button type="reset" class=" pull-right layui-btn layui-bg-red">清空</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="login-panel panel panel-default">
|
|
<div class="panel-heading">
|
|
<h3 class="panel-title">禁言</h3>
|
|
</div>
|
|
<div class="panel-body">
|
|
<form role="form">
|
|
<div class="form-group">
|
|
<label>UID(填写)</label>
|
|
<input type="text" class="form-control" id="uid2" placeholder="Enter Uid">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>时间(小时)(填0为解封)</label>
|
|
<input type="text" class="form-control" id="day2" placeholder="Time" lay-verify="required">
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="button" class=" layui-btn pull-right" id="stop2" data-toggle="modal" data-target="#myModal2">禁言</button>
|
|
<button type="reset" class=" layui-btn layui-bg-red pull-right" style="margin-right: 15px">清空</button>
|
|
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div role="tabpanel" class="tab-pane" id="send" style="display:none;">
|
|
<div class="layui-form">
|
|
<div class="layui-form-item layui-inline" style="width:400px;">
|
|
<label class="layui-form-label" style="width: 120px;">选择查看类型</label>
|
|
<div class="layui-form-item layui-inline">
|
|
<select name="type" lay-verify="required" lay-filter="type">
|
|
<option value="1">封号列表</option>
|
|
<option value="2">禁言列表</option>
|
|
<option value="3">解封列表</option>
|
|
<option value="4">解禁列表</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline" style="width:400px;">
|
|
<label class="layui-form-label" style="width: 120px;">开始时间</label>
|
|
<div class="layui-inline" style="width:220px;">
|
|
<input type="text" name="title" id="stadate" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline" style="width:400px;">
|
|
<label class="layui-form-label" style="width: 120px;">结束时间</label>
|
|
<div class="layui-inline" style="width:220px;">
|
|
<input type="text" name="title" id="enddate" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-inline" style="width:100px;">
|
|
<div class="layui-inline" style="width:100px;">
|
|
<button class="layui-btn" type="button" id="query">查询</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="Datatab" lay-filter="Datatab"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<script id="bt" type="text/template">
|
|
{{# if(searchType == 1 || searchType == 2) { }}
|
|
<button class="layui-btn layui-btn-xs" lay-event="startUser">解封</button>
|
|
{{ } }}
|
|
</script>
|
|
|
|
<!--#include file="/widget/stop-tail.html"-->
|
|
<script>
|
|
|
|
$("#stop").click(function (){
|
|
let uid=$("#uid").val();
|
|
let day=$("#day2").val();
|
|
|
|
layer.confirm('确定对:'+uid+"封号:"+day+"天嘛?", function(index){
|
|
submit();
|
|
layer.close(index);
|
|
});
|
|
|
|
})
|
|
|
|
$("#stop2").click(function (){
|
|
let uid=$("#uid2").val();
|
|
let day=$("#day2").val();
|
|
|
|
layer.confirm('确定对:'+uid+"禁言:"+day+"小时嘛?", function(index){
|
|
submit2();
|
|
layer.close(index);
|
|
});
|
|
|
|
})
|
|
|
|
layui.table.on('tool(Datatab)', function(obj){
|
|
var uid = obj.data.uid || obj.data.id;
|
|
var reasonType = obj.data.reasonType,
|
|
otherStr = obj.data.otherStr
|
|
if(obj.event === 'startUser') {
|
|
layer.confirm(`确定要将【${uid}】进行解封吗?`, function(index){
|
|
$.ajax({
|
|
url: Page.SvrIp + "/api/lift_ban?token=" + cookie.get("token"),
|
|
type: 'post',
|
|
dataType:"json",
|
|
contentType: 'application/json',
|
|
data: JSON.stringify({
|
|
role_id: uid,
|
|
lock_time: 0,
|
|
server_id: 0,
|
|
type: $('[name="type"]').val() == 1 ? 1 : 2,
|
|
reason: ''
|
|
}),
|
|
beforeSend: function () {
|
|
/*$("#waite-send").css("display","block");*/
|
|
|
|
},
|
|
complete: function (data) {
|
|
/*$("#waite-send").css("display","none");*/
|
|
},
|
|
success: function (data) {
|
|
if(data.ret==0){
|
|
layer.msg('发送请求成功')
|
|
}else if(data.ret==3){
|
|
layer.msg(data.msg)
|
|
}else{
|
|
layer.msg(data.msg)
|
|
}
|
|
layui.table.reload('tableIns', {
|
|
where: {
|
|
type: 1,
|
|
token: cookie.get("token"),
|
|
startDate: $("#stadate").val(),
|
|
endDate: $("#enddate").val()
|
|
}
|
|
});
|
|
layer.close(index);
|
|
},
|
|
error: function (data) {
|
|
alert("连接失败或正在发送中,请等待")
|
|
}
|
|
});
|
|
});
|
|
}
|
|
})
|
|
var searchType = '1'
|
|
|
|
$(function () {
|
|
var _d = new Date();
|
|
layui.laydate.render({
|
|
elem: '#stadate',
|
|
value: _d.getFullYear() + "-" + (_d.getMonth() + 1) + "-" + _d.getDate()
|
|
});
|
|
layui.laydate.render({
|
|
elem: '#enddate',
|
|
value: _d.getFullYear() + "-" + (_d.getMonth() + 1) + "-" + _d.getDate()
|
|
});
|
|
layui.form.on('select(type)', function(data){
|
|
searchType = $('[name="type"]').val()
|
|
if(searchType == 3 || searchType == 4) {
|
|
$('.my-hidden').addClass('hidden')
|
|
}
|
|
if(searchType == 1 || searchType == 2) {
|
|
$('.my-hidden').removeClass('hidden')
|
|
}
|
|
tableIns.reload({
|
|
where: {
|
|
type: $('[name="type"]').val(),
|
|
token: cookie.get("token"),
|
|
startDate: $("#stadate").val(),
|
|
endDate: $("#enddate").val()
|
|
}
|
|
});
|
|
});
|
|
|
|
$("#query").click(function () {
|
|
searchType = $('[name="type"]').val()
|
|
if(searchType == 3 || searchType == 4) {
|
|
$('.my-hidden').addClass('hidden')
|
|
}
|
|
if(searchType == 1 || searchType == 2) {
|
|
$('.my-hidden').removeClass('hidden')
|
|
}
|
|
tableIns.reload({
|
|
where: {
|
|
type: $('[name="type"]').val(),
|
|
token: cookie.get("token"),
|
|
startDate: $("#stadate").val(),
|
|
endDate: $("#enddate").val()
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
//var args = initPage('已封');
|
|
|
|
|
|
|
|
var tableIns = layui.table.render({
|
|
id: 'tableIns',
|
|
elem: '#Datatab'
|
|
, url: Page.SvrIp+'/api/select_banUser' //数据接口
|
|
, where: {
|
|
type: 1,
|
|
token: cookie.get("token"),
|
|
startDate: $("#stadate").val(),
|
|
endDate: $("#enddate").val()
|
|
}
|
|
, page: true
|
|
, cols: [[
|
|
{ field: 'uid', title: 'uid', width: 160 }
|
|
, { field: 'dateStr', title: '封号起始日期', width: 160 }
|
|
, { field: 'banDay', title: '封号结束日期', width: 160 }
|
|
, { field: 'reasonType', title: '封号原因', width: 160 ,templet(d){
|
|
let reason="";
|
|
debugger
|
|
switch(d.reasonType){
|
|
case 1:
|
|
reason="游戏内违规行为";
|
|
break;
|
|
case 2:
|
|
reason="发布不良信息";
|
|
break;
|
|
case 3:
|
|
reason="违规使用脚本外挂";
|
|
break;
|
|
case 4:
|
|
reason="诽谤/辱骂他人";
|
|
break;
|
|
case 5:
|
|
reason="其他";
|
|
break;
|
|
}
|
|
return reason;
|
|
} }
|
|
, { field: 'admin', title: '操作员', width: 160}
|
|
, { field: 'otherStr', title: '其他', width: 160}
|
|
, { field: 'uid', title: '编辑', width: 80, templet: function (d) {
|
|
var str = "";
|
|
if(searchType == 1 || searchType == 2) {
|
|
str += '<button class="layui-btn layui-btn-xs my-hidden" lay-event="startUser">解封</button>'
|
|
}
|
|
return str;
|
|
}
|
|
}
|
|
]]
|
|
, parseData: function (res) { //res 即为原始返回的数据
|
|
if (res.ret == 1) {
|
|
location.href = "/pages/login.html";
|
|
}
|
|
return {
|
|
"code": res.ret, //解析接口状态
|
|
"msg": res.msg, //解析提示文本
|
|
"count": res.count, //解析数据长度
|
|
"data": res.data //解析数据列表
|
|
};
|
|
}
|
|
});
|
|
|
|
var tableIns2 = layui.table.render({
|
|
elem: '#Datatab2'
|
|
, url: Page.SvrIp+'/api/select_banUser' //数据接口
|
|
, where: {
|
|
type: 2,
|
|
token: cookie.get("token"),
|
|
startDate: $("#stadate2").val(),
|
|
endDate: $("#enddate2").val()
|
|
}
|
|
, page: true
|
|
, cols: [[
|
|
{ field: 'uid', title: 'uid', width: 160 }
|
|
, { field: 'dateStr', title: '禁言起始日期', width: 160 }
|
|
, { field: 'banDay', title: '禁言结束日期', width: 160 }
|
|
]]
|
|
, parseData: function (res) { //res 即为原始返回的数据
|
|
if (res.ret == 1) {
|
|
location.href = "/pages/login.html";
|
|
}
|
|
return {
|
|
"code": res.ret, //解析接口状态
|
|
"msg": res.msg, //解析提示文本
|
|
"count": res.count, //解析数据长度
|
|
"data": res.data //解析数据列表
|
|
};
|
|
}
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#reasonType').on('change', function(e) {
|
|
if(e.target.value == 5) {
|
|
$('#otherReason').show()
|
|
} else {
|
|
$('#otherReason').hide()
|
|
}
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<script type="text/x-handlebars-template" id="box">
|
|
<div class="panel-heading">
|
|
<div class="selectbox pull-right" id="{{chartId}}_datepicker">
|
|
<i class="fa fa-calendar"></i>
|
|
<span>{{startDate}} 至 {{endDate}}</span> <b class="caret"></b>
|
|
</div>
|
|
<div class="pull-right btn-group" data-toggle="buttons">
|
|
<lable class="btn btn-default active" title="图表模式" name="{{chartId}}_mode_chart" style="display:none;">
|
|
<input type="radio"><i class="fa fa-bar-chart-o"></i></input>
|
|
</lable>
|
|
<lable class="btn btn-default" title="表格模式" name="{{chartId}}_mode_table" style="display:none;">
|
|
<input type="radio"><i class="fa fa-table"></i></input>
|
|
</lable>
|
|
</div>
|
|
<div>
|
|
<!-- Nav tabs -->
|
|
<ul class="nav nav-pills multibox-tab">
|
|
{{#each tabs}}
|
|
<li{{#if @first}} class="active" {{/if}}>
|
|
<a href="#{{../chartId}}_tab_{{@index}}" data-toggle="tab" desc="{{this}}">{{this}}</a></li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- /.panel-heading -->
|
|
<div class="panel-body">
|
|
<div class="flot-chart mtss-chart">
|
|
<div class="flot-chart-content" id="{{chartId}}_chartZone"></div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|