添加后台代理代码
This commit is contained in:
175
codes/agent/game/dlweb/api/web2/power_fengwan.html
Normal file
175
codes/agent/game/dlweb/api/web2/power_fengwan.html
Normal file
@@ -0,0 +1,175 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>权限管理-封禁玩家</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=8">
|
||||
<meta http-equiv="Cache" content="no-cache">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Cache-Control" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0"><!--expires出现在http-equiv属性中,使用content属性表示页面缓存的过期时间-->
|
||||
<link rel="stylesheet" type="text/css" href="css/style.css?__HTML_VERSION__=6">
|
||||
<link rel="stylesheet" href="./libs/bootstrap/bootstrap.min.css?__HTML_VERSION__=3">
|
||||
</head>
|
||||
<body class="bg_hui">
|
||||
<div class="count_full" id="colosePlayer" v-show="!isLoading" style="display: none">
|
||||
<header class="header header-pos-fix">
|
||||
<div onclick="history.back(-1)">
|
||||
<img src="img/fahui.png" class="img" >
|
||||
<span class="text_wen">返回</span>
|
||||
</div>
|
||||
</header>
|
||||
<div style="width: 100%;height: 45px;display: block;"></div>
|
||||
<section class="buju">
|
||||
<div class="chongka" id="fengwan">
|
||||
<div class="rowh he">
|
||||
<span class="name">玩 家 ID:</span>
|
||||
<input type="number" placeholder="请输入玩家ID" class="input" autofocus v-model="queryInfo.queryID">
|
||||
<a href="javascript:;" class="btn btn-blue chaxun" @click="queryplayer()">查询</a>
|
||||
</div>
|
||||
<div class="rowh he">
|
||||
<span class="name">玩家昵称:</span>
|
||||
<input type="text" placeholder="空" class="input" v-bind:value="queryInfo.queryName">
|
||||
</div>
|
||||
<div class="rowh he">
|
||||
<span class="name">状 态:</span>
|
||||
<input type="text" placeholder="空" class="input" v-bind:value="queryInfo.strStatus">
|
||||
</div>
|
||||
<div class="rowh he checkbox">
|
||||
<label for="thrid">
|
||||
<input id="thrid" type="radio" name="player_type" value="0" checked="" v-model="queryInfo.status"> 封禁
|
||||
</label>
|
||||
<label for="fouth">
|
||||
<input id="fouth" type="radio" name="player_type" value="1" v-model="queryInfo.status"> 解封
|
||||
</label>
|
||||
</div>
|
||||
<div class="rowh text-center conkabtn">
|
||||
<a href="javascript:;" class="btn btn-danger closes" @click="tokill_player()">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
<script src="./libs/jquery.min.js?__HTML_VERSION__=3"></script>
|
||||
<script src="./libs/vue.min.js?__HTML_VERSION__=3"></script>
|
||||
<script src="./libs/layer_mobile/layer.js?__HTML_VERSION__=3"></script>
|
||||
<script src="./js/function.js?__HTML_VERSION__=18"></script>
|
||||
<script src="./components/home-nav.js?__HTML_VERSION__=12"></script>
|
||||
<script>
|
||||
|
||||
var vm = new Vue({
|
||||
el:"#colosePlayer",
|
||||
data:{
|
||||
isLoading: true,
|
||||
myInfo:{},
|
||||
urlParam:{},
|
||||
queryInfo:{
|
||||
queryID:'',
|
||||
queryName:'',
|
||||
strStatus:'',
|
||||
status:1
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'home-nav': homeNav
|
||||
},
|
||||
methods:{
|
||||
queryplayer:function(){ //查询
|
||||
var param = {
|
||||
agentid: this.urlParam.agentid,
|
||||
channelid: this.urlParam.channelid,
|
||||
playerid: this.queryInfo.queryID
|
||||
};
|
||||
$.api(
|
||||
"agent.user.getUser",
|
||||
param,
|
||||
function (res) {
|
||||
|
||||
this.queryInfo.queryName = res.nickname;
|
||||
var tmp = "";
|
||||
if(res.play_status === "0")
|
||||
{
|
||||
tmp = '正常';
|
||||
this.queryInfo.status = 0;
|
||||
}
|
||||
else if(res.play_status === "1")
|
||||
{
|
||||
tmp = '已被封';
|
||||
this.queryInfo.status = 1;
|
||||
}
|
||||
else
|
||||
tmp = '查询异常';
|
||||
this.queryInfo.strStatus = tmp;
|
||||
|
||||
}.bind(this), 1
|
||||
)
|
||||
|
||||
},
|
||||
tokill_player:function()
|
||||
{
|
||||
//修改
|
||||
var setStatus = 1;
|
||||
//0、封 1、解封
|
||||
var type = parseInt(this.queryInfo.status);
|
||||
if (type === 0)
|
||||
{
|
||||
setStatus = 1;
|
||||
}
|
||||
else if (type === 1)
|
||||
{
|
||||
setStatus = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$.alert("状态设置错误");
|
||||
return false;
|
||||
}
|
||||
|
||||
var param = {
|
||||
agentid: this.urlParam.agentid,
|
||||
channelid: this.urlParam.channelid,
|
||||
unionid: this.myInfo.unionid,
|
||||
playerid: this.queryInfo.queryID,
|
||||
type:setStatus
|
||||
};
|
||||
$.api(
|
||||
"agent.agent.closePlayer",
|
||||
param,
|
||||
function (res){
|
||||
if (type === 0)
|
||||
{
|
||||
this.queryInfo.strStatus = '已被封';
|
||||
this.queryInfo.status = 1;
|
||||
}
|
||||
else if (type === 1)
|
||||
{
|
||||
this.queryInfo.strStatus = '已解封';
|
||||
this.queryInfo.status = 0;
|
||||
}
|
||||
|
||||
$.alert("操作成功!");
|
||||
}.bind(this), 1
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
created:function(){
|
||||
|
||||
this.urlParam = $.getQueryObj();
|
||||
|
||||
$.getUserInfo(function (r) {
|
||||
this.myInfo = r;
|
||||
this.isLoading = false;
|
||||
}.bind(this));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user