添加后台代理代码
This commit is contained in:
176
codes/agent/game/dlweb/api/web2/power_fadai.html
Normal file
176
codes/agent/game/dlweb/api/web2/power_fadai.html
Normal file
@@ -0,0 +1,176 @@
|
||||
<!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">
|
||||
<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="app" 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">账号:</span>
|
||||
<input type="number" placeholder="请输入账号" class="input" autofocus v-model="queryInfo.queryID">
|
||||
<a href="javascript:;" class="btn btn-blue chaxun" @click="querySale()">查询</a>
|
||||
</div>
|
||||
<div class="rowh he">
|
||||
<span class="name">昵称:</span>
|
||||
<input type="text" placeholder="空" class="input" v-model="queryInfo.saleName">
|
||||
</div>
|
||||
<div class="rowh he">
|
||||
<span class="name">房卡数:</span>
|
||||
<input type="text" placeholder="空" class="input" v-model="queryInfo.saleCard">
|
||||
</div>
|
||||
<div class="rowh he">
|
||||
<span class="name">{{lang.starName}}数:</span>
|
||||
<input type="text" placeholder="空" class="input" v-model="queryInfo.saleStar">
|
||||
</div>
|
||||
<div class="rowh he checkbox margin-left-30">
|
||||
<label for="thrid">
|
||||
<input id="thrid" type="radio" name="player_type" value="0" checked="" v-model="queryInfo.deductType"> 减房卡
|
||||
</label>
|
||||
<label for="fouth">
|
||||
<input id="fouth" type="radio" name="player_type" value="1" v-model="queryInfo.deductType"> 减{{lang.starName}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="rowh he">
|
||||
<span class="name">数量:</span>
|
||||
<input type="text" class="input" v-model="queryInfo.amount">
|
||||
</div>
|
||||
<div class="rowh text-center conkabtn">
|
||||
<a href="javascript:;" class="btn btn-danger closes" @click="submitDeduct()">确定</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="./libs/jquery.min.js?__HTML_VERSION__=3"></script>
|
||||
<script src="./libs/bootstrap/bootstrap.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="./lang/lang.js?__HTML_VERSION__=14"></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: "#app",
|
||||
data: {
|
||||
isLoading: true,
|
||||
lang: {},
|
||||
myInfo: {},
|
||||
urlParam: {},
|
||||
queryInfo: {
|
||||
queryID: '',
|
||||
saleName: '',
|
||||
saleCard: 0,
|
||||
saleStar: 0,
|
||||
deductType: 0, //0、房卡,1、星星
|
||||
amount: 0 //扣除数量
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'home-nav': homeNav
|
||||
},
|
||||
methods: {
|
||||
goHome: function () {
|
||||
window.location.href = 'index.html?agentid=' + this.urlParam.agentid + '&channelid=' + this.urlParam.channelid+'&__HTML_VERSION__=3';
|
||||
},
|
||||
querySale: function () {
|
||||
if (this.queryInfo.queryID === null || this.queryInfo.queryID === '') {
|
||||
$.alert("请输入账号");
|
||||
return;
|
||||
}
|
||||
|
||||
$.api(
|
||||
'agent.agent.findAgent',
|
||||
{
|
||||
agentid: this.urlParam.agentid,
|
||||
channelid: this.urlParam.channelid,
|
||||
salesid: this.queryInfo.queryID
|
||||
},
|
||||
function (res) {
|
||||
this.queryInfo.saleName = res.salesname;
|
||||
this.queryInfo.saleCard = res.roomcard;
|
||||
this.queryInfo.saleStar = res.been;
|
||||
}.bind(this), 1
|
||||
);
|
||||
|
||||
},
|
||||
submitDeduct: function () {
|
||||
if (this.queryInfo.queryID === null || this.queryInfo.queryID === '') {
|
||||
$.alert("请输入账号");
|
||||
return;
|
||||
}
|
||||
|
||||
var amount = parseInt(this.queryInfo.amount);
|
||||
if (amount <= 0) {
|
||||
$.alert('请输入正确的数量');
|
||||
return;
|
||||
}
|
||||
|
||||
$.api(
|
||||
'agent.agent.deductSales',
|
||||
{
|
||||
agentid: this.urlParam.agentid,
|
||||
channelid: this.urlParam.channelid,
|
||||
salesid: this.myInfo.salesid,
|
||||
deductid: this.queryInfo.queryID,
|
||||
amount: this.queryInfo.amount,
|
||||
type: this.queryInfo.deductType
|
||||
},
|
||||
function () {
|
||||
if (this.queryInfo.deductType === 0) {
|
||||
this.queryInfo.saleCard = this.queryInfo.saleCard - amount;
|
||||
|
||||
if (this.queryInfo.saleCard < 0) {
|
||||
this.queryInfo.saleCard = 0;
|
||||
}
|
||||
}
|
||||
else if (this.queryInfo.saleStar === 1) {
|
||||
this.queryInfo.saleStar = this.queryInfo.saleStar - amount;
|
||||
|
||||
if (this.queryInfo.saleStar < 0) {
|
||||
this.queryInfo.saleStar = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$.alert("扣除成功!");
|
||||
}.bind(this), 1
|
||||
);
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.urlParam = $.getQueryObj();
|
||||
this.lang = lang[this.urlParam.agentid] ? lang[this.urlParam.agentid] : lang.default;
|
||||
|
||||
$.getUserInfo(function (r) {
|
||||
this.myInfo = r;
|
||||
this.isLoading = false;
|
||||
}.bind(this));
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user