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.
127 lines
2.7 KiB
127 lines
2.7 KiB
/**
|
|
* Created by Administrator on 2016/11/28.
|
|
*/
|
|
$("#titleWrite").click(function(){
|
|
$("#left-content").css("display","block")
|
|
if($("#write").css("display") == "none"){
|
|
$("#write").show();
|
|
$("#send").hide()
|
|
$("#send2").hide()
|
|
}
|
|
$(".container").css("width","1170px")
|
|
});
|
|
$("#titleSend2").click(function(){
|
|
if($("#send2").css("display") == "none"){
|
|
$("#send2").show();
|
|
$("#send").hide();
|
|
$("#send3").hide();
|
|
$("#write").hide()
|
|
}
|
|
})
|
|
|
|
|
|
$("#titleSend").click(function(){
|
|
if($("#send").css("display") == "none"){
|
|
$("#send").show();
|
|
$("#write").hide()
|
|
$("#send2").hide()
|
|
}
|
|
});
|
|
|
|
$(window).load(function(){
|
|
$("#send").css("display","none")
|
|
})
|
|
|
|
|
|
|
|
$("#stop").click(function(){
|
|
var uid = $('#uid').val();
|
|
var day = $('#day').val();
|
|
var reasonType = $('#reasonType').val();
|
|
var otherStr = $('#otherStr').val();
|
|
var reg=/^[0-9]*$/;
|
|
if (!reg.test(uid) || uid.length == 0 || !reg.test(day) || day.length == 0) {
|
|
layer.msg("请填写uid或时间");
|
|
return false
|
|
}
|
|
if(reasonType == 0) {
|
|
layer.msg("请选择封禁原因");
|
|
return false
|
|
}
|
|
if(reasonType == 5 && otherStr.length == 0) {
|
|
layer.msg("请填写其他原因");
|
|
return false
|
|
}
|
|
$(".modal-body span").text(uid);
|
|
});
|
|
|
|
$("#stop2").click(function(){
|
|
var uid = $('#uid2').val();
|
|
var day = $('#day2').val();
|
|
var reg=/^[0-9]*$/;
|
|
if (!reg.test(uid) || uid.length == 0 || !reg.test(day) || day.length == 0) {
|
|
layer.msg("请填写uid或时间");
|
|
return false
|
|
}
|
|
$(".modal-body span").text(uid);
|
|
});
|
|
|
|
function submit(){
|
|
var uid = $('#uid').val();
|
|
var day = $('#day').val();
|
|
var reasonType = $('#reasonType').val();
|
|
var otherStr;
|
|
|
|
if(reasonType == 5) {
|
|
otherStr = $('#otherStr').val();
|
|
}
|
|
var token = checkCookie();
|
|
$.getJSON(Page.SvrIp+"/api/banuser", {
|
|
type: 1,
|
|
token: token,
|
|
uid: uid,
|
|
bantime: day,
|
|
reasonType,
|
|
otherStr
|
|
}, function(data) {
|
|
|
|
console.log(data);
|
|
if(data.ret==3){
|
|
layer.msg(data.msg)
|
|
|
|
}else{
|
|
layer.msg(data.msg)
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
function submit2(){
|
|
var uid = $('#uid2').val();
|
|
var day = $('#day2').val();
|
|
|
|
var token = checkCookie();
|
|
$.getJSON(Page.SvrIp+"/api/banuser", {
|
|
type: 2,
|
|
token: token,
|
|
uid: uid,
|
|
bantime: day
|
|
}, function(data) {
|
|
|
|
console.log(data);
|
|
if(data.ret==3){
|
|
layer.msg(data.msg)
|
|
|
|
}else{
|
|
layer.msg(data.msg)
|
|
}
|
|
|
|
});
|
|
}
|
|
|
|
$("#sure").click(function(){
|
|
submit();
|
|
});
|
|
$("#sure2").click(function(){
|
|
submit2();
|
|
});
|