Merge branch 'release' into feature/ylw-06-17

master
yulingwei 4 years ago
commit c8924779c4

@ -434,7 +434,6 @@ class ConsoleController extends Think {
$start = I('start', date('Y-m-d'));
$end = I('end', date('Y-m-d'));
$gameIds = I('game_ids', '');
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59');
$gameIdRows = explode(',', $gameIds);

@ -0,0 +1,233 @@
<?php
namespace Admin\Controller;
use User\Api\UserApi as UserApi;
use Base\Service\PresidentDepositService;
/**
* 推广限制
*/
class PromoteLimitRuleController extends ThinkController
{
public function records()
{
$page = I('p', 1);
$row = I('row', 10);
$companyId = I('company_id', 0);
$promoteId = I('promote_id', 0);
$conditions = [];
$promoteIds = [];
if ($promoteId !== 0) {
$promoteIds = [$promoteId];
}
if ($companyId !== 0) {
$companyPromoteIds = M('promote', 'tab_')->field(['id'])->where(['company_id' => $companyId, 'level' => 1])->getField('id', true);
if (count($companyPromoteIds) > 0) {
$promoteIds = count($promoteIds) ? array_intersect($companyPromoteIds, $promoteIds) : $companyPromoteIds;
$promoteIds[] = 0;
} else {
$promoteIds = [0];
}
}
if (count($promoteIds)) {
$conditions['promote_id'] = ['in', $promoteIds];
}
$query = M('promote_limit_rules', 'tab_')->where($conditions);
$countQuery = clone $query;
$rules = $query->page($page, $row)->select();
$count = $countQuery->count();
$recordPromotes = [];
$recordCompanys = [];
if (count($rules) > 0) {
$recordPromotes = M('promote', 'tab_')->field(['id', 'account', 'company_id'])->where(['id' => ['in', array_column($rules, 'promote_id')]])->select();
$recordCompanyIds = array_column($recordPromotes, 'company_id');
if (count($recordCompanyIds) > 0) {
$recordCompanys = M('promote_company', 'tab_')->field(['id', 'company_name', 'company_belong'])->where(['id' => ['in', $recordCompanyIds]])->select();
}
$recordPromotes = index_by_column('id', $recordPromotes);
$recordCompanys = index_by_column('id', $recordCompanys);
}
$companyTypes = [
0 => '内团',
1 => '外团',
2 => '外团-分发联盟',
3 => '无'
];
$records = [];
foreach ($rules as $rule) {
$records[] = [
'id' => $rule['id'],
'promote_account' => $recordPromotes[$rule['promote_id']]['account'],
'company_name' => $recordCompanys[$recordPromotes[$rule['promote_id']]['company_id']]['company_name'],
'company_belong' => $companyTypes[$recordCompanys[$recordPromotes[$rule['promote_id']]['company_id']]['company_belong']],
'limit_rule' => $this->getDisplayRule($rule),
];
}
$companys = M('promote_company', 'tab_')->field(['id', 'company_name'])->select();
$page = set_pagination($count, $row);
if($page) {
$this->assign('_page', $page);
}
$this->assign('records', $records);
$this->assign('companys', $companys);
$this->display();
}
private function getDisplayRule($rule)
{
if ($rule['started_at'] === null && $rule['ended_at'] === null) {
return '永久';
} elseif ($rule['started_at'] === null && $rule['ended_at'] !== null) {
return '从前 至 '.$rule['ended_at'];
} elseif ($rule['started_at'] !== null && $rule['ended_at'] === null) {
return $rule['started_at'] . ' 至 永久';
} else {
return $rule['started_at'] . ' ~ ' . $rule['ended_at'];
}
}
public function edit()
{
$this->meta_title = '编辑推广限制';
$id = I('id', 0);
$companys = M('promote_company', 'tab_')->field(['id', 'company_name'])->select();
$record = M('promote_limit_rules', 'tab_')->where(['id' => $id])->find();
$promote = null;
$company = null;
if ($record) {
$promote = M('promote', 'tab_')->where(['id' => $record['promote_id']])->field(['id', 'company_id', 'account'])->find();
$company = M('promote_company', 'tab_')->where(['id' => $promote['company_id']])->field(['id', 'company_name'])->find();
}
$this->assign('promote', $promote);
$this->assign('company', $company);
$this->assign('companys', $companys);
$this->assign('record', $record);
$this->display('form');
}
public function save()
{
$id = I('id', 0);
$promoteId = I('promote_id', 0);
$startedAt = I('started_at', '');
$endedAt = I('ended_at', '');
$startedAt = $startedAt === '' ? null : $startedAt;
$endedAt = $endedAt === '' ? null : $endedAt;
if ($startedAt && $endedAt && strtotime($startedAt) > strtotime($endedAt)) {
return $this->error('开始时间不能大于结束时间');
}
$record = null;
if ($id > 0) {
$record = M('promote_limit_rules', 'tab_')->where(['id' => $id])->find();
if (!$record) {
return $this->error('修改记录不存在');
}
} else {
if (empty($promoteId)) {
return $this->error('请选择会长');
}
$promoteRecord = M('promote_limit_rules', 'tab_')->where(['promote_id' => $promoteId])->find();
if ($promoteRecord) {
return $this->error('该会长已经设定限制规则,请前往更新');
}
}
if ($record) {
$data = [];
$data['started_at'] = $startedAt;
$data['ended_at'] = $endedAt;
$data['update_time'] = time();
M('promote_limit_rules', 'tab_')->where(['id' => $id])->save($data);
addOperationLog([
'op_type' => 1,
'key'=> $promoteId . '/' . $startedAt . '/' . $endedAt,
'op_name' => '修改推广限制',
'url' => U('PresidentDeposit/edit', ['id'=>$id]), 'menu'=>'推广员-推广员管理-推广限制-修改推广限制'
]);
} else {
$data = [];
$data['promote_id'] = $promoteId;
$data['started_at'] = $startedAt;
$data['ended_at'] = $endedAt;
$data['create_time'] = time();
$data['update_time'] = time();
M('promote_limit_rules', 'tab_')->add($data);
addOperationLog([
'op_type' => 0,
'key'=> $promoteId . '/' . $startedAt . '/' . $endedAt,
'op_name' => '新增推广限制',
'url' => U('PresidentDeposit/edit', ['promote_id'=>$promoteId]), 'menu'=>'推广员-推广员管理-推广限制-新增推广限制'
]);
}
return $this->success('保存成功', U('records'));
}
public function delete()
{
$id = I('id', 0);
M('promote_limit_rules', 'tab_')->where(['id' => $id])->delete();
addOperationLog([
'op_type' => 2,
'key' => $id,
'op_name' => '删除会长推广限制',
'url' => U('PresidentDeposit/delete', ['id' => $id]),
'menu' => '推广员-推广员管理-推广限制-删除推广限制'
]);
$this->ajaxReturn([
'status' => 1,
'message' => '删除成功'
]);
}
public function batchDelete()
{
$ids = I('ids', []);
if (count($ids) == 0) {
$this->ajaxReturn([
'status' => 0,
'message' => '无选中项'
]);
}
M('promote_limit_rules', 'tab_')->where(['id' => ['in', $ids]])->delete();
addOperationLog([
'op_type' => 2,
'key' => implode(',', $ids),
'op_name' => '批量删除会长推广限制',
'url' => U('PresidentDeposit/batchDelete', ['ids' => implode(',', $ids)]),
'menu' => '推广员-推广员管理-推广限制-批量删除推广限制'
]);
$this->ajaxReturn([
'status' => 1,
'message' => '删除成功'
]);
}
public function getPromotesByCompany()
{
$companyId = I('company_id', 0);
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['level' => 1, 'company_id' => $companyId])->select();
$this->ajaxReturn([
'status' => 1,
'message' => '获取成功',
'data' => [
'promotes' => $promotes
]
]);
}
}

@ -147,7 +147,8 @@ class StatController extends ThinkController
$start = I('start', date('Y-m-d',strtotime('-7 day')));
$end = empty(I('end')) ? time_format(time(),'Y-m-d') : I('end');
$dataOrder = I('data_order', '');
$gameId = I('game_id', 0);
$baseGameId = I('game_id', 0);
$deviceType = I('device_type', '');
$promoteId = I('promote_id', 0);
$orderType = 'asc';
@ -162,10 +163,14 @@ class StatController extends ThinkController
$status = true;
$data = false;
$error = '';
if ($gameId == 0) {
if ($baseGameId == 0) {
$error = '请选择游戏!';
$status = false;
}
if ($deviceType == '') {
$error = '请选择设备类型!';
$status = false;
}
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59') + 1;
if ((($endTime - $startTime)/(24*3600)) > 31) {
@ -173,6 +178,10 @@ class StatController extends ThinkController
$status = false;
}
if ($status) {
$baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find();
$gameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
$client = new Client([
'base_uri' => C('TASK_URL'),
'timeout' => 10.0,
@ -218,6 +227,9 @@ class StatController extends ThinkController
$this->assign('error', $error);
}
$baseGames = M('base_game', 'tab_')->select();
$this->assign('baseGames', $baseGames);
$this->checkListOrCountAuthRestMap($map,[]);
$this->assign('data', $data);
@ -676,6 +688,165 @@ AND UNIX_TIMESTAMP(
}
public function userarpu($p=0)
{
$start = I('start', date('Y-m-d'));
$end = I('end', date('Y-m-d'));
$baseGameIds = I('game_ids', '');
$promoteId = I('promote_id', 0);
$dataOrder = I('data_order', '');
$deviceType = I('device_type', '');
$containBindCoins = I('contain_bind_coins', 0);
$orderType = '';
$order = 0;
if ($dataOrder != '') {
$dataOrderRow = explode(',', $dataOrder);
$order = $dataOrderRow[0];
$orderType = $dataOrderRow[1];
}
$promoteIds = [];
if ($promoteId > 0) {
$promote = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => $promoteId])->find();
$promoteIds = M('promote', 'tab_')->where(['chain' => ['like', $promote['chain'] . $promote['id'] . '/%']])->getField('id', true);
$promoteIds[] = $promote['id'];
}
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59');
$baseGameIdRows = $baseGameIds ? explode(',', $baseGameIds) : [];
$baseGames = M('base_game', 'tab_')->select();
$gameIds = null;
$conditions = [];
if (count($baseGameIdRows)) {
$tmpBaseGames = M('base_game', 'tab_')->where(['id' => ['in', $baseGameIdRows]])->select();
$gameIds = array_merge(array_column($tmpBaseGames, 'android_game_id'), array_column($tmpBaseGames, 'ios_game_id'));
}
if (count($promoteIds)) {
$conditions['promote_id'] = ['in', $promoteIds];
}
if ($deviceType != '') {
if ($gameIds) {
$gameIds = (
$deviceType == 'android' ?
array_intersect($gameIds, array_column($baseGames, 'android_game_id')) :
array_intersect($gameIds, array_column($baseGames, 'ios_game_id'))
);
} else {
$gameIds = (
$deviceType == 'android' ?
array_column($baseGames, 'android_game_id') :
array_column($baseGames, 'ios_game_id')
);
}
}
if ($gameIds && count($gameIds)) {
if (count($gameIds)) {
$conditions['game_id'] = ['in', $gameIds];
} else {
$conditions['game_id'] = ['in', 0];
}
}
// 新增用户
/* M('user', 'tab_')
->field('count(*) count, FROM_UNIXTIME(register_time, "%Y-%m-%d") date')
->where([
'game_id' => ['in', $gameIdRows],
'register_time' => ['between', [$startTime, $endTime]]
])
->group('date')
->select(); */
$newUsers = M('user_play', 'tab_')
->field('count(DISTINCT user_id) count, FROM_UNIXTIME(create_time, "%Y-%m-%d") date')
->where(array_merge($conditions, ['create_time' => ['between', [$startTime, $endTime]]]))
->group('date')
->select();
$newUsers = index_by_column('date', $newUsers);
// 活跃用户
$loginUsers = M('login_daily_record', 'tab_')
->field('count(DISTINCT user_id) count, FROM_UNIXTIME(create_time, "%Y-%m-%d") date')
->where(array_merge($conditions, ['create_time' => ['between', [$startTime, $endTime]]]))
->group('date')
->select();
$loginUsers = index_by_column('date', $loginUsers);
$spendConditions = array_merge($conditions, [
'pay_time' => ['between', [$startTime, $endTime]],
'pay_status' => 1,
]);
if ($containBindCoins == 0) {
$spendConditions['pay_way'] = ['gt', -1];
}
// 付费玩家,付费金额
$payLogs = M('spend', 'tab_')
->field('count(DISTINCT user_id) count, sum(pay_amount) amount, FROM_UNIXTIME(pay_time, "%Y-%m-%d") date')
->where($spendConditions)
->group('date')
->select();
$payLogs = index_by_column('date', $payLogs);
$rows = [];
for ($time = $startTime; $time < $endTime; $time = $time + 24*3600) {
$date = date('Y-m-d', $time);
$newUser = isset($newUsers[$date]) ? $newUsers[$date]['count'] : 0;
$loginUser = isset($loginUsers[$date]) ? $loginUsers[$date]['count'] : 0;
$payAmount = isset($payLogs[$date]) ? $payLogs[$date]['amount'] : 0;
$payUser = isset($payLogs[$date]) ? $payLogs[$date]['count'] : 0;
$rows[] = [
'date' => $date,
'new_user' => $newUser,
'login_user' => $loginUser,
'pay_amount' => $payAmount,
'pay_user' => $payUser,
'pay_rate' => $loginUser > 0 ? (round($payUser / $loginUser * 100, 2)) : '0',
'arpu' => $loginUser > 0 ? (round($payAmount / $loginUser, 2)) : '0.00',
'arppu' => $payUser > 0 ? (round($payAmount / $payUser, 2)) : '0.00',
];
}
if (I('export', 0) == 1) {
$fields = [
'date' => '日期',
'new_user' => '新增玩家',
'login_user' => '活跃玩家',
'pay_account' => '充值金额',
'pay_user' => '付费玩家',
'pay_rate' => '付费率',
'arpu' => 'ARPU',
'arppu' => 'ARPPU',
];
foreach ($rows as &$item) {
$item['pay_rate'] = $item['pay_rate'] . '%';
}
addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'ARPU分析','url'=>U('Stat/userarpu'),'menu'=>'统计-数据分析-ARPU分析']);
data2csv($rows, '数据分析_ARPU分析', $fields);
exit;
}
if ($dataOrder) {
$sort = $order == 3 ? SORT_DESC : SORT_ASC;
$orderColumn = array_column($rows, $orderType);
array_multisort($orderColumn, $sort, SORT_REGULAR, $rows);
}
$this->meta_title = 'ARPU统计';
$this->assign('baseGames', $baseGames);
$this->assign('records', $rows);
$this->assign('order', $order);
$this->assign('orderType', $orderType);
$this->display();
}
public function userarpu_old($p=0)
{
$request=$_REQUEST;
$page = intval($p);

@ -80,6 +80,10 @@ class PromoteModel extends Model{
}
}
public function login_phone($user) {
$this->autoLogin($user);
}

@ -0,0 +1,241 @@
<extend name="Public/base" />
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.tabcon1711 input.time {
width: 150px;
}
#form .txt_area {
width: 300px;
height: 150px;
}
.tabcon1711 .form_unit {
margin-left: 2px;
}
.tabcon1711 .mustmark {
margin-left:-7px;
}
.list-ratio {
display: table;
}
.list-ratio .li-ratio {
display: flex;
margin-bottom: 20px;
align-items: center;
}
.list-ratio .li-ratio .turnover, .list-ratio .li-ratio .turnover-ratio {
position: relative;
}
.list-ratio .li-ratio .turnover span, .list-ratio .li-ratio .turnover-ratio .error-message {
color: red;
position: absolute;
left: 0;
top: 30px;
white-space: nowrap;
display: none;
}
.iconfont-btn {
cursor: pointer;
}
.iconfont-style {
font-size: 18px;
color: #fff;
border-radius: 4px;
border: 0;
padding: 5px;
margin-left: 10px;
}
.iconfont-selected {
background-color: #0A9AF2;
}
.iconfont-selected:hover {
background-color: #03a9f4;
}
.iconfont-unselected {
background-color: #999;
}
.iconfont-unselected:hover {
background-color: #ababab;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">{$meta_title}</h3>
<!-- <p class="description_text">说明:此功是创建推广员时所需填写信息</p>-->
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<form id="form" action="{:U('save')}" method="post" class="form-horizontal">
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark">*</i>推广公司:</td>
<td class="r">
<?php if($record):?>
<span class="form_radio table_btn" style="color: red;">{$company.company_name}</span>
<?php else:?>
<select name="company_id" id="company-select" class="select_gallery">
<option value="">请选择推广公司</option>
<?php foreach($companys as $company):?>
<option value="<?=$company['id']?>" <?php if($company['id'] == $promote['company_id']):?>selected<?php endif;?>><?=$company['company_name']?></option>
<?php endforeach;?>
</select>
<?php endif;?>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>会长:</td>
<td class="r">
<?php if($record):?>
<span class="form_radio table_btn" style="color: red;">{$promote.account}</span>
<?php else:?>
<select name="promote_id" id="promote-select" class="select_gallery">
<option value="">请选择会长</option>
</select>
<?php endif;?>
</td>
</tr>
<tr>
<td class="l">开始时间:</td>
<td class="r">
<input type="text" name="started_at" class="time" value="<?=$record['started_at']?>" placeholder="请选择开始时间" style="width: 200px"/>
</td>
</tr>
<tr>
<td class="l">结束时间:</td>
<td class="r">
<input type="text" name="ended_at" class="time" value="<?=$record['ended_at']?>" placeholder="请选择结束时间" style="width: 200px" />
</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" name="id" id="id" value="{$record.id}" />
<div class="form-item cf">
<button class="submit_btn mlspacing" id="submit" type="submit" target-form="form-horizontal">
确认
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" >
返回
</a>
</div>
</form>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/1">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('PromoteLimitRule/records')}");
$(".select_gallery").select2();
$(function(){
$('.time').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
autoclose: true,
scrollMonth: false,
scrollTime: false,
scrollInput: false,
startView: 'month',
minView:'month',
maxView:'month',
});
showTab();
$('#company-select').on({
change: function() {
var companyId = $(this).val()
getPromotesByCompany(companyId, function(promotes) {
var html = '<option value="">请选择会长</option>'
for (var key in promotes) {
html += '<option value="' + promotes[key].id + '">' + promotes[key].account + '</option>'
}
$('#promote-select').html(html)
$('#promote-select').select2()
})
}
})
function getPromotesByCompany(companyId, callback) {
$.ajax({
url: '{:U("getPromotesByCompany")}',
type: 'get',
dataType: 'json',
data: {company_id: companyId},
success: function(result) {
if (result.status == 1) {
callback(result.data.promotes)
} else {
layer.msg(result.message)
}
}
})
}
$('#submit').click(function (e) {
var target = $('form').get(0).action;
var query = $('form').serialize();
var that = this;
$(that).addClass('disabled').attr('autocomplete','off').prop('disabled',true);
$.post(target,query).success(function(data){
if(layer) {layer.closeAll('loading');}
if (data.status==1) {
if (data.url) {
updateAlert(data.info + ' 页面即将自动跳转~');
}else{
updateAlert(data.info);
}
setTimeout(function(){
$(that).removeClass('disabled').prop('disabled',false);
if (data.url) {
location.href=data.url;
} else if( $(that).hasClass('no-refresh')) {
$('#tip').find('.tipclose').click();
} else {
location.reload();
}
}, 1500);
}else{
updateAlert(data.info,'tip_error');
setTimeout(function(){
$(that).removeClass('disabled').prop('disabled',false);
if (data.url) {
location.href=data.url;
}else{
$('#tip').find('.tipclose').click();
}
},3000);
}
});
});
});
</script>
</block>

@ -0,0 +1,238 @@
<extend name="Public/base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.textarea-style {
width: 200px;
height: 80px;
border-radius: 5px;
padding: 5px;
}
.mustmark {
color: #FF0000;
font-style: normal;
margin: 0 3px;
}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.form.js"></script>
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">推广限制</h3>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="company_select" name="company_id" class="select_gallery" style="width:200px;">
<option value="">请选择公司</option>
<?php foreach($companys as $company):?>
<option value="<?=$company['id']?>"><?=$company['company_name']?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="promote-select" name="promote_id" class="select_gallery" style="width:120px;">
<option value="">请选择会长</option>
<volist name=":get_promote_list_by_id()" id="vo">
<option value="{$vo.id}">{$vo.account}</option>
</volist>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('PromoteLimitRule/records')}">搜索</a>
<a class="sch-btn" href="{:U('PromoteLimitRule/edit')}">添加</a>
<a class="sch-btn" href="javascript:;" id="batch-delete-btn">删除</a>
</div>
<!-- <div class="input-list">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>12,),I('get.')))}">导出</a>
</div> -->
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>
<input class="check-all" type="checkbox">
</th>
<th>推广公司</th>
<th>会长账号</th>
<th>内外团</th>
<th>限制时间</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="records">
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="records" id="data">
<tr data-id="<?=$data['id']?>">
<td>
<input class="ids" type="checkbox" value="{$data['id']}" name="ids[]">
</td>
<td>{$data.company_name}</td>
<td>{$data.promote_account}</td>
<td>{$data.company_belong}</td>
<td>{$data.limit_rule}</td>
<td>
<div class="partakebtn">
<a href="<?=U('edit', ['id' => $data['id']])?>">编辑</a>
<a class="delete-btn">删除</a>
</div>
</td>
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<!-- <a class="sch-btn export-btn"
href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Query/withdraw">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js" ></script>
<script src="__STATIC__/jquery.cookie.js" charset="utf-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav("{:U('PromoteLimitRule/records')}");
$(function(){
//搜索功能
$("#search").click(function(){
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
})
$('#batch-delete-btn').on({
click: function() {
var ids = getIds();
$.ajax({
url: '{:U("batchDelete")}',
type: 'post',
dataType: 'json',
data: {ids: ids},
success: function(result) {
if (result.status == 1) {
layer.msg(result.message)
setTimeout(function() {
window.location.href = window.location.href
}, 200)
} else {
layer.msg(result.message)
}
}
})
}
})
function getIds() {
var ids = [];
$('.ids:checked').each(function() {
ids.push($(this).val());
})
return ids;
}
$('.delete-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id');
$.ajax({
url: '{:U("delete")}',
type: 'post',
dataType: 'json',
data: {id: id},
success: function(result) {
if (result.status == 1) {
layer.msg(result.message)
setTimeout(function() {
window.location.href = window.location.href
}, 200)
} else {
layer.msg(result.message)
}
}
})
}
})
});
/* $(".export-btn").on("click",function(e){
e.preventDefault();
window.location.href=$(this).attr("href")
}) */
</script>
</block>

@ -48,18 +48,18 @@
<span class="">活跃玩家</span>
<span class="">当天登录的玩家总数</span>
</li>
<li class="keywords_list">
<!-- <li class="keywords_list">
<span class="">1日留存</span>
<span class="">注册第二天的登录率</span>
</li>
</li> -->
<li class="keywords_list">
<span class="">付费玩家</span>
<span class="">当天付费的玩家数量</span>
</li>
<li class="keywords_list">
<!-- <li class="keywords_list">
<span class="">新付费玩家</span>
<span class="">当天付费玩家中第一次付费的玩家数</span>
</li>
</li> -->
<li class="keywords_list">
<span class="">付费率</span>
<span class="">付费玩家/活跃玩家</span>
@ -83,12 +83,12 @@
<div class="bindcoinsbox">
参与统计设置:
<label class="radio radio-primary">
<input type="radio" class="coins" value="0" name="hasbindcoins">
<span>排除绑币</span>
</label>
<label class="radio radio-primary">
<input type="radio" class="coins" value="1" name="hasbindcoins">
<input type="radio" class="coins" value="1" name="contain_bind_coins" checked>
<span>包含绑币</span>
</label>
<label class="radio radio-primary">
<input type="radio" class="coins" value="0" name="contain_bind_coins">
<span>排除绑币</span>
</label>
</div>
</div>
@ -103,11 +103,18 @@
<input type="text" id="time-end" name="end" class="" value="{:I('end',date('Y-m-d',time()))}" placeholder="选择结束时间" />
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery">
<select id="game_ids" name="game_ids" class="select_gallery">
<option value="">请选择游戏</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.game_name}" value="{$vo.id}">{$vo.game_name}</option>
</volist>
<?php foreach($baseGames as $baseGame):?>
<option game-id="<?= $baseGame['id'] ?>" value="<?= $baseGame['id'] ?>"><?= $baseGame['name'] ?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="device_type" name="device_type" class="select_gallery">
<option value="">请选择设备类型</option>
<option value="android" <?php if(I('device_type', '') == 'android'):?>selected<?php endif;?>>安卓</option>
<option value="ios" <?php if(I('device_type', '') == 'ios'):?>selected<?php endif;?>>IOS</option>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
@ -132,63 +139,35 @@
<!-- 表头 -->
<thead>
<tr>
<th ><a class="paixu" data-order='time'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'time'">日期▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'time'"/>日期▼<else />日期<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<if condition="$game_name neq ''">
<th>游戏名称</th>
</if>
<if condition="$promote_name neq ''">
<th>渠道名称</th>
</if>
<th ><a class="paixu" data-order='date'><if condition="$order eq 4 and $orderType eq 'date'">日期▲<elseif condition="$order eq 3 and $orderType eq 'date'"/>日期▼<else />日期<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='register_num'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'register_num'">新增玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'register_num'"/>新增玩家▼<else />新增玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='new_user'><if condition="$order eq 4 and $orderType eq 'new_user'">新增玩家▲<elseif condition="$order eq 3 and $orderType eq 'new_user'"/>新增玩家▼<else />新增玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='act_user'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'act_user'">活跃玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'act_user'"/>活跃玩家▼<else />活跃玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='login_user'><if condition="$order eq 4 and $orderType eq 'login_user'">活跃玩家▲<elseif condition="$order eq 3 and $orderType eq 'login_user'"/>活跃玩家▼<else />活跃玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='keep_num'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'keep_num'">1日留存▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'keep_num'"/>1日留存▼<else />1日留存<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='pay_amount'><if condition="$order eq 4 and $orderType eq 'pay_amount'">充值金额▲<elseif condition="$order eq 3 and $orderType eq 'pay_amount'"/>充值金额▼<else />充值金额<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='spend'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'spend'">充值▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'spend'"/>充值▼<else />充值<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='pay_user'><if condition="$order eq 4 and $orderType eq 'pay_user'">付费玩家▲<elseif condition="$order eq 3 and $orderType eq 'pay_user'"/>付费玩家▼<else />付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='spend_people'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'spend_people'">付费玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'spend_people'"/>付费玩家▼<else />付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='pay_rate'><if condition="$order eq 4 and $orderType eq 'pay_rate'">付费率▲<elseif condition="$order eq 3 and $orderType eq 'pay_rate'"/>付费率▼<else />付费率<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='new_pop'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'new_pop'">新付费玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'new_pop'"/>新付费玩家▼<else />新付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='spend_rate'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'spend_rate'">付费率▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'spend_rate'"/>付费率▼<else />付费率<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='ARPU'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'ARPU'">ARPU▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'ARPU'"/>ARPU▼<else />ARPU<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='arpu'><if condition="$order eq 4 and $orderType eq 'arpu'">ARPU▲<elseif condition="$order eq 3 and $orderType eq 'arpu'"/>ARPU▼<else />ARPU<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='ARPPU'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'ARPPU'">ARPPU▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'ARPPU'"/>ARPPU▼<else />ARPPU<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='pop_num'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'pop_num'">累计付费玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'pop_num'"/>累计付费玩家▼<else />累计付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<if condition="$game_name eq ''">
<if condition="$game_name eq ''">
<th>详情</th>
</if>
<th ><a class="paixu" data-order='arppu'><if condition="$order eq 4 and $orderType eq 'arppu'">ARPPU▲<elseif condition="$order eq 3 and $orderType eq 'arppu'"/>ARPPU▼<else />ARPPU<img src="__IMG__/up-down.png" width="13px"></if></a></th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<volist name="data" id="vo">
<volist name="records" id="vo">
<tr>
<td>{$vo.time}</td>
<if condition="$game_name neq ''">
<td>{$game_name}</td>
</if>
<if condition="$promote_name neq ''">
<td>{$promote_name}</td>
</if>
<td>{$vo.register_num}</td>
<td>{$vo.act_user}</td>
<td>{$vo.keep_num}%</td>
<td>{$vo.spend}</td>
<td>{$vo.spend_people}</td>
<td>{$vo.new_pop}</td>
<td>{$vo.spend_rate}%</td>
<td>{$vo.ARPU}</td>
<td>{$vo.ARPPU}</td>
<td>{$vo.pop_num}</td>
<if condition="$game_name eq ''">
<td><a style="cursor:pointer;width:100%;text-align:center" class="chakan" timetitle="{$vo['time']}" ptitle="{$promote_name}" href-url="{:U('stat/cha_userarpu',array('time'=>$vo['time'],'hasbindcoins'=>I('hasbindcoins'),'promote_name'=>$promote_name,'promote_id'=>$_REQUEST['promote_id']))}">查看</td>
</if>
<td>{$vo.date}</td>
<td>{$vo.new_user}</td>
<td>{$vo.login_user}</td>
<td>{$vo.pay_amount}</td>
<td>{$vo.pay_user}</td>
<td>{$vo.pay_rate}%</td>
<td>{$vo.arpu}</td>
<td>{$vo.arppu}</td>
</tr>
</volist>
</tbody>
@ -197,13 +176,14 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U('Export/userarpuExport',array(
'start'=>$_GET['start'],
'end'=>$_GET['end'],
'game_id'=>$_GET['game_id'],
'promote_id'=>$_GET['promote_id'],
'xlsname'=>'数据分析_ARPU分析',
),false)}">导出</a>
<a class="sch-btn" href="{:U('Stat/userarpu',array(
'start'=>$_GET['start'],
'end'=>$_GET['end'],
'game_ids'=>$_GET['game_ids'],
'promote_id'=>$_GET['promote_id'],
'device_type'=>$_GET['device_type'],
'export'=>1,
),false)}">导出</a>
</if>
{$_page|default=''}
</div>
@ -212,11 +192,12 @@
<block name="script">
<script>
Think.setValue('hasbindcoins',{$Think.get.hasbindcoins|default=0});
Think.setValue('contain_bind_coins',{$Think.get.contain_bind_coins|default=0});
Think.setValue('start',"{$Think.get.start|default=''}");
Think.setValue('end',"{$Think.get.end|default=''}");
Think.setValue('promote_id',{$Think.get.promote_id|default='""'});
Think.setValue('game_id',{$Think.get.game_id|default='""'});
Think.setValue('game_ids',{$Think.get.game_ids|default='""'});
Think.setValue('device_type',{$Think.get.device_type|default='""'});
Think.setValue('row',{$Think.get.row|default=10});
$(".select_gallery").select2();
</script>
@ -251,8 +232,8 @@ $(function(){
if(interval < 0 || start == ''){
layer.msg('请选择搜索时间');
return false;
}else if(interval>90){
layer.msg('请选择90日内的时间段');
}else if(interval>31){
layer.msg('请选择31日内的时间段');
return false;
}
@ -285,8 +266,8 @@ $(function(){
$(".paixu").click(function(){
var that=$(this);
$data_order=that.attr('data-order');
$order_type='{$userarpu_order}';
if($order_type==''||$order_type=='4'){
$order_type='{$order}';
if($order_type==0||$order_type=='4'){
$(".sortBy").attr('name','data_order');
val='3,'+$data_order;
$(".sortBy").attr('value',val);

@ -0,0 +1,407 @@
<extend name="Public/base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
.bindcoinsbox {height:33px;line-height:37px;}
.bindcoinsbox .radio {cursor:pointer;}
.bindcoinsbox .radio input {cursor:pointer;}
</style>
</block>
<block name="body">
<style>.button_list2 {
margin: 9px 0;
margin: 5px 0 32px;
margin-right: 15px;
}</style>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">ARPU分析</h3>
<p class="description_text">说明根据日期游戏推广员分析ARPU等相关数据信息</p>
<div class="keywords_information">
<i class="keywords_mark"><span>关键词说明</span></i>
<ul class="keywords_content">
<li class="keywords_title">关键词说明<a href="javascript:;" class="keywords_close">X</a></li>
<li class="keywords_list">
<span class="">活跃玩家</span>
<span class="">当天登录的玩家总数</span>
</li>
<li class="keywords_list">
<span class="">1日留存</span>
<span class="">注册第二天的登录率</span>
</li>
<li class="keywords_list">
<span class="">付费玩家</span>
<span class="">当天付费的玩家数量</span>
</li>
<li class="keywords_list">
<span class="">新付费玩家</span>
<span class="">当天付费玩家中第一次付费的玩家数</span>
</li>
<li class="keywords_list">
<span class="">付费率</span>
<span class="">付费玩家/活跃玩家</span>
</li>
<li class="keywords_list">
<span class="">ARPU(每用户平均付费)</span>
<span class="">当日总充值数/活跃玩家数</span>
</li>
<li class="keywords_list">
<span class="">ARPPU(付费用户的平均付费)</span>
<span class="">当日总充值/付费玩家数</span>
</li>
</ul>
</div>
</div>
<div class="cf jssearch top_nav_list">
<div class="fl button_list2">
<div class="bindcoinsbox">
参与统计设置:
<label class="radio radio-primary">
<input type="radio" class="coins" value="0" name="hasbindcoins">
<span>排除绑币</span>
</label>
<label class="radio radio-primary">
<input type="radio" class="coins" value="1" name="hasbindcoins">
<span>包含绑币</span>
</label>
</div>
</div>
<!-- 高级搜索 -->
<div class=" fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" id="time-start" name="start" class="" value="{:I('start',date('Y-m-d',strtotime('-7 day')))}" placeholder="选择开始时间" />
&nbsp;-&nbsp;
<input type="text" id="time-end" name="end" class="" value="{:I('end',date('Y-m-d',time()))}" placeholder="选择结束时间" />
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery">
<option value="">请选择游戏</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.game_name}" value="{$vo.id}">{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" >
<option value="">推广员账号</option>
<volist name=":get_promote_list(1)" id="vo">
<option promote-id="{$vo.account}" value="{$vo.id}">{$vo.account}</option>
</volist>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('stat/userarpu','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th ><a class="paixu" data-order='time'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'time'">日期▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'time'"/>日期▼<else />日期<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<if condition="$game_name neq ''">
<th>游戏名称</th>
</if>
<if condition="$promote_name neq ''">
<th>渠道名称</th>
</if>
<th ><a class="paixu" data-order='register_num'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'register_num'">新增玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'register_num'"/>新增玩家▼<else />新增玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='act_user'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'act_user'">活跃玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'act_user'"/>活跃玩家▼<else />活跃玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='keep_num'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'keep_num'">1日留存▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'keep_num'"/>1日留存▼<else />1日留存<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='spend'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'spend'">充值▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'spend'"/>充值▼<else />充值<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='spend_people'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'spend_people'">付费玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'spend_people'"/>付费玩家▼<else />付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='new_pop'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'new_pop'">新付费玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'new_pop'"/>新付费玩家▼<else />新付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='spend_rate'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'spend_rate'">付费率▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'spend_rate'"/>付费率▼<else />付费率<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='ARPU'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'ARPU'">ARPU▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'ARPU'"/>ARPU▼<else />ARPU<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='ARPPU'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'ARPPU'">ARPPU▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'ARPPU'"/>ARPPU▼<else />ARPPU<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<th ><a class="paixu" data-order='pop_num'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'pop_num'">累计付费玩家▲<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'pop_num'"/>累计付费玩家▼<else />累计付费玩家<img src="__IMG__/up-down.png" width="13px"></if></a></th>
<if condition="$game_name eq ''">
<if condition="$game_name eq ''">
<th>详情</th>
</if>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<volist name="data" id="vo">
<tr>
<td>{$vo.time}</td>
<if condition="$game_name neq ''">
<td>{$game_name}</td>
</if>
<if condition="$promote_name neq ''">
<td>{$promote_name}</td>
</if>
<td>{$vo.register_num}</td>
<td>{$vo.act_user}</td>
<td>{$vo.keep_num}%</td>
<td>{$vo.spend}</td>
<td>{$vo.spend_people}</td>
<td>{$vo.new_pop}</td>
<td>{$vo.spend_rate}%</td>
<td>{$vo.ARPU}</td>
<td>{$vo.ARPPU}</td>
<td>{$vo.pop_num}</td>
<if condition="$game_name eq ''">
<td><a style="cursor:pointer;width:100%;text-align:center" class="chakan" timetitle="{$vo['time']}" ptitle="{$promote_name}" href-url="{:U('stat/cha_userarpu',array('time'=>$vo['time'],'hasbindcoins'=>I('hasbindcoins'),'promote_name'=>$promote_name,'promote_id'=>$_REQUEST['promote_id']))}">查看</td>
</if>
</tr>
</volist>
</tbody>
</table>
</div>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/userarpuExport',array(
'start'=>$_GET['start'],
'end'=>$_GET['end'],
'game_id'=>$_GET['game_id'],
'promote_id'=>$_GET['promote_id'],
'xlsname'=>'数据分析_ARPU分析',
),false)}">导出</a>
{$_page|default=''}
</div>
</block>
<block name="script">
<script>
Think.setValue('hasbindcoins',{$Think.get.hasbindcoins|default=0});
Think.setValue('start',"{$Think.get.start|default=''}");
Think.setValue('end',"{$Think.get.end|default=''}");
Think.setValue('promote_id',{$Think.get.promote_id|default='""'});
Think.setValue('game_id',{$Think.get.game_id|default='""'});
Think.setValue('row',{$Think.get.row|default=10});
$(".select_gallery").select2();
</script>
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('stat/userarpu')}');
$(function(){
//计算天数差的函数,通用
function GetDateDiff(startDate,endDate)
{
var startTime = new Date(Date.parse(startDate.replace(/-/g, "/"))).getTime();
var endTime = new Date(Date.parse(endDate.replace(/-/g, "/"))).getTime();
var dates = Math.abs((startTime - endTime))/(1000*60*60*24);
return dates;
}
//搜索功能
$("#search").click(function(){
var start = $("#time-start").val();
start = start.substring(0,19);
var end = ($("#time-end").val() == "") ? "{:date('Y-m-d')}" : $("#time-end").val();
end = end.substring(0,19);
var interval = GetDateDiff(start,end);
if(interval < 0 || start == ''){
layer.msg('请选择搜索时间');
return false;
}else if(interval>90){
layer.msg('请选择90日内的时间段');
return false;
}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&"+$('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
var start = $("#time-start").val();
var end = $("#time-end").val();
if (start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
window.location.href = url;
});
$('input[name="hasbindcoins"]').click(function() {
$("#search").click();
});
$(".paixu").click(function(){
var that=$(this);
$data_order=that.attr('data-order');
$order_type='{$userarpu_order}';
if($order_type==''||$order_type=='4'){
$(".sortBy").attr('name','data_order');
val='3,'+$data_order;
$(".sortBy").attr('value',val);
$("#search").click();
}else if($order_type=='3'){
$(".sortBy").attr('name','data_order');
val='4,'+$data_order;
$(".sortBy").attr('value',val);
$("#search").click();
}
});
//回车自动提交
$('.jssearch').find('input').keyup(function(event){
if(event.keyCode===13){
$("#search").click();
}
});
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:1,
});
$('#time-end').datetimepicker({
format: 'yyyy-mm-dd',
language:"zh-CN",
minView:2,
autoclose:1,
pickerPosition:'bottom-right'
});
$(".chakan").click(function () {
that = $(this);
url = that.attr('href-url');
timetitle = that.attr('timetitle');
ptitle = ' ' + that.attr('ptitle') + ' ';
layer.open({
type: 2,
title: false,
closeBtn: 0, //不显示关闭按钮
shade: [0],
area: ['1px', '1px'],
offset: 'rb', //右下角弹出
time: 1, // 秒后自动关闭 这里设置成1ms 不显示过度页面
anim: 2,
content: ['', 'no'], //iframe的urlno代表不显示滚动条
end: function () { //
layer.open({
type: 2,
title: timetitle + ptitle + '游戏数据',
shadeClose: true,
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['50%', '45%'],
content: url//iframe的url
});
}
});
});
$("#game").on('click',function(event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$(this).find('#i_list_id').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function(){
navlist.addClass('hidden');
});
event.stopPropagation();
});
$('#game #i_list_id').on('keyup',function(event) {
var val = $.trim($(this).val()).toLowerCase();
$(this).closest('.drop-down').find('#i_list_idh').val(val);
});
$("#game #i_list_li").find("a").each(function(){
$(this).click(function(){
var text = $.trim($(this).text()).toLowerCase();
var val = $.trim($(this).attr('value'));
$(this).closest('.drop-down').find("#i_list_id").val(text);
$(this).closest('.drop-down').find('#i_list_idh').val(val);
})
});
$("#promote").on('click',function(event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$(this).find('#i_list_id').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function(){
navlist.addClass('hidden');
});
event.stopPropagation();
});
$('#promote #i_list_id').on('keyup',function(event) {
$(this).closest('.drop-down').find('#i_list_idh').val(-1);
});
$("#promote #i_list_li").find("a").each(function(){
$(this).click(function(){
var text = $.trim($(this).text()).toLowerCase();
$(this).closest('.drop-down').find("#i_list_id").val(text);
$(this).closest('.drop-down').find('#i_list_idh').val($(this).attr('value'));
})
});
paramnum="{:count(I('get.'))}";
if(paramnum==0){
$("#search").click();
}
})
</script>
</block>

@ -47,10 +47,17 @@
<div class="input-list search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery">
<option value="">请选择游戏</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist>
</select>
<?php foreach($baseGames as $baseGame):?>
<option game-id="<?= $baseGame['id'] ?>" value="<?= $baseGame['id'] ?>"><?= $baseGame['name'] ?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list search_label_rehab">
<select id="device_type" name="device_type" class="select_gallery">
<option value="">请选择设备类型</option>
<option value="android" <?php if(I('device_type', '') == 'android'):?>selected<?php endif;?>>安卓</option>
<option value="ios" <?php if(I('device_type', '') == 'ios'):?>selected<?php endif;?>>IOS</option>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select id="promote_id" name="promote_id" class="select_gallery" >

@ -1127,4 +1127,28 @@ class PromoteService {
return $selfGameIds;
}
}
public function checkPromoteLimitRule($promote)
{
$topPromote = $this->getTopPromote($promote);
$rule = M('promote_limit_rules', 'tab_')->where(['promote_id' => $topPromote['id']])->order('created_at desc')->limit(1)->find();
if ($rule) {
if ($rule['started_at'] === null && $rule['ended_at'] === null) {
return false;
} elseif ($rule['started_at'] === null && $rule['ended_at'] !== null) {
if (time() < strtotime($rule['ended_at'] . ' 23:59:59')) {
return false;
}
} elseif ($rule['started_at'] !== null && $rule['ended_at'] === null) {
if (time() >= strtotime($rule['started_at'] . ' 00:00:00')) {
return false;
}
} else {
if (time() >= strtotime($rule['started_at'] . ' 00:00:00') && time() < strtotime($rule['ended_at'] . ' 23:59:59')) {
return false;
}
}
}
return true;
}
}

@ -5,6 +5,7 @@ use Think\Controller;
use User\Api\MemberApi;
use Base\Facade\Request;
use Base\Service\ApplyService;
use Base\Service\PromoteService;
use Base\Service\PackageDownloadLogService;
use Base\Tool\MobileDetect;
@ -170,6 +171,16 @@ class HomeController extends Controller
$promoteId = $data['promote_id'];
}
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find();
if (!$promote) {
$this->error('该链接已失效');
}
$promoteService = new PromoteService();
if (!$promoteService->checkPromoteLimitRule($promote)) {
$this->error('链接已失效');
}
$isWechat = Request::isWechat();
$isIOS = Request::isIOS() || Request::isIPadOS();
$isAndroid = Request::isAndroid();
@ -208,8 +219,6 @@ class HomeController extends Controller
$map = ['id' => intval($gameId)];
$game = M('game', 'tab_')->field($columns)->where($map)->find();
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find();
if ($game['sdk_version'] == 1 && $isIOS) {
$map = [];
$map['relation_game_id'] = $game['relation_game_id'];

@ -14,6 +14,7 @@ use OT\DataDictionary;
use User\Api\PromoteApi;
use Home\Controller\DownController;
use Base\Tool\TaskClient;
/**
* 前台首页控制器
@ -74,6 +75,12 @@ class IndexController extends HomeController
$map['account'] = $account;
$data['last_login_time'] = time();
M("promote", "tab_")->where($map)->save($data);
$loginrecord['promote_id'] = get_pid();
$loginrecord['account'] = $_POST['account'];
$loginrecord['client_ip'] = $_SERVER['REMOTE_ADDR'];
$loginrecord['login_type'] = 1;
$loginrecord['create_time'] = time();
M("promote_login_record", "tab_")->add($loginrecord);
$this->ajaxReturn(array("status" => 1, "msg" => "登录成功", 'url' => U('Promote/index')));
} else {
$msg = "";
@ -99,6 +106,34 @@ class IndexController extends HomeController
}
}
public function doPhoneLogin() {
$mobile = $_POST['login_phone'];
$verify = $_POST['code'];
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
$promote = M('promote', 'tab_')->where([
'login_phone' => $mobile,
])->find();
if($promote) {
$loginrecord['promote_id'] = $promote['id'];
$loginrecord['account'] = $promote['account'];
$loginrecord['client_ip'] = $_SERVER['REMOTE_ADDR'];
$loginrecord['login_type'] = 2;
$loginrecord['create_time'] = time();
M("promote_login_record", "tab_")->add($loginrecord);
setcookie('login_phone', $mobile, time() + 3600 * 10000, $_SERVER["HTTP_HOST"]);
$promote1 = new PromoteApi();
$result = $promote1->login_phone($promote['account']);
if ($result) {
$this->ajaxReturn(array("status" => 1, "msg" => "登录成功", 'url' => U('Promote/index')));
}
}else {
$this->error('此电话未注册,登录失败');
}
}
/* public function register()
{
if (IS_POST) {
@ -291,4 +326,41 @@ class IndexController extends HomeController
$Promote->logout();
redirect(U('Index/index'));
}
public function phoneLogin() {
$this->display();
}
/**
* 发动手机验证码
*/
public function telsafecode($phone = '', $delay = 10, $flag = true)
{
$taskClient = new TaskClient();
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];
if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1;
} else {
$data['status'] = 0;
}
$data['msg'] = $result['message'];
echo json_encode($data);
exit;
}
/**
* 手机安全码验证
*/
public function checksafecode($phone, $code)
{
$taskClient = new TaskClient();
$result = $taskClient->checkSms($phone, $code);
$data = [];
if ($result && $result['code'] == TaskClient::SUCCESS) {
return true;
} else {
return false;
}
}
}

@ -54,6 +54,16 @@ class PackageController extends Controller
$promoteId = $data['promote_id'];
}
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find();
if (!$promote) {
$this->error('该链接已失效');
}
$promoteService = new PromoteService();
if (!$promoteService->checkPromoteLimitRule($promote)) {
$this->error('链接已失效');
}
$map = [];
$map['status'] = 1;
$map['enable_status'] = 1;
@ -65,7 +75,6 @@ class PackageController extends Controller
$this->redirect("package/downloadError", ['message' => '该链接已经停止使用']);
}
$promote = M('promote', 'tab_')->field(['id', 'parent_id', 'chain', 'level'])->where(['id' => $promoteId])->find();
$game = M('game','tab_')->field(['id', 'game_name', 'sdk_version', 'apply_auth'])->where(['id' => $apply['game_id']])->find();
if (Request::isMobile() || Request::isTablet()) {

@ -9,6 +9,7 @@
namespace Home\Controller;
use Think\Controller;
use Base\Repository\PromoteRepository;
use Base\Tool\TaskClient;
/**
* 扩展控制器
@ -18,12 +19,19 @@ class SafeController extends BaseController{
public function setSafeIndex() {
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
return $this->display();
}else {
return $this->display("verifySafePwd");
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd, level, login_phone')->find();
if(!empty($safePwd['login_phone'])) {
$this->assign('login_phone', $safePwd['login_phone']);
}
if ($safePwd['level'] != 1) {
return $this->error('非会长无法更改');
}
return $this->display();
// if(empty($safePwd['second_pwd'])) {
// return $this->display();
// }else {
// return $this->display("verifySafePwd");
// }
}
@ -77,30 +85,36 @@ class SafeController extends BaseController{
}
public function modifyPwdIndex() {
$id = get_pid();
$promote = M('promote', 'tab_')->where(['id' => $id])->find();
if(!empty($promote['login_phone'])) {
$this->assign('login_phone', $promote['login_phone']);
}
if($_POST) {
$oldpwd = $_POST['oldpwd'];
$safepwd = $_POST['safepwd'];
if(empty($oldpwd)) {
$this->error("旧密码不能为空");
if ($promote['level'] != 1) {
return $this->error('修改失败,非会长无法修改!');
}
//$oldpwd = $_POST['oldpwd'];
$safepwd = $_POST['safepwd'];
// if(empty($oldpwd)) {
// $this->error("旧密码不能为空");
// }
if(empty($safepwd)) {
$this->error("安全密码不能为空");
}
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if($safePwd['second_pwd'] == $this->think_ucenter_md5($oldpwd, UC_AUTH_KEY)){
$data['second_pwd'] = $this->think_ucenter_md5($safepwd, UC_AUTH_KEY);
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("修改成功");
}else {
$this->error("修改失败,请重新操作");
}
if (!$this->checksafecode($promote['login_phone'], $_POST['code'])) {
return $this->error('验证码错误');
}
else {
$this->error('旧密码错误,请确认');
$id = get_pid();
$data['second_pwd'] = $this->think_ucenter_md5($safepwd, UC_AUTH_KEY);
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
if($updateRs) {
$this->success("修改成功");
}else {
$this->error("修改失败,请重新操作");
}
}
$this->display();
}
@ -592,4 +606,72 @@ class SafeController extends BaseController{
$this->ajaxReturn(['code'=>0000,'mes'=>'删除成功']);
}
}
public function bindTel() {
$id = get_pid();
$promote = M('promote', 'tab_')->where(['id' => $id])->find();
if(!empty($promote['login_phone'])) {
$this->assign('login_phone', $promote['login_phone']);
}
return $this->display();
}
/**
* 发动手机验证码
*/
public function telsafecode($phone = '', $delay = 10, $flag = true)
{
$taskClient = new TaskClient();
$result = $taskClient->sendSmsCode($phone, get_client_ip());
$data = [];
if ($result['code'] == TaskClient::SUCCESS) {
$data['status'] = 1;
} else {
$data['status'] = 0;
}
$data['msg'] = $result['message'];
echo json_encode($data);
exit;
}
/**
* 手机安全码验证
*/
public function checksafecode($phone, $code)
{
$taskClient = new TaskClient();
$result = $taskClient->checkSms($phone, $code);
$data = [];
if ($result && $result['code'] == TaskClient::SUCCESS) {
return true;
} else {
return false;
}
}
public function addLoginMobile() {
if (IS_POST) {
/* 检测验证码 TODO: */
$mobile = $_POST['login_phone'];
$verify = $_POST['code'];
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
$id = get_pid();
$promote = M('promote', 'tab_')->where([
'id' => $id
])->find();
if ($promote) {
$promote['login_phone'] = $mobile;
$updateRs = M('promote', 'tab_')->where(['id' => $id])->save($promote);
if($updateRs) {
$this->success("更新登陆手机号成功");
}else {
$this->error("更新登陆手机号失败");
}
}else {
$this->error("无此推广账号信息");
}
}
}
}

@ -38,6 +38,7 @@
</div>
<div class="form-group ff clearfix">
<label class="tabbtn"><input type="checkbox" name="remm" id="remember" ><i></i><span>记住账号</span></label>
<label class="tabbtn" style="margin-left:10px"><a href="{:U('index/phoneLogin')}" style="color:rgb(8, 85, 185);text-decoration:underline;">短信登陆</a></label>
<!-- <a target="_blank" href="{:U('forget')}" class="forget_password right" ><span>忘记密码?</span></a> -->
</div>
<div >

@ -0,0 +1,264 @@
<extend name="Public/bases" />
<block name="css">
<link href="__CSS__/20170913/index.css" rel="stylesheet" >
</block>
<block name="body">
<div class="banner">
<div class="inner clearfix">
<!--<a href="http://wpa.qq.com/msgrd?v=3&uin={:C('CH_SET_SERVER_QQ')}&site=qq&menu=yes" class="qqbtn" target="_blank"><img src="__IMG__/20170913/qq.png">QQ咨询</a>-->
<div class="lrwrapper clearfix">
<div class="lrbox clearfix">
<div class="lrpane tab-pane fade active in" id="lr-login">
<h4 class="title"><span class="titletext">欢迎回来!</span></h4>
<form id="loginForm" class="form-horizontal" method="post" novalidate="novalidate">
<div class="form-group clearfix">
<div class="input-group input-format">
<span class="input-group-addon"><i class="input_icon input_icon_user" ></i></span>
<input type="text" name="login_phone" id="login_phone" class="account form-control" placeholder="手机号码" aria-describedby="basic-addon1">
</div>
<div class="input-status"></div>
</div>
<div class="form-group clearfix">
<div class="captchabox input-group input-format">
<span class="input-group-addon"><i class="input_icon input_icon_barcode"></i></span>
<input class="form-control" name="code" id="code" placeholder="短信验证码" autocomplete="off" maxlength="6">
</div>
<div class="f-wsn"><button id="sendtelCode" class="btn btn_primary" style="width:140px;" target-form="paw_info">发送验证码</button></div>
<div class="input-status"></div>
</div>
<div class="form-group ff clearfix">
<label class="tabbtn"><input type="checkbox" name="remm" id="remember" ><i></i><span>记住账号</span></label>
<label class="tabbtn" style="margin-left:10px"><a href="{:U('index/index')}" style="color:rgb(8, 85, 185);text-decoration:underline;">普通登陆</a></label>
<!-- <a target="_blank" href="{:U('forget')}" class="forget_password right" ><span>忘记密码?</span></a> -->
</div>
<div >
<input id="loginButton" type="submit" class="btn btn_primary" value="登 录">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<notempty name="gg">
<div class="news">
<div class="inner clearfix txtScroll">
<span><i class="icon icon-voice"></i></span>
<a class="next" href="javascript:;"><i class="icon icon-angle_right"></i></a>
<div class="bd">
<ul>
<volist name="gg" id="vo">
<li>
<a href="{:U('Article/detail',array('id'=>$vo['id']))}" target="_blank" title="{$vo['title']}"><i>公告</i>{:msubstr2($vo['title'],0,70)}</a>
</li>
</volist>
</ul>
</div>
</div>
</div>
</notempty>
<div class="advantage page-aside">
<!-- <div class="inner">
<h2 class="aside-title"><span>平台优势</span></h2>
<div class="aside-content clearfix">
<ul>
<li><div class="item"><i class="icon icon1"></i><span class="contitle">收入丰厚</span><p class="context"><span>CPS+CPA双模式计费方式</span><span>可持续获得收益</span></p></div></li>
<li><div class="item"><i class="icon icon2"></i><span class="contitle">统计精准</span><p class="context"><span>每一笔收入都有迹可循</span><span>精准无误,永不扣量</span></p></div></li>
<li><div class="item"><i class="icon icon3"></i><span class="contitle">海量资源</span><p class="context"><span>优质内容,海量资源开放合作</span><span>提供最佳合作方式</span></p></div></li>
<li><div class="item"><i class="icon icon4"></i><span class="contitle">结算及时</span><p class="context"><span>结算快速,结算金额准确无误</span><span>绝不拖欠分成</span></p></div></li>
</ul>
</div>
</div>-->
</div>
<!--<div class="app page-aside">
<div class="inner">
<h2 class="aside-title"><span>精品应用推荐</span></h2>
<div class="aside-content slideColumn clearfix">
<div class="bd">
<div class="ulWrap">
<ul>
<volist name="rec_data" id="rec" mod="12">
<li>
<div class="pic"><a href="javascript:;"><span class="placeholder-graphic placeholder-graphic_icon"><img src="{$rec['icon']|get_cover='path'}"></span></a></div>
<div class="title" style="width:67%;"><a style="cursor:default" href="javascript:;" title="{$rec['game_name']}">{:msubstr2($rec['game_name'],0,10)}</a></div>
</li>
<eq name="mod" value="11"></ul><ul></eq>
</volist>
</ul>
</div>
</div>
<div class="hd"><ul>
<volist name="rec_data" id="rec" mod="12">
<eq name="mod" value="11"><li></li></eq>
</volist></ul>
</div>
<if condition="count($rec_data) gt 12">
<a class="prev" href="javascript:void(0)"></a>
<a class="next" href="javascript:void(0)"></a>
</if>
</div>
</div>
</div>-->
<div class="join page-aside">
<!-- <div class="inner">
<h2 class="aside-title"><span>如何加入我们</span></h2>
<div class="aside-content clearfix">
<ul class="clearfix">
<li><div class="item"><img class="icon" src="__IMG__/20170913/step1.png"><h5 class="contitle">注册账号</h5><p class="context"><span>注册账号,通过审核,加入联盟</span></p></div><div class="angle"><i class="iconangle"></i></div></li>
<li><div class="item"><img class="icon" src="__IMG__/20170913/step2.png"><h5 class="contitle">选择游戏资源</h5><p class="context"><span>选择推广的产品,游戏信息</span></p></div><div class="angle"><i class="iconangle"></i></div></li>
<li><div class="item"><img class="icon" src="__IMG__/20170913/step3.png"><h5 class="contitle">申请渠道分包</h5><p class="context"><span>获得自有渠道的游戏资源包</span></p></div><div class="angle"><i class="iconangle"></i></div></li>
<li><div class="item"><img class="icon" src="__IMG__/20170913/step4.png"><h5 class="contitle">推广分成</h5><p class="context"><span>每笔充值,后台申请结算的分成</span></p></div></li>
</ul>
<a href="{:U('register')}" class="joinbtn" >开始加入</a>
</div>
</div>-->
</div>
<div class="gotop"><img src="/Public/Home/images/index/gotop.png"></div>
</block>
<block name="script">
<script src="__JS__/20170913/jquery.SuperSlide.2.1.1.js"></script>
<script>
highlight_subnav('{:U("Index/index")}');
var regLogin = "";
// 如果登录有错误
$(document).ready(function(){
$(".slideColumn").slide({titCell:".hd ul",mainCell:".bd .ulWrap",autoPage:true,effect:"leftLoop",autoPlay:true,vis:1});
$(".txtScroll").slide({mainCell:".bd ul",autoPage:true,effect:"leftLoop",autoPlay:true});
$('#remember').change(function() {
var that = $(this);
if (that.prop('checked')) {
that.siblings('i').addClass('on');
} else {
that.siblings('i').removeClass('on');
}
});
/**
* 新增验证方法
*/
$.validator.addMethod("numOrLetter", function(value, element) {
return this.optional(element) || /^[a-zA-Z0-9_\.]+$/.test(value);
}, '只能是字母或数字或下划线');
// 登录验证
$("#loginForm").validate({
//定义规则
rules:{
account:{
required:true,
rangelength:[6,100],
numOrLetter:true,
},
password:{
required:true,
minlength:6
},
yzm:{
required:true,
rangelength:[4,4]
}
},
//定义错误消息
messages:{
account:{
required:"请输入登录账号",
rangelength:"账号必须是6-15位字符串",
},
password:{
required:"请输入登录密码",
minlength:'密码错误,请重新输入',
},
yzm:{
required:"请输入验证码",
rangelength:"验证码必须是4位字符串"
}
},
submitHandler:function(form){
data = $('#loginForm').serialize();
$.ajax({
type:'post',
url:"{:U('doPhoneLogin')}",
data:data,
success:function(data){
if(data.status==1){
layer.msg(data.msg, {icon: 1});
window.location.href=data.url;
}else{
//if(data.code==0){}
$('img[name="changeCaptcha"]').click();
layer.msg(data.msg, {icon: 2});
}
},error:function(){
}
});
}
});
});
</script>
<script type="text/javascript">
(function(){
var ThinkPHP = window.Think = {
"ROOT" : "", //当前网站地址
"APP" : "/index.php?s=", //当前项目地址
"PUBLIC" : "/Public", //项目公共目录地址
"DEEP" : "/", //PATHINFO分割符
"MODEL" : ["3", "", "html"],
"VAR" : ["m", "c", "a"]
}
})();
</script>
<script>
$('#sendtelCode').on('click',function() {
if ($(this).hasClass('g-btntn')) {
return false;
}
var phone = $.trim($('#login_phone').val());
if (phone == '') {
alert("手机号不能为空");
return false;
}
if (phone.length !== 11 || !(/^[1][35789][0-9]{9}$/.test(phone))) {
pmsg.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
url:'{:U("telsafecode")}',
success:function(data) {
if (data.status ==1) {
r(1);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
var r = function(i, t) {
var e = $('#sendtelCode');
var t = 60;
e.attr('disabled', true).text(t+'秒');
var a = setInterval(function() {
t--;
e.text(t+'秒');
t>0 || (clearInterval(a),e.attr('disabled', false).text('重新发送'));
},1000);
};
return false;
});
</script>
</block>

@ -103,6 +103,7 @@
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>安全管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Safe/bindTel')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq bindTel or ACTION_NAME eq bindTel or ACTION_NAME eq bindTel or ACTION_NAME eq bindTel ) '>active</if> ">短信登陆设置</a>
<a href="{:U('Download/listsIndex')}" class="<if condition='CONTROLLER_NAME eq Download and (ACTION_NAME eq listsIndex or ACTION_NAME eq listsIndex or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyloginpassword or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">修改登录密码</a>
<a href="{:U('Safe/setSafeIndex')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq setSafeIndex or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">设置安全密码</a>

@ -0,0 +1,261 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<span class="title_main">手机号绑定</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<form action="{:U('Safe/addLoginMobile')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:50px;margin-left:50px">
<tr>
<td class="l"><span style="color:red">*</span>手机号码</td>
<td class="r">
<!-- <input type="text" class="input txt" name="login_phone" id="login_phone" style="width:430px" placeholder="请输入手机号码"> -->
<if condition="$login_phone neq null">
<input type="text" class="input txt" name="login_phone" id="login_phone" style="width:430px" value="{$login_phone}">
<else />
<input type="text" class="input txt" name="login_phone" id="login_phone" style="width:430px" placeholder="请输入手机号码">
</if>
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"><span style="color:red">*</span>短信验证码</td>
<td class="r"><input type="text" class="input txt" name="code" id="code" style="width:230px" placeholder="请输入短信验证码">
<span id="confirm_password_tip"></span>
<button id="sendtelCode" class="tj btn" target-form="paw_info">发送验证码</button>
</td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
// AF.users.account_edit(1429);
// AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
<script>
$('#sendtelCode').on('click',function() {
if ($(this).hasClass('g-btntn')) {
return false;
}
var phone = $.trim($('#login_phone').val());
if (phone == '') {
alert("手机号不能为空");
return false;
}
if (phone.length !== 11 || !(/^[1][35789][0-9]{9}$/.test(phone))) {
pmsg.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
url:'{:U("telsafecode")}',
success:function(data) {
if (data.status ==1) {
r(1);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
var r = function(i, t) {
var e = $('#sendtelCode');
var t = 60;
e.addClass('disabled').attr('disabled', true).text(t+'秒');
var a = setInterval(function() {
t--;
e.text(t+'秒');
t>0 || (clearInterval(a),e.removeClass('disabled').attr('disabled', false).text('重新发送'));
},1000);
};
return false;
});
</script>
</block>

@ -44,17 +44,26 @@
<span style="margin-top:50px;font-size:15px;color:#26c7db85">为了保证您的账户安全,提现和转账等操作需要使用安全密码进行确认(请不要和登陆密码一样)</span>
<form action="{:U('Safe/modifypwdindex')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:30px;margin-left:50px" >
<tr>
<!-- <tr>
<td class="l">旧密码:</td>
<td class="r"><input type="password" class="input txt" name="oldpwd" id="oldpwd" style="width:430px" placeholder="旧密码">
<span id="confirm_password_tip"></span></td>
</tr>
</tr> -->
<tr>
<td class="l">安全密码:</td>
<td class="l">安全密码:</td>
<td class="r"><input type="password" class="input txt" name="safepwd" id="confirm_password" style="width:430px" placeholder="请输入要设置的安全密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"><span style="color:red">*</span>短信验证码</td>
<input type="hidden" value="{$login_phone}" id="login_phone">
<td class="r"><input type="text" class="input txt" name="code" id="code" style="width:230px" placeholder="请输入短信验证码">
<span id="confirm_password_tip"></span>
<input id="sendtelCode" readonly onfocus="this.blur()" class="tj btn ajax-post" value="发送验证码" style="padding-left:40px;width:120px;margin-left:20px" title="" target-form="paw_info">
</td>
</tr>
<tr>
<td class="l"></td>
@ -207,5 +216,53 @@
_reset_area('','','');
});
</script>
<script>
$('#sendtelCode').on('click',function() {
if ($(this).hasClass('g-btntn')) {
return false;
}
var phone = $.trim($('#login_phone').val());
//console.log(phone);return;
if (phone == '') {
alert("手机号不能为空");
return false;
}
if (phone.length !== 11 || !(/^[1][35789][0-9]{9}$/.test(phone))) {
pmsg.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
url:'{:U("telsafecode")}',
success:function(data) {
if (data.status ==1) {
r(1);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
var r = function(i, t) {
if (i>0) {
var r = 60;
e='#sendSasfeCode';
$(e).removeClass('g-btn').addClass('g-btntn');
var a = setInterval(function() {
r--;
$(e).text(r + '秒');
0 == r && ($(e).removeClass('g-btntn').addClass('g-btn'),
$(e).text('获取验证码'),
clearInterval(a))
},1000)
}
};
});
</script>
</block>

@ -37,24 +37,37 @@
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">设置安全密码</span>
<span class="title_main">修改安全密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<form action="{:U('Safe/setSafePassword')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:50px;margin-left:50px">
<span style="margin-top:50px;font-size:15px;color:#26c7db85">为了保证您的账户安全,提现和转账等操作需要使用安全密码进行确认(请不要和登陆密码一样)</span>
<form action="{:U('Safe/modifypwdindex')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:30px;margin-left:50px" >
<!-- <tr>
<td class="l">旧密码:</td>
<td class="r"><input type="password" class="input txt" name="oldpwd" id="oldpwd" style="width:430px" placeholder="旧密码">
<span id="confirm_password_tip"></span></td>
</tr> -->
<tr>
<td class="l">新安全密码:</td>
<td class="r"><input type="password" class="input txt" name="safepwd" id="confirm_password" style="width:430px" placeholder="请输入要设置的安全密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l">新密码:</td>
<td class="r"><input type="password" class="input txt" name="password" id="password" style="width:430px" placeholder="新密码">
<span id="password_tip"></span></td>
<td class="l">手机号码</td>
<td class="r"><input type="text" id='login_phone' readonly disabled class="input txt" value="{$login_phone}">
<span id="confirm_password_tip"><a href="{:U("bindTel")}">修改号码</a></span>
</td>
</tr>
<tr>
<td class="l">确认密码:</td>
<td class="r"><input type="password" class="input txt" name="confirm_password" id="confirm_password" style="width:430px" placeholder="确认密码">
<span id="confirm_password_tip"></span></td>
<td class="l"><span style="color:red">*</span>短信验证码</td>
<td class="r"><input type="text" class="input txt" name="code" id="code" style="width:230px" placeholder="请输入短信验证码">
<button id="sendtelCode" class="tj btn" target-form="paw_info">发送验证码</button>
</td>
</tr>
<tr>
@ -208,5 +221,50 @@
_reset_area('','','');
});
</script>
<script>
$('#sendtelCode').on('click',function() {
if ($(this).hasClass('g-btntn')) {
return false;
}
var phone = $.trim($('#login_phone').val());
//console.log(phone);return;
if (phone == '') {
alert("手机号不能为空");
return false;
}
if (phone.length !== 11 || !(/^[1][35789][0-9]{9}$/.test(phone))) {
pmsg.msg("格式不正确");
return false;
}
$.ajax({
type:'post',
dataType:'json',
data:'phone='+phone,
url:'{:U("telsafecode")}',
success:function(data) {
if (data.status ==1) {
r(1);
} else {
alert(data.msg);
}
},
error:function() {
alert('服务器开小差了,请稍后再试。');
}
});
var r = function(i, t) {
var e = $('#sendtelCode');
var t = 60;
e.addClass('disabled').attr('disabled', true).text(t+'秒');
var a = setInterval(function() {
t--;
e.text(t+'秒');
t>0 || (clearInterval(a),e.removeClass('disabled').attr('disabled', false).text('重新发送'));
},1000);
};
return false;
});
</script>
</block>

@ -77,6 +77,20 @@ class PromoteApi extends Api{
return $this->model->login($username, $password);
}
public function login_phone($account)
{
$map['account'] = $account;
/* 获取用户数据 */
$user = M('promote', 'tab_')->where($map)->find();
if($user) {
$this->model->login_phone($user);
return $user['id'];
}else {
return -1;
}
}
/**
* 退出登录
*/

@ -1988,6 +1988,16 @@ CREATE TABLE `tab_company_lack_statement_info` (
INSERT INTO `tab_tool`( `name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('juhedata', '聚合数据', '{\"tpl_id\":\"215303\",\"key\":\"1aa07a33b6d6408e835e416fafcd6f22\",\"limit\":\"\",\"status\":\"1\"}', NULL, 1, 1, 1589361782);
INSERT INTO `tab_tool`( `name`, `title`, `config`, `template`, `type`, `status`, `create_time`) VALUES ('juhe_age', '聚合身份认证', '{\"appkey\":\"80427f4769c6938f12a870f51014ddbe\",\"status\":\"1\"}', NULL, 1, 1, 1464164373);
-- 推广规则限制 elf 20200615
CREATE TABLE `tab_promote_limit_rules` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`promote_id` int(11) NOT NULL COMMENT '会长ID',
`started_at` date DEFAULT NULL COMMENT '开始时间',
`ended_at` date DEFAULT NULL COMMENT '结束时间',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
ALTER TABLE `tab_forbit_ip`
ADD COLUMN `type` tinyint(2) NULL DEFAULT 0 COMMENT '类型 0美国ip白名单 1苹果第三方支付白名单' AFTER `remarks`;

Loading…
Cancel
Save