修改bug

master
elf@home 5 years ago
parent f338c3d210
commit 4c5473a27f

@ -28,8 +28,10 @@ class PromoteRepository {
$map = [];
$map['promote_id'] = ['in', $ids];
$allIds = $ids;
if ($isContainSubs) {
$map['promote_id'] = ['in', array_merge($ids, array_keys($params['basicPromotes']))];
$allIds = array_merge($ids, array_keys($params['basicPromotes']));
$map['promote_id'] = ['in', $allIds];
}
if (isset($params['game_id'])) {
$map['game_id'] = $params['game_id'];
@ -43,6 +45,12 @@ class PromoteRepository {
if (isset($params['begin_time']) && isset($params['begin_time']) && isset($params['time_column'])) {
$map[$params['time_column']] = ['between', [$params['begin_time'], $params['end_time']]];
}
if (isset($params['lock_status'])) {
$lockUserIds = M('user', 'tab_')->where(['lock_status' => 0, 'promote_id' => ['in', $allIds]])->getField('id', 'true');
if (count($lockUserIds) > 0) {
$map['user_id'] = ['not in', $lockUserIds];
}
}
return $map;
}
@ -206,10 +214,10 @@ class PromoteRepository {
}
$subQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($subMap)->buildSql();
$map['user_id'] = ['exp', ' not in (' . $subQuery . ')'];
$map['_string'] = ' user_id not in (' . $subQuery . ')';
$inQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($map)->buildSql();
$resultMap = ['user_id' => ['exp', ' in (' . $inQuery . ')']];
$resultMap = ['_string' => 'user_id in (' . $inQuery . ')'];
$items = M('user_play_info', 'tab_')->field(['count(*) count', 'promote_id'])->where($resultMap)->group('promote_id')->select();
$records = [];

@ -55,7 +55,6 @@ class SpendRepository {
$conditions['pay_time'] = ['between', [$beginTime, $endTime]];
$conditions['game_id'] = $gameId > 0 ? $gameId : ['gt', 0];
$conditions['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
return $conditions;
}
@ -121,16 +120,16 @@ class SpendRepository {
public function getNewPayUserCountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$conditions = $this->getDayGroupConditions($params);
$oldMap = $map;
$oldConditions = $conditions;
$records = [];
foreach ($dayList as $day) {
$time = strtotime($day);
$oldMap['pay_time'] = ['lt', $time];
$map['pay_time'] = ['between', [$time, ($time + 24 * 3600 -1)]];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldMap)->group('user_id')->buildSql();
$map['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$result = M('spend', 'tab_')->field('count(distinct user_id) count')->where($map)->find();
$oldConditions['pay_time'] = ['lt', $time];
$conditions['pay_time'] = ['between', [$time, ($time + 24 * 3600 -1)]];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldConditions)->group('user_id')->buildSql();
$conditions['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$result = M('spend', 'tab_')->field('count(distinct user_id) count')->where($conditions)->find();
$records[$day] = $result['count'];
}
return $records;
@ -146,7 +145,7 @@ class SpendRepository {
$oldConditions = $conditions;
$oldConditions['pay_time'] = ['lt', $beginTime];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldConditions)->group('user_id')->buildSql();
$map['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$conditions['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$items = M('spend', 'tab_')->field('count(distinct user_id) count, game_id')->where($conditions)->group('game_id')->find();
return $this->assembleRecords($items, $gameIds, 'amount', 'game_id');
}
@ -157,17 +156,17 @@ class SpendRepository {
public function getNewPayAmountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$conditions = $this->getDayGroupConditions($params);
$oldMap = $map;
$oldConditions = $conditions;
$records = [];
foreach ($dayList as $day) {
$time = strtotime($day);
$oldMap['pay_time'] = ['lt', $time];
$map['pay_time'] = ['between', [$time, ($time + 24 * 3600 -1)]];
$oldConditions['pay_time'] = ['lt', $time];
$conditions['pay_time'] = ['between', [$time, ($time + 24 * 3600 -1)]];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldMap)->group('user_id')->buildSql();
$map['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$result = M('spend', 'tab_')->field('sum(pay_amount) amount')->where($map)->find();
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldConditions)->group('user_id')->buildSql();
$conditions['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$result = M('spend', 'tab_')->field('sum(pay_amount) amount')->where($conditions)->find();
$records[$day] = floatval($result['amount']);
}
return $records;
@ -183,7 +182,7 @@ class SpendRepository {
$oldConditions = $conditions;
$oldConditions['pay_time'] = ['lt', $beginTime];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldConditions)->group('user_id')->buildSql();
$map['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$conditions['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$items = M('spend', 'tab_')->field('sum(pay_amount) amount, game_id')->where($conditions)->group('game_id')->find();
return $this->assembleRecords($items, $gameIds, 'amount', 'game_id');
}
@ -199,8 +198,8 @@ class SpendRepository {
$records = [];
foreach ($dayList as $day) {
$time = strtotime($day);
$map['pay_time'] = ['elt', $time];
$result = M('spend', 'tab_')->field('count(DISTINCT user_id) as count')->where($map)->find();
$conditions['pay_time'] = ['elt', $time];
$result = M('spend', 'tab_')->field('count(DISTINCT user_id) as count')->where($conditions)->find();
$records[$day] = $result['count'];
}
return $records;

@ -98,7 +98,7 @@ class UserRepository {
$conditions = $this->getDayGroupConditions($params);
$items = M('user', 'tab_')->field('count(*) count, FROM_UNIXTIME(register_time, "%Y-%m-%d") as day')
->where($map)
->where($conditions)
->group('day')
->select();
return $this->assembleRecords($items, $dayList, 'count');

@ -173,6 +173,7 @@ class BaseController extends HomeController{
'row' => $pageSize
];
$params = array_merge($params, $_POST);
$params = array_merge($params, $_GET);
$pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count];

@ -673,12 +673,21 @@ class QueryController extends BaseController
$sdkVersion = I('sdk_version', 0);
$gameId = I('game_id', 0);
$serverId = I('server_id', 0);
$promoteId = I('promote_id', 0);
$subPromoteId = I('sub_promote_id', 0);
$promote = $this->getLoginPromote();
$searchPromote = $promote;
if ($promoteId > 0) {
$searchPromote = M('promote', 'tab_')->where(['id' => $promoteId])->find();
}
if ($subPromoteId > 0) {
$searchPromote = M('promote', 'tab_')->where(['id' => $subPromoteId])->find();
}
$map = [
'_logic' => 'or',
'id' => $promote['id'],
'parent_id' => $promote['id'],
'grand_id' => $promote['id'],
'id' => $searchPromote['id'],
'parent_id' => $searchPromote['id'],
'grand_id' => $searchPromote['id'],
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
@ -747,6 +756,7 @@ class QueryController extends BaseController
$this->assign('records', $records);
$this->assign('searchGameName', $searchGameName);
$this->assign('searchServerName', $searchServerName);
$this->assign('searchPromote', $searchPromote);
$this->display();
}
@ -1900,6 +1910,8 @@ class QueryController extends BaseController
$userAccount = I('user_account', '');
$promoteId = I('promote_id', 0);
$sdkVersion = I('sdk_version', 0);
$costBegin = I('cost_begin', 0);
$costEnd = I('cost_end', 0);
$headmanPromoteId = I('headman_promote_id', 0);
$promote = $this->getLoginPromote();
@ -1953,6 +1965,21 @@ class QueryController extends BaseController
$spendMap['promote_id'] = $promoteId;
}
}
if ($costBegin > 0 || $costEnd > 0) {
$having = '';
if ($costBegin > 0 && $costEnd > 0) {
$having = 'sum(cost) between ' . $costBegin . ' and ' . $costEnd;
} elseif ($costBegin > 0 && $costEnd == 0) {
$having = 'sum(cost) > ' . $costBegin;
} elseif ($costBegin == 0 && $costEnd > 0) {
$having = 'sum(cost) < ' . $costEnd;
}
$subMap = $map;
$subMap['pay_status'] = 1;
$subMap['pay_game_status'] = 1;
$subQuery = M('spend', 'tab_')->field('game_player_id')->where($subMap)->group('game_player_id')->having($having)->buildSql();
$map['_string'] = 'role_id in ('. $subQuery . ')';
}
$query = M('user_play_info', 'tab_')->where($map);
list($roles, $pagination, $count) = $this->paginate($query);
$roleIds = array_column($roles, 'role_id');
@ -1971,6 +1998,9 @@ class QueryController extends BaseController
}
$map['pay_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]];
if (isset($map['_string'])) {
unset($map['_string']);
}
$todayRecharges = M('spend', 'tab_')->field('sum(cost) cost, game_player_id')->where($map)->group('game_player_id')->select();
$todayRecords = [];
foreach ($todayRecharges as $recharge) {
@ -2049,7 +2079,7 @@ class QueryController extends BaseController
public function getSubPromotes()
{
$promoteId = I('promote_id', 0);
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['parent_id' => $promoteId])->select();
$promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promoteId])->select();
$this->ajaxReturn([
'status' => 1,
'msg' => '成功',
@ -2108,14 +2138,18 @@ class QueryController extends BaseController
$serverId = I('server_id', 0);
$parentId = I('parent_id', 0);
$promoteId = I('promote_id', 0);
$status = I('status', 0);
$loginPromote = $this->getLoginPromote();
$promote = null;
$searchPromoteType = 0;
if ($parentId > 0) {
$promote = M('promote', 'tab_')->where(['id' => $parentId])->find();
$searchPromoteType = 2;
} else {
$promote = $loginPromote;
$searchPromoteType = 1;
}
$games = $this->getGamesByPromote($promote);
@ -2153,6 +2187,9 @@ class QueryController extends BaseController
if ($sdkVersion > 0) {
$params['sdk_version'] = $sdkVersion;
}
if ($status > 0) {
$params['lock_status'] = $status;
}
list($beginTime, $endTime) = $this->getBetweenTime($time);
$params['begin_time'] = $beginTime;
$params['end_time'] = $endTime;
@ -2160,17 +2197,48 @@ class QueryController extends BaseController
$promoteRepository = new PromoteRepository();
$createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params);
$createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params);
$newCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds($ids, $params);
$newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
$records = [];
if (I('p', 1) == 1) {
$selfParams = $params;
$selfParams['isContainSubs'] = false;
$selfCreateRoleCountList = $promoteRepository->getCreateRoleCountByIds([$promote['id']], $selfParams);
$selfCreateRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds([$promote['id']], $selfParams);
$selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$promote['id']], $selfParams);
$selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$promote['id']], $selfParams);
$selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$promote['id']], $selfParams);
$selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$promote['id']], $selfParams);
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$promote['id']], $selfParams);
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$promote['id']], $selfParams);
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$promote['id']], $selfParams);
$records[] = [
'id' => $promote['id'],
'account' => $promote['account'],
'real_name' => $promote['real_name'],
'create_role_count' => $selfCreateRoleCountList[$promote['id']],
'create_role_user_count' => $selfCreateRoleUserCountList[$promote['id']],
'new_create_role_user_count' => $selfNewCreateRoleUserCountList[$promote['id']],
'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$promote['id']],
'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$promote['id']],
'login_user_count' => $selfLoginUserCountList[$promote['id']],
'recharge_count' => $selfRechargeCountList[$promote['id']],
'recharge_user_count' => $selfRechargeUserCountList[$promote['id']],
'recharge_amount' => $selfRechargeAmountList[$promote['id']]['ban_coin'] + $rechargeAmountList[$promote['id']]['coin'] + $rechargeAmountList[$promote['id']]['cash'],
'recharge_by_ban_coin' => $selfRechargeAmountList[$promote['id']]['ban_coin'],
'recharge_by_coin' => $selfRechargeAmountList[$promote['id']]['coin'],
'recharge_by_cash' => $selfRechargeAmountList[$promote['id']]['cash'],
'search_promote_type' => $searchPromoteType,
];
}
foreach ($promotes as $promote) {
$id = $promote['id'];
$records[] = [
@ -2189,6 +2257,7 @@ class QueryController extends BaseController
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
'search_promote_type' => 0,
];
}

@ -57,7 +57,7 @@
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择组长</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
@ -73,12 +73,17 @@
</div>
</if>
<div class="form-group normal_space fr">
<label>起止时间:</label>
<!-- <label>起止时间:</label> -->
<input type="text" class="txt range-date" name="time" placeholder="起止时间" value="{:I('time', date('Y-m-d'))}" >
</div>
<div class="form-group">
<input type="submit" class="submit normal_space" value="查询">
</div>
<?php if (I('parent_id', 0) > 0):?>
<div class="form-group">
<input type="buttom" class="submit normal_space" onclick="window.history.back();" value="返回上级" style="text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">
</div>
<?php endif;?>
</form>
</div>
<div class="trunk-list list_normal">
@ -106,7 +111,10 @@
<else />
<volist name="records" id="record" mod="2">
<tr data-id="{$vo.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$record.account}({$record.real_name})</td>
<td>{$record.account}({$record.real_name})
<?php if($record['search_promote_type'] == 1):?><span style="color: #06C;">[自己]</span><?php endif;?>
<?php if($record['search_promote_type'] == 2):?><span style="color: #06C;">[组长推广]</span><?php endif;?>
</td>
<td>{$record.create_role_count}</td>
<td>{$record.create_role_user_count}</td>
<td>{$record.new_create_role_user_count}</td>
@ -119,7 +127,7 @@
<td>{$record.recharge_by_cash}</td>
<td>{$record.recharge_by_coin}</td>
<td>{$record.recharge_by_ban_coin}</td>
<?php if($level == 1):?>
<?php if($record['search_promote_type'] == 0 && $level == 1):?>
<td><a href="{:U('Query/achievement', ['parent_id' => $record['id']])}">查看下级</a></td>
<?php endif;?>
</tr>

@ -121,37 +121,20 @@
<option value="0">请选择区服</option>
</select>
</div>
<div class="form-group normal_space">
<select name="sdk_version" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择设备类型</option>
<option value="1" <if condition="I('sdk_version') === '1'">selected</if>>Andriod</option>
<option value="2" <if condition="I('sdk_version') === '2'">selected</if>>IOS</option>
</select>
</div>
<div class="form-group normal_space">
<select name="status" class="reselect select_gallery" style="width: 220px;" >
<option value="0">帐号状态</option>
<option value="1" <if condition="I('status') === '1'">selected</if>>正常</option>
<option value="2" <if condition="I('status') === '2'">selected</if>>冻结</option>
</select>
</div>
<if condition="$parent_id eq 0">
<div class="form-group normal_space">
<select id="group-select" name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择组长</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
</if>
<if condition="$grand_id eq 0">
<div class="form-group normal_space">
<select id="promote-select" name="promote_id" class="reselect select_gallery" style="width: 220px;" data-promote="{:I('promote_id', 0)}">
<select id="promote-select" name="sub_promote_id" class="reselect select_gallery" style="width: 220px;" data-promote="{:I('sub_promote_id', 0)}">
<option value="0">请选择推广员</option>
<volist name="subPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
</volist>
</select>
</div>
</if>
@ -173,12 +156,12 @@
<table class="table normal_table" id="datatable" style="<notempty name='list_data'>display:none;</notempty>"><thead>
<tr class="odd">
<th>日期</th>
<if condition='empty(I("game_id")) != true'>
<if condition="I('game_id', 0) gt 0">
<th>游戏名称</th>
<else/>
<th>付费游戏数</th>
<th>付费游戏数</th>
</if>
<if condition='empty(I("promote_id")) != true'>
<if condition="I('promote_id', 0) gt 0 or I('sub_promote_id', 0) gt 0">
<th>所属渠道</th>
</if>
<th>活跃用户</th>
@ -192,12 +175,18 @@
<!-- <th>1日留存</th> -->
<th>ARPU</th>
<th>ARPPU</th>
<if condition='empty(I("game_id")) == true'>
<if condition="I('game_id', 0) eq 0">
<th>详情</th>
</if>
</if>
</tr></thead><tbody>
<?php
$colspan = 12;
if (I('promote_id', 0) > 0 || I('sub_promote_id', 0) > 0) {
$colspan += 1;
}
?>
<empty name="records">
<tr><td colspan="12" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<tr><td colspan="{$colspan}" style="text-align: center;height: 45vh;"><img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p></td></tr>
<else />
<volist name="records" id="vo" mod="2">
<tr name="rows" class="<eq name='mod' value='1'>odd</eq>">
@ -207,8 +196,8 @@
<else/>
<td>{$vo.payGameCount}</th>
</if>
<if condition='empty(I("promote_id")) != true'>
<th>{:I("promote_account")}</th>
<if condition="I('promote_id', 0) gt 0 or I('sub_promote_id', 0) gt 0">
<th>{$searchPromote.account}</th>
</if>
<td>{$vo.loginCount}</td>
<td>{$vo.registerCount}</td>
@ -250,6 +239,7 @@
</script>
</eq>
<script>
$('.select_gallery').select2()
var defaultDate = $('.range-date').val()
defaultDate = defaultDate == '' ? [] : defaultDate.split(' 至 ')
$('.range-date').flatpickr({
@ -311,9 +301,10 @@ var gameId = $('#game-select').val();
if (defaultPromoteId > 0 && promote.id==defaultPromoteId) {
selected = 'selected'
}
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '</option>'
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '(' + promote.real_name + ')' + '</option>'
}
$('#promote-select').html(options)
console.log(defaultPromoteId)
$("#promote-select").val(defaultPromoteId).trigger("change")
}
})
@ -355,93 +346,5 @@ var gameId = $('#game-select').val();
}
</script>
<script type="text/javascript">
setValue('promote_id',{$Think.request.promote_id|default=0});
setValue('game_id','{$Think.request.game_id|default=0}');
function pagechange(that){
tablePage('datatable', 'datacontent', 'pagenation', [1, 2, 4, 5, 6, 10], false,that.value);
var export_data = $('#export_data');
var url = export_data.attr('href');
url = url.replace('.html','').replace(/(&|\/)row(=|\/)\d*/gi,'').replace(/\/p\/\d*/gi,'');
export_data.attr('href',url+'/row/'+that.value);
}
function pagenation_click() {
$('#pagenation a').click(function() {
var that = $(this),p = that.text();console.log(p);
var export_data = $('#export_data');
var url = export_data.attr('href');
url = url.replace('.html','').replace(/(&|\/)row(=|\/)\d*/gi,'').replace(/\/p\/\d*/gi,'');
export_data.attr('href',url+'/p/'+p+'/row/'+that.value);
return false;
});
}
$().ready(function(){
$("#pagehtml a").on("click",function(event){
event.preventDefault();//使a自带的方法失效即无法调整到href中的URL(http://www.baidu.com)
var geturl = $(this).attr('href');
$('#data_form').attr('action',geturl);
$('#data_form').submit();
});
pagenation_click();
$(".submit").click(function(){
var sdate =$('#sdate').val();
var edate =$('#edate').val();
if(Date.parse(sdate) > Date.parse(edate)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
})
$(".select_gallery").select2();
tablePage('datatable', 'datacontent', 'pagenation', [1, 2, 4, 5, 6, 10], false);
$('.keywords_information .keywords_mark').click(function() {
var that = $(this).siblings().addClass('active');
console.log(that);
$(document).click(function(event) {
var e = event || window.event;
var target= $(e.target);
if (!target.hasClass('keywords_information') && target.closest('.keywords_information').length<1) {
that.removeClass('active');
}
});
that.find('.keywords_close').click(function() {
that.removeClass('active');
return false;
});
return false;
});
$("#game_id").change(function(){
var game_name = $('#game_id option:selected').text();
$("#game_name").val(game_name);
});
$("#promote_id").change(function(){
var account = $('#promote_id option:selected').text();
$("#promote_account").val(account);
})
});
</script>
</block>

@ -49,7 +49,7 @@
<select id="group-select" name="headman_promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择组长</option>
<volist name="groupPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('headman_promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('headman_promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
@ -59,7 +59,7 @@
<select id="promote-select" name="promote_id" class="reselect select_gallery" style="width: 220px;" data-promote="{:I('promote_id', 0)}">
<option value="0">请选择推广员</option>
<volist name="promotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
@ -197,7 +197,7 @@ $(function(){
if (defaultPromoteId > 0 && promote.id==defaultPromoteId) {
selected = 'selected'
}
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '</option>'
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '(' + promote.real_name + ')' + '</option>'
}
$('#promote-select').html(options)
$("#promote-select").val(defaultPromoteId).trigger("change")

@ -55,7 +55,7 @@
<select id="group-select" name="headman_promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择组长</option>
<volist name="groupPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('headman_promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('headman_promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
@ -65,7 +65,7 @@
<select id="promote-select" name="promote_id" class="reselect select_gallery" style="width: 220px;" data-promote="{:I('promote_id', 0)}">
<option value="0">请选择推广员</option>
<volist name="promotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}</option>
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
</volist>
</select>
</div>
@ -201,7 +201,7 @@ $(function() {
if (defaultPromoteId > 0 && promote.id==defaultPromoteId) {
selected = 'selected'
}
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '</option>'
options += '<option value="' + promote.id + '"' + selected + '>' + promote.account + '(' + promote.real_name + ')' + '</option>'
}
$('#promote-select').html(options)
$("#promote-select").val(defaultPromoteId).trigger("change")

@ -104,10 +104,6 @@ class ExchangeController extends BaseController{
file_put_contents("./Application/Sdk/OrderNo/".$request['user_id']."-".$request['game_id'].".txt",think_encrypt(json_encode($request)));
echo base64_encode(json_encode(array('status'=>200,'out_trade_no'=>$out_trade_no,'img'=>'http://' . $_SERVER ['HTTP_HOST'].'/sdk.php?s=/Spend/pay_way&user_id='.$request['user_id'].'&game_id='.$request['game_id'].'&type=1')));exit;
<<<<<<< HEAD
=======
>>>>>>> 02043044b5ad23725e95e03440fc41595e79047f
}elseif(!get_game_appstatus2($request['game_id'])&&$request['is_create_ordernumer']==1){ /* 苹果支付 */

Loading…
Cancel
Save