添加后台代理代码
This commit is contained in:
206
codes/agent/game/dlweb/api/web2/increase.html
Normal file
206
codes/agent/game/dlweb/api/web2/increase.html
Normal file
@@ -0,0 +1,206 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>新增情况</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="./libs/bootstrap/bootstrap.min.css?__HTML_VERSION__=3">
|
||||
<link rel="stylesheet" href="./css/common.css?__HTML_VERSION__=7">
|
||||
<style>
|
||||
.day {width: 50px; display: inline-block;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container pt70" id="app" v-show="!isLoading" style="display: none">
|
||||
|
||||
<topbar title="新增情况"></topbar>
|
||||
|
||||
<div class="panel panel-default" v-if="result[0]">
|
||||
<div class="panel-heading">玩家新增情况</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间范围</th>
|
||||
<th>人数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(v,i) in result">
|
||||
<td v-html="v.name"></td>
|
||||
<td v-html="v.value"></td>
|
||||
</tr>
|
||||
<tr class="hidden">
|
||||
<td>查询近 <input type="number" v-model="day1" class="form-control day"> 日数据</td>
|
||||
<td><button class="btn btn-primary" @click="queryInfoDay">确定</button></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" v-if="goldInfo[0]">
|
||||
<div class="panel-heading">茶水费新增情况</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间范围</th>
|
||||
<th>数量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(v,i) in goldInfo">
|
||||
<td v-html="v.name"></td>
|
||||
<td v-html="v.value"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default" v-if="buyInfo[0]">
|
||||
<div class="panel-heading">购买新增情况</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间范围</th>
|
||||
<th>数量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(v,i) in buyInfo">
|
||||
<td v-html="v.name"></td>
|
||||
<td v-html="v.value"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</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/topbar.js"></script>
|
||||
<script>
|
||||
new Vue(
|
||||
{
|
||||
el: "#app",
|
||||
components: {
|
||||
'topbar': topbar
|
||||
},
|
||||
data: {
|
||||
isLoading: true,
|
||||
queryid: '',
|
||||
// 近几日
|
||||
day1: '',
|
||||
day2: '',
|
||||
params: {},
|
||||
userInfo: {},
|
||||
result: [],
|
||||
goldInfo: [],
|
||||
buyInfo: []
|
||||
},
|
||||
methods: {
|
||||
queryInfoDay: function () {
|
||||
var el = this;
|
||||
try {
|
||||
if(!el.day1) throw '请输入要查询的天数';
|
||||
if(el.day1 == 0) throw '天数不能为 0';
|
||||
if(!$.isNumeric(el.day1)) throw '请输入正确的天数';
|
||||
} catch (e) {
|
||||
$.alert(e);
|
||||
return;
|
||||
}
|
||||
|
||||
this.queryInfo(el.day1);
|
||||
el.day1 = '';
|
||||
},
|
||||
queryInfo: function (day) {
|
||||
var that = this;
|
||||
var type = 1;
|
||||
|
||||
if(this.params.type)
|
||||
type = this.params.type;
|
||||
|
||||
var data = {
|
||||
agentid: that.params.agentid,
|
||||
channelid: that.params.channelid,
|
||||
salesid: that.userInfo.salesid,
|
||||
queryid: that.queryid,
|
||||
type: type
|
||||
};
|
||||
|
||||
if(day)
|
||||
data['day'] = day;
|
||||
|
||||
$.api(
|
||||
'statistics.report.increasePeople',
|
||||
data,
|
||||
function (result) {
|
||||
that.result = that.result.concat(result);
|
||||
|
||||
if(!day)
|
||||
that.getGoldInfo();
|
||||
}, 1
|
||||
)
|
||||
},
|
||||
getGoldInfo: function () {
|
||||
var that = this;
|
||||
var type = 1;
|
||||
if(this.params.type)
|
||||
type = this.params.type;
|
||||
|
||||
$.api(
|
||||
'game.game.goldIncrease',
|
||||
{
|
||||
agentid: that.params.agentid,
|
||||
channelid: that.params.channelid,
|
||||
salesid: that.userInfo.salesid,
|
||||
queryid: that.queryid,
|
||||
type: type
|
||||
},
|
||||
function (result) {
|
||||
that.goldInfo = result;
|
||||
|
||||
that.getBuyInfo();
|
||||
}, 1
|
||||
)
|
||||
},
|
||||
getBuyInfo: function () {
|
||||
var that = this;
|
||||
var type = 1;
|
||||
if(this.params.type)
|
||||
type = this.params.type;
|
||||
|
||||
$.api(
|
||||
'statistics.report.buy',
|
||||
{
|
||||
agentid: that.params.agentid,
|
||||
channelid: that.params.channelid,
|
||||
salesid: that.userInfo.salesid,
|
||||
queryid: that.queryid,
|
||||
type: type
|
||||
},
|
||||
function (result) {
|
||||
that.buyInfo = result;
|
||||
}, 1
|
||||
)
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.params = $.getQueryObj();
|
||||
|
||||
var that = this;
|
||||
$.getUserInfo(function (userInfo) {
|
||||
that.userInfo = userInfo;
|
||||
that.queryInfo();
|
||||
that.isLoading = false;
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user