Merge branch 'release' of wmtx/platform into master

功能上线
master
廖金灵 5 years ago committed by Gogs
commit 3e5ea30332

@ -17,6 +17,7 @@ use BaiduBce\Services\Bos\CannedAcl;
use BaiduBce\Services\Bos\BosOptions;
use BaiduBce\Auth\SignOptions;
use BaiduBce\Log\LogFactory;
use Base\Service\GameService;
/**
* 后台首页控制器
@ -170,6 +171,15 @@ class GameController extends ThinkController
$this->error('游戏标示不能为空!');
exit;
}
$downloadWays = $_POST['download_ways'] ?? [];
if (in_array(GameService::DOWNLOAD_BETA, $downloadWays)) {
if (empty($_POST['beta_url'])) {
return $this->error("请在Beta按钮开启的情况填写Beta链接");
}
if (!preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
return $this->error("请填写正确的Beta链接");
}
}
$_POST['relation_game_name'] = $_POST['game_name'];
if ($_POST['sdk_version'] == 1) {
unset($_POST['ios_game_address']);
@ -203,6 +213,10 @@ class GameController extends ThinkController
//$_POST['material_url'] = $_POST['file_url'].$_POST['file_name'];
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['short'] = $short;
$gameService = new GameService();
$_POST['download_ways'] = $gameService->getDownLoadWaysValue($downloadWays);
$game = D(self::model_name);//M('$this->$model_name','tab_');
$res = $game->update();
if (!$res) {
@ -290,7 +304,7 @@ class GameController extends ThinkController
public function edit($id = null)
{
if (IS_POST) {
if ($_POST['game_score'] <0 || $_POST['game_score'] > 5) {
if ($_POST['game_score'] < 0 || $_POST['game_score'] > 5) {
$this->error('游戏评分只能为0-5之间的数字');
exit;
}
@ -299,12 +313,15 @@ class GameController extends ThinkController
exit;
}
if ($_POST['beta_status'] == 1 && empty($_POST['beta_url'])) {
$downloadWays = $_POST['download_ways'] ?? [];
if (in_array(GameService::DOWNLOAD_BETA, $downloadWays)) {
if (empty($_POST['beta_url'])) {
return $this->error("请在Beta按钮开启的情况填写Beta链接");
}
if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
if (!preg_match("/^((https|http|itms-beta)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
return $this->error("请填写正确的Beta链接");
}
}
/*if($_POST['apply_status']==0&&$_POST['game_status']==1){
$this->error('游戏未审核不允许显示');//游戏添加完成
}*/
@ -321,7 +338,10 @@ class GameController extends ThinkController
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['detail_content'] = $content;
$_POST['pay_config'] = json_encode($_POST['pay_config']);
$gameService = new GameService();
$_POST['download_ways'] = $gameService->getDownLoadWaysValue($downloadWays);
$res = $game->update();
$id = $res["id"];
$sibling = D("Game")->find($id);
$map['relation_game_id'] = $sibling['relation_game_id'];
@ -356,9 +376,6 @@ class GameController extends ThinkController
$phone['back_map'] = $sibling['back_map'];
$phone['flooring_page_video'] = $sibling['flooring_page_video'];
$phone['flooring_page_video_cover'] = $sibling['flooring_page_video_cover'];
$phone['supersign_status'] = $sibling['supersign_status'];
$phone['beta_url'] = $_POST['beta_url'];
$phone['beta_status'] = $_POST['beta_status'];
M('Game', 'tab_')->data($phone)->where(array('id' => $another['id']))->save();
//同时修改代充游戏折扣
$set_fidel['status'] = 1;

@ -1212,6 +1212,10 @@ class PromoteController extends ThinkController
$map['p.account'] = array('like','%'.I('account').'%');
}
if (!is_null(I('can_view_recharge', null))) {
$map['pb.can_view_recharge'] = I('can_view_recharge');
}
$this->m_title = '推广公会归属管理';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/belong','status'=>1])->find());
if (isset($_REQUEST['row'])) {
@ -1242,7 +1246,7 @@ class PromoteController extends ThinkController
$this->display();
}
public function belong_add($promote_id=null, $company_belong = null, $company_relation = null, $remark = null)
public function belong_add($promote_id=null, $company_belong = null, $company_relation = null, $remark = null, $can_view_recharge = null)
{
if (IS_POST) {
if (empty($promote_id)) {
@ -1252,6 +1256,7 @@ class PromoteController extends ThinkController
'promote_id' => $promote_id,
'company_belong' => $company_belong,
'company_relation' => $company_relation,
'can_view_recharge' => $can_view_recharge,
'verify_status' => 0,
'remark' => $remark,
'applicant_id' => getAdmin(),
@ -1278,7 +1283,7 @@ class PromoteController extends ThinkController
}
}
public function belong_edit($promote_id=null, $company_belong = null, $company_relation = null, $remark = null)
public function belong_edit($promote_id=null, $company_belong = null, $company_relation = null, $remark = null, $can_view_recharge = null)
{
if (IS_POST) {
if (empty($promote_id)) {
@ -1288,6 +1293,7 @@ class PromoteController extends ThinkController
'promote_id' => $promote_id,
'company_belong' => $company_belong,
'company_relation' => $company_relation,
'can_view_recharge' => $can_view_recharge,
'verify_status' => 0,
'remark' => $remark,
'applicant_id' => getAdmin(),
@ -1327,7 +1333,8 @@ class PromoteController extends ThinkController
foreach ($promote_belongs as $promote_belong) {
$update = [
'company_belong' => $promote_belong['company_belong'],
'company_relation' => $promote_belong['company_relation']
'company_relation' => $promote_belong['company_relation'],
'can_view_recharge' => $promote_belong['can_view_recharge'],
];
$res = M("promote", "tab_")
->where("chain like '%/{$promote_belong['promote_id']}/%' or id={$promote_belong['promote_id']} ")

@ -419,6 +419,29 @@
<input type="text" class="txt " name="supersign_url" value="" placeholder="请输入超级签URL" >
</td>
</tr>
<tr class="ios-display" style="display: none;">
<td class="l" >Beta版本链接</td>
<td class="r" colspan="3">
<input type="text" class="txt " name="beta_url" value="" placeholder="请输入Bata版本下载链接">
</td>
</tr>
<tr class="ios-display" style="display: none;">
<td class="l">下载方式</td>
<td class="r" >
<span class="form_radio table_btn">
<label>
<input type="checkbox" class="inp_radio" value="4" name="download_ways[]"> 至尊下载
</label>
<label>
<input type="checkbox" class="inp_radio" value="2" name="download_ways[]"> beta版下载
</label>
<label>
<input type="checkbox" class="inp_radio" value="1" name="download_ways[]"> 普通下载
</label>
</span>
</td>
</tr>
</tbody>
</table>
</div>
@ -1284,9 +1307,11 @@
$("input[name='appstatus'][value=1]").prop("disabled",true);
$("input[name='appstatus'][value=0]").prop("disabled",true);
$("input[name='appstatus'][value=0]").prop("checked",true);
$('.ios-display').hide();
}else{
$("input[name='appstatus'][value=1]").removeAttr("disabled");
$("input[name='appstatus'][value=0]").removeAttr("disabled");
$('.ios-display').show();
}
})

@ -446,28 +446,6 @@
</if>
</tr>
<tr>
<td class="l" >Beta版本链接</td>
<td class="r" colspan="3">
<input type="text" class="txt " name="beta_url" value="{$data['beta_url']}" placeholder="请输入Bata版本下载链接">
</td>
</tr>
<tr>
<td class="l">Beta版本是否开启</td>
<td class="r" >
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="beta_status" <?php if ($data['beta_status'] == 0):?>checked='checked'<?php endif;?> > 关闭
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="beta_status" <?php if ($data['beta_status'] == 1):?>checked='checked'<?php endif;?> > 开启
</label>
</span>
</td>
</tr>
<notempty name="data.accredit_img">
<tr class="picbox">
<td class="l noticeinfo">知识产权</td>
@ -569,6 +547,7 @@
<td class="r"><input type="text" class="txt2" id="game_address_size" value="{$data['game_address_size']}" name="game_address_size" placeholder="请输入第三方原包大小"> </td>
</tr>
<?php if($data['sdk_version'] == 2):?>
<tr>
<td class="l">超级签Token</td>
<td class="r" >
@ -581,32 +560,29 @@
<input type="text" class="txt " name="supersign_url" value="{$data['supersign_url']}" placeholder="请输入超级签URL" >
</td>
</tr>
<tr>
<td class="l">超级签状态:</td>
<if condition="$data['supersign_status'] eq 1">
<td class="l" >Beta版本链接</td>
<td class="r" colspan="3">
<input type="text" class="txt " name="beta_url" value="{$data['beta_url']}" placeholder="请输入Bata版本下载链接">
</td>
</tr>
<tr>
<td class="l">下载方式</td>
<td class="r" >
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="supersign_status" > 关闭
<input type="checkbox" class="inp_radio" value="4" name="download_ways[]" <?php if(($data['download_ways'] & 4) == 4):?>checked<?php endif;?>> 至尊下载
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="supersign_status" checked="checked"> 开启
</label></span>
</td>
<else/>
<td class="r" >
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="0" name="supersign_status" checked="checked"> 关闭
<input type="checkbox" class="inp_radio" value="2" name="download_ways[]" <?php if(($data['download_ways'] & 2) == 2):?>checked<?php endif;?>> beta版下载
</label>
<label>
<input type="radio" class="inp_radio" value="1" name="supersign_status" > 开启
</label></span>
<input type="checkbox" class="inp_radio" value="1" name="download_ways[]" <?php if(($data['download_ways'] & 1) == 1):?>checked<?php endif;?>> 普通下载
</label>
</span>
</td>
</if>
</tr>
<?php endif;?>
</tbody>
</table>
</div>

@ -73,7 +73,13 @@
<option value="2">审核未通过</option>
</select>
</div>
<div class="input-list input-list-channelstatus">
<select name="can_view_recharge">
<option value="">充值信息权限</option>
<option value="0">禁止</option>
<option value="1">开放</option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<input type="hidden" name="type" value="{$_GET['type']}">
<div class="input-list">
@ -100,6 +106,7 @@
<th>身份状态</th>
<th>内外团</th>
<th>归属状态</th>
<th>充值信息权限</th>
<th>申请时间</th>
<th>备注</th>
<th>审核</th>
@ -181,6 +188,14 @@
<span>只维护</span>
<?php }?>
</td>
<td>
<?php if($data['can_view_recharge'] == 0) {?>
<span>禁止</span>
<?php }?>
<?php if(intval($data['can_view_recharge']) == 1) {?>
<span>开放</span>
<?php }?>
</td>
<td>{:set_show_time($data['applicant_time'])}</td>
<td>{$data['remark']}</td>
<td>

@ -89,6 +89,22 @@
<!-- <span class="notice-text"></span>-->
</td>
</tr>
<tr id="can_view_recharge">
<td class="l">充值信息查看权限:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="0" name="can_view_recharge" checked="checked"> 禁止
</label >
<label >
<input type="radio" value="1" name="can_view_recharge" > 开放
</label>
</span>
<!-- <span class="notice-text"></span>-->
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td> <textarea name="remark" class="" placeholder="备注" ></textarea></td>

@ -100,6 +100,26 @@
</td>
</tr>
<tr id="can_view_recharge">
<td class="l">充值信息查看权限:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="0" name="can_view_recharge" <?php if($data['can_view_recharge'] ==0):?>
checked="checked"
<?php endif?>
> 禁止
</label >
<label >
<input type="radio" value="1" name="can_view_recharge" <?php if($data['can_view_recharge'] ==1):?>
checked="checked"
<?php endif?>> 开放
</label>
</span>
<!-- <span class="notice-text"></span>-->
</td>
</tr>
<tr>
<td class="l">备注:</td>
<td> <textarea name="remark" class="" placeholder="备注" >{$data['remark']}</textarea></td>

@ -0,0 +1,19 @@
<?php
namespace Base\Service;
use Base\Facade\Request;
class GameService {
const DOWNLOAD_SUPER = 4;
const DOWNLOAD_BETA = 2;
const DOWNLOAD_NORMAL = 1;
public function getDownLoadWaysValue(array $downloadWays)
{
$value = 0;
foreach ($downloadWays as $downloadWay) {
$value |= $downloadWay;
}
return $value;
}
}

@ -1622,15 +1622,17 @@ class ApplyController extends BaseController
$gameData['sdk_name'] = getSDKTypeName($gameData['sdk_version']);
$promoteIds = getAllPromoteListByType($promoteType);
$promotes = getAllPromoteListByType($promoteType);
$newPromoteData = [];
if (count($promoteIds) > 0) {
foreach ($promoteIds as $value) {
$thisPromote = M('apply', 'tab_')->where(array('game_id' => $gameId, 'promote_id' => $value['id'], 'offline_status' => 0))->count('id');
if (!$thisPromote) {
$newPromoteData[] = $value;
if (count($promotes) > 0) {
$promoteIds = array_column($promotes, 'id');
$oldIds = M('apply', 'tab_')->where(['game_id' => $gameId, 'promote_id' => ['in', $promoteIds], 'offline_status' => 0])->getField('id', true);
$newPromoteIds = array_diff($promoteIds, $oldIds);
foreach ($promotes as $promote) {
if (in_array($promote['id'], $newPromoteIds)) {
$newPromoteData[] = $promote;
}
}
}

@ -3,10 +3,23 @@
namespace Home\Controller;
use Think\Controller;
use Base\Service\PromoteService;
class BaseController extends HomeController
{
protected $promotePermissions;
protected $loginPromote = null;
protected $canViewUserRecharge = true;
protected $permControlUrls = [
'Home/Query/recharge',
'Home/Players/playAction',
'Home/Query/userRecharges',
'Home/Query/arpu',
'Home/Finance/index',
'Home/Finance/settlementDtl',
'Home/Finance/withdrawRecord',
];
protected function _initialize()
{
@ -15,7 +28,7 @@ class BaseController extends HomeController
$this->login();
$loginer = $this->getLoginPromote();
$this->certifiCation();
// $this->certifiCation();
$pid = is_login_promote();
define('PLEVEL', $loginer['parent_id']);
define('PID', $pid);
@ -33,9 +46,13 @@ class BaseController extends HomeController
define('G_SETTLEMENT_GRADE', 'sub_status,third_status');
}
$this->canViewUserRecharge = $this->promoteCan('view-user-recharge');
$this->checkUrlPermission();
$this->assign('loginer', $loginer);
$this->assign("parent_id", $loginer['parent_id']);
$this->assign("grand_id", $loginer['grand_id']);
$this->assign('canViewUserRecharge', $this->canViewUserRecharge);
$result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status');
if ($result['status'] == 1) {
@ -342,4 +359,37 @@ class BaseController extends HomeController
break;
}
}
public function checkUrlPermission()
{
$currentUrl = MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME;
if (!$this->canViewUserRecharge) {
foreach ($this->permControlUrls as $url) {
if (strtolower($currentUrl) == strtolower($url)) {
$this->error('无权限查看');
}
}
}
}
public function promoteCan($permission)
{
$promote = $this->getLoginPromote();
if (!$promote) {
return false;
}
if ($permission == 'recharge') {
if ($promote['level'] == 1) {
return true;
}
}
if ($permission == 'view-user-recharge') {
$promoteService = new PromoteService();
$topPromote = $promoteService->getTopPromote($promote);
if ($topPromote['can_view_recharge'] == 1) {
return true;
}
}
return false;
}
}

@ -90,14 +90,7 @@ class CoinOrderController extends BaseController
//创建订单
public function order_add(){
$status = promoteCan(session('promote_auth.pid'), function($level) {
if ($level == 1) {
return true;
} else {
return false;
}
});
$status = $this->promoteCan('recharge');
if (!$status) {
if (IS_POST) {
$this->ajaxReturn(array('status' => 0, 'msg'=>'无权限操作'));

@ -2031,16 +2031,17 @@ class DownloadController extends BaseController {
array('new_device_num','新创角设备'),
array('new_ip_num','新增创角ip'),
array('login_user_num','登陆用户数'),
array('spend_user_num','充值人数'),
array('spend_num','充值次数'),
array('spend_all_amount','充值总额'),
array('spend_cash','现金充值'),
array('spend_generic','通用币充值'),
array('spend_binding','绑定币充值'),
array('spend_discount','折扣币充值'),
array('spend_voucher','代金券使用'),
);
if($this->canViewUserRecharge) {
$xlsCell[] = array('spend_user_num','充值人数');
$xlsCell[] = array('spend_num','充值次数');
$xlsCell[] = array('spend_all_amount','充值总额');
$xlsCell[] = array('spend_cash','现金充值');
$xlsCell[] = array('spend_generic','通用币充值');
$xlsCell[] = array('spend_binding','绑定币充值');
$xlsCell[] = array('spend_discount','折扣币充值');
$xlsCell[] = array('spend_voucher','代金券使用');
}
if(!empty($map['tab_apply.promote_id'][1])) {
$params['promote_ids'] = $map['tab_apply.promote_id'][1];
}
@ -2136,6 +2137,16 @@ class DownloadController extends BaseController {
$allData['new_device_num'] = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
$allData['new_ip_num'] = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
$allData['login_user_num'] = $userRepository->getLoginCountGroupByGame($params);//登录用户数
if($this->canViewUserRecharge) {
$record['spend_user_num'] = $spendUserNumList[$gameId];
$record['spend_num'] = $spendNumList[$gameId];
$record['spend_all_amount'] = $spendAllAmountList[$gameId];
$record['spend_cash'] = $spendCashList[$gameId];
$record['spend_generic'] = $spendGenericList[$gameId];
$record['spend_binding'] = $spendBindingList[$gameId];
$record['spend_discount'] = 0;
$record['spend_voucher'] = 0;
$allData['spend_user_num'] = $spendRepository->getPayUserCountByGame($params);//充值人数
$allData['spend_num'] = $spendRepository->getPayCountByGame($params);//充值次数
unset($params['pay_way']);
@ -2148,6 +2159,9 @@ class DownloadController extends BaseController {
$allData['spend_binding'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//绑定币充值
$allData['spend_discount'] = '0.00';
$allData['spend_voucher'] = '0.00';
}
$records[] = $record;
$records[] = $allData;
}
@ -2895,16 +2909,19 @@ class DownloadController extends BaseController {
array('new_device_num','新创角设备'),
array('new_ip_num','新增创角IP'),
array('login_user_num','登陆用户数'),
array('spend_user_num','充值人数'),
array('spend_num','充值次数'),
array('spend_all_amount','充值总额'),
array('spend_cash','现金充值'),
array('spend_generic','通用币充值'),
array('spend_binding','绑定币充值'),
array('spend_discount','折扣币充值'),
array('spend_voucher','代金劵使用'),
);
if ($this->canViewUserRecharge) {
$xlsCell[] = array('spend_user_num','充值人数');
$xlsCell[] = array('spend_num','充值次数');
$xlsCell[] = array('spend_all_amount','充值总额');
$xlsCell[] = array('spend_cash','现金充值');
$xlsCell[] = array('spend_generic','通用币充值');
$xlsCell[] = array('spend_binding','绑定币充值');
$xlsCell[] = array('spend_discount','折扣币充值');
$xlsCell[] = array('spend_voucher','代金劵使用');
}
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
@ -2933,7 +2950,6 @@ class DownloadController extends BaseController {
}
$params['dayList'] = $map["dayList"];
$summaryData = [];
$records = [];
if (intval($endTime - $begTime) / (24 * 3600) <= 30) {
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
@ -2958,6 +2974,7 @@ class DownloadController extends BaseController {
$allData['new_device_num'] = 0;
$allData['new_ip_num'] = 0;
$allData['login_user_num'] = 0;
if($this->canViewUserRecharge) {
$allData['spend_user_num'] = 0;
$allData['spend_num'] = 0;
$allData['spend_all_amount'] = 0;
@ -2966,6 +2983,7 @@ class DownloadController extends BaseController {
$allData['spend_binding'] = 0;
$allData['spend_discount'] = 0;
$allData['spend_voucher'] = 0;
}
foreach ($params['dayList'] as $day) {
$date = date('Ymd', strtotime($day));
$records[] = [
@ -2991,6 +3009,15 @@ class DownloadController extends BaseController {
$allData['new_device_num'] += $newDeviceNumList[$day];
$allData['new_ip_num'] += $newIpNumList[$day];
$allData['login_user_num'] += $loginUserNumList[$day];
if ($this->canViewUserRecharge) {
$record['spend_user_num'] = $spendUserNumList[$day];
$record['spend_num'] = $spendNumList[$day];
$record['spend_all_amount'] = $$spendAllAmountList[$day];
$record['spend_cash'] = $spendCashList[$day];
$record['spend_generic'] = $spendGenericList[$day];
$record['spend_binding'] = $spendBindingList[$day];
$record['spend_discount'] = 0;
$record['spend_voucher'] = 0;
$allData['spend_user_num'] += $spendUserNumList[$day];
$allData['spend_num'] += $spendNumList[$day];
$allData['spend_all_amount'] = bcadd($allData['spend_all_amount'], $spendAllAmountList[$day], 2);
@ -2999,6 +3026,8 @@ class DownloadController extends BaseController {
$allData['spend_binding'] = bcadd($allData['spend_binding'], $spendBindingList[$day], 2);
$allData['spend_discount'] = bcadd($allData['spend_discount'], 0, 2);
$allData['spend_voucher'] = bcadd($allData['spend_voucher'], 0, 2);
}
$records[] = $record;
}
$allData['day'] = '合计';
@ -3024,15 +3053,15 @@ class DownloadController extends BaseController {
array('new_create_role_user_count','新创角用户'),
array('new_create_role_ip_count','新创角ip'),
array('login_user_count','登陆用户数'),
array('recharge_user_count','充值人数'),
array('recharge_count','充值次数'),
array('recharge_amount','充值总额'),
array('recharge_by_ban_coin','绑定币充值'),
array('recharge_by_coin','通用币充值'),
array('recharge_by_cash','现金充值'),
);
if ($this->canViewUserRecharge) {
$xlsCell[] = array('recharge_user_count','充值人数');
$xlsCell[] = array('recharge_count','充值次数');
$xlsCell[] = array('recharge_amount','充值总额');
$xlsCell[] = array('recharge_by_ban_coin','绑定币充值');
$xlsCell[] = array('recharge_by_coin','通用币充值');
$xlsCell[] = array('recharge_by_cash','现金充值');
}
$params['isContainSubs'] = $map['isContainSubs'];
$params['basicPromotes'] = json_decode($map['basicPromotes'],TRUE);
$ids = $map['ids'];
@ -3068,9 +3097,16 @@ class DownloadController extends BaseController {
$newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
$rechargeCountList = [];
$rechargeUserCountList = [];
$rechargeAmountList = [];
if ($this->canViewUserRecharge) {
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
}
$records = [];
if (I('p', 1) == 1) {
$selfParams = $params;
@ -3080,12 +3116,8 @@ class DownloadController extends BaseController {
$selfNewCreateRoleUserCountList = $promoteRepository->getNewCreateRoleUserCountByIds([$parent['id']], $selfParams);
// $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$parent['id']], $selfParams);
$selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$parent['id']], $selfParams);
$selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$parent['id']], $selfParams);
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
$records[] = [
$record = [
'id' => $parent['id'],
'account' => $parent['account'],
'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**',
@ -3096,18 +3128,24 @@ class DownloadController extends BaseController {
// 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$parent['id']],
'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$parent['id']],
'login_user_count' => $selfLoginUserCountList[$parent['id']],
'recharge_count' => $selfRechargeCountList[$parent['id']],
'recharge_user_count' => $selfRechargeUserCountList[$parent['id']],
'recharge_amount' => $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'],
'recharge_by_ban_coin' => $selfRechargeAmountList[$parent['id']]['ban_coin'],
'recharge_by_coin' => $selfRechargeAmountList[$parent['id']]['coin'],
'recharge_by_cash' => $selfRechargeAmountList[$parent['id']]['cash'],
'current_display' => $currentDisplay,
];
if ($this->canViewUserRecharge) {
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
$record['recharge_count'] = $selfRechargeCountList[$parent['id']];
$record['recharge_user_count'] = $selfRechargeUserCountList[$parent['id']];
$record['recharge_amount'] = $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'];
$record['recharge_by_ban_coin'] = $selfRechargeAmountList[$parent['id']]['ban_coin'];
$record['recharge_by_coin'] = $selfRechargeAmountList[$parent['id']]['coin'];
$record['recharge_by_cash'] = $selfRechargeAmountList[$parent['id']]['cash'];
}
$records[] = $record;
}
foreach ($promotes as $promote) {
$id = $promote['id'];
$records[] = [
$record = [
'id' => $id,
'account' => $promote['account'],
'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**',
@ -3118,14 +3156,17 @@ class DownloadController extends BaseController {
'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
'login_user_count' => $loginUserCountList[$id],
'recharge_count' => $rechargeCountList[$id],
'recharge_user_count' => $rechargeUserCountList[$id],
'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
'current_display' => '',
];
if ($this->canViewUserRecharge) {
$record['recharge_count'] = $rechargeCountList[$id];
$record['recharge_user_count'] = $rechargeUserCountList[$id];
$record['recharge_amount'] = $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'];
$record['recharge_by_ban_coin'] = $rechargeAmountList[$id]['ban_coin'];
$record['recharge_by_coin'] = $rechargeAmountList[$id]['coin'];
$record['recharge_by_cash'] = $rechargeAmountList[$id]['cash'];
}
$records[] = $record;
}
$xlsData = [];
foreach ($records as $key1 => $value1) {

@ -186,10 +186,9 @@ class HomeController extends Controller
'introduction',
'flooring_page_video',
'flooring_page_video_cover',
'supersign_status',
'ios_video_top',
'beta_status',
'beta_url',
'download_ways'
];
$map = ['id' => intval($gameId)];
$game = M('game', 'tab_')->field($columns)->where($map)->find();

@ -77,7 +77,7 @@ class PackageController extends Controller
} else if (Request::isIOS()) {
$plistUrl = substr($packageUrl, 1, strlen($packageUrl));
header("HTTP/1.1 303 See Other");
header("Location: "."itms-services://?action=download-manifest&url=" . Request::getHost() . "/" . $plistUrl);
header("Location: "."itms-services://?action=download-manifest&url=" . C('DOMAIN_DOWNLOAD') . '/' . ltrim($plistUrl, '/'));
} else {
$this->gotoPkgUrl($packageUrl);
}

@ -557,6 +557,17 @@ class PromoteController extends BaseController
->where("qmn.status=0")
->order("qmn.id asc")
->select();
if (!$this->canViewUserRecharge) {
foreach ($data_list as $key => $item) {
foreach ($this->permControlUrls as $url) {
if (stripos($item['url'], $url) !== false) {
unset($data_list[$key]);
}
}
}
}
$this->assign("data_list", $data_list);
$this->meta_title = "快捷菜单";
$this->display();

@ -1128,6 +1128,7 @@ class QueryController extends BaseController
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByDay($params);//新创角设备
$newIpNumList = $userRepository->getNewCreateRoleIpCountByDay($params);//新创角IP
$loginUserNumList = $userRepository->getLoginCountGroupByDayNew($params);//登录用户数
if ($this->canViewUserRecharge) {
$spendUserNumList = $spendRepository->getPayUserCountGroupByDayNew($params);//充值人数
$spendNumList = $spendRepository->getPayCountGroupByDay($params);//充值次数
$spendAllAmountList = $spendRepository->getPayAmountGroupByDayAndType($params);//充值总额
@ -1137,6 +1138,7 @@ class QueryController extends BaseController
$spendGenericList = $spendRepository->getPayAmountGroupByDayAndType($params);//通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByDayAndType($params);//绑定币充值
}
$allData['role_num'] = 0;
$allData['user_num'] = 0;
@ -1144,6 +1146,7 @@ class QueryController extends BaseController
$allData['new_device_num'] = 0;
$allData['new_ip_num'] = 0;
$allData['login_user_num'] = 0;
if ($this->canViewUserRecharge) {
$allData['spend_user_num'] = 0;
$allData['spend_num'] = 0;
$allData['spend_all_amount'] = 0;
@ -1152,9 +1155,10 @@ class QueryController extends BaseController
$allData['spend_binding'] = 0;
$allData['spend_discount'] = 0;
$allData['spend_voucher'] = 0;
}
foreach ($dayList as $day) {
$date = date('Ymd', strtotime($day));
$records[] = [
$record = [
'day' => $date,
'role_num' => $roleNumList[$day],
'user_num' => $userNumList[$day],
@ -1162,14 +1166,6 @@ class QueryController extends BaseController
'new_device_num' => $newDeviceNumList[$day],
'new_ip_num' => $newIpNumList[$day],
'login_user_num' => $loginUserNumList[$day],
'spend_user_num' => $spendUserNumList[$day],
'spend_num' => $spendNumList[$day],
'spend_all_amount' => $spendAllAmountList[$day],
'spend_cash' => $spendCashList[$day],
'spend_generic' => $spendGenericList[$day],
'spend_binding' => $spendBindingList[$day],
'spend_discount' => 0,
'spend_voucher' => 0,
];
$allData['role_num'] += $roleNumList[$day];
@ -1178,6 +1174,17 @@ class QueryController extends BaseController
$allData['new_device_num'] += $newDeviceNumList[$day];
$allData['new_ip_num'] += $newIpNumList[$day];
$allData['login_user_num'] += $loginUserNumList[$day];
if ($this->canViewUserRecharge) {
$record['spend_user_num'] = $spendUserNumList[$day];
$record['spend_num'] = $spendNumList[$day];
$record['spend_all_amount'] = $spendAllAmountList[$day];
$record['spend_cash'] = $spendCashList[$day];
$record['spend_generic'] = $spendGenericList[$day];
$record['spend_binding'] = $spendBindingList[$day];
$record['spend_discount'] = 0;
$record['spend_voucher'] = 0;
$allData['spend_user_num'] += $spendUserNumList[$day];
$allData['spend_num'] += $spendNumList[$day];
$allData['spend_all_amount'] = bcadd($allData['spend_all_amount'], $spendAllAmountList[$day], 2);
@ -1187,6 +1194,8 @@ class QueryController extends BaseController
$allData['spend_discount'] = bcadd($allData['spend_discount'], 0, 2);
$allData['spend_voucher'] = bcadd($allData['spend_voucher'], 0, 2);
}
$records[] = $record;
}
foreach ($dayListReverse as $day) {
$date = date('Ymd', strtotime($day));
$summaryData['date'][] = $date;
@ -1194,10 +1203,12 @@ class QueryController extends BaseController
$summaryData['user_num'][] = $userNumList[$day];
$summaryData['new_user_num'][] = $newUserNumList[$day];
$summaryData['new_device_num'][] = $newDeviceNumList[$day];
if ($this->canViewUserRecharge) {
$summaryData['spend_user_num'][] = $spendUserNumList[$day];
$summaryData['spend_all_amount'][] = $spendAllAmountList[$day];
}
}
}
$serverData = $this->getServer($relationGameId, $sdkVersion);
@ -1314,6 +1325,7 @@ class QueryController extends BaseController
$newDeviceNumList = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
$newIpNumList = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
$loginUserNumList = $userRepository->getLoginCountGroupByGame($params);//登录用户数
if ($this->canViewUserRecharge) {
$spendUserNumList = $spendRepository->getPayUserCountGroupByGame($params);//充值人数
$spendNumList = $spendRepository->getPayCountGroupByGame($params);//充值次数
$spendAllAmountList = $spendRepository->getPayAmountGroupByGameAndType($params);//充值总额
@ -1323,9 +1335,10 @@ class QueryController extends BaseController
$spendGenericList = $spendRepository->getPayAmountGroupByGameAndType($params);//通用币充值
$params['pay_way'] = -1;
$spendBindingList = $spendRepository->getPayAmountGroupByGameAndType($params);//绑定币充值
}
foreach ($data as &$list) {
$gameId = $list['game_id'];
$records[] = [
$record = [
'game_id' => $gameId,
'game_name' => $list['game_name'],
'sdk_version' => $list['sdk_version'],
@ -1335,15 +1348,19 @@ class QueryController extends BaseController
'new_device_num' => $newDeviceNumList[$gameId],
'new_ip_num' => $newIpNumList[$gameId],
'login_user_num' => $loginUserNumList[$gameId],
'spend_user_num' => $spendUserNumList[$gameId],
'spend_num' => $spendNumList[$gameId],
'spend_all_amount' => $spendAllAmountList[$gameId],
'spend_cash' => $spendCashList[$gameId],
'spend_generic' => $spendGenericList[$gameId],
'spend_binding' => $spendBindingList[$gameId],
'spend_discount' => 0,
'spend_voucher' => 0,
];
if ($this->canViewUserRecharge) {
$record['spend_user_num'] = $spendUserNumList[$gameId];
$record['spend_num'] = $spendNumList[$gameId];
$record['spend_all_amount'] = $spendAllAmountList[$gameId];
$record['spend_cash'] = $spendCashList[$gameId];
$record['spend_generic'] = $spendGenericList[$gameId];
$record['spend_binding'] = $spendBindingList[$gameId];
$record['spend_discount'] = 0;
$record['spend_voucher'] = 0;
}
$records[] = $record;
}
$params['all_data'] = 1;
$params['game_ids'] = $allGameIs;
@ -1353,6 +1370,7 @@ class QueryController extends BaseController
$allData['new_device_num'] = $userRepository->getNewCreateRoleDeviceCountByGame($params);//新创角设备
$allData['new_ip_num'] = $userRepository->getNewCreateRoleIpCountByGame($params);//新创角IP
$allData['login_user_num'] = $userRepository->getLoginCountGroupByGame($params);//登录用户数
if ($this->canViewUserRecharge) {
$allData['spend_user_num'] = $spendRepository->getPayUserCountByGame($params);//充值人数
$allData['spend_num'] = $spendRepository->getPayCountByGame($params);//充值次数
unset($params['pay_way']);
@ -1367,6 +1385,7 @@ class QueryController extends BaseController
$allData['spend_voucher'] = '0.00';
}
}
}
$serverData = $this->getServer($relationGameId, $sdkVersion);
@ -2093,9 +2112,15 @@ class QueryController extends BaseController
// $newCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds($ids, $params);
$newCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds($ids, $params);
$loginUserCountList = $promoteRepository->getLoginUserCountByIds($ids, $params);
$rechargeCountList = [];
$rechargeUserCountList = [];
$rechargeAmountList = [];
if ($this->canViewUserRecharge) {
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
}
if (I('p', 1) == 1) {
$selfParams = $params;
@ -2106,10 +2131,7 @@ class QueryController extends BaseController
// $selfNewCreateRoleDeviceCountList = $promoteRepository->getNewCreateRoleDeviceCountByIds([$parent['id']], $selfParams);
$selfNewCreateRoleIpCountList = $promoteRepository->getNewCreateRoleIpCountByIds([$parent['id']], $selfParams);
$selfLoginUserCountList = $promoteRepository->getLoginUserCountByIds([$parent['id']], $selfParams);
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
$records[] = [
$record = [
'id' => $parent['id'],
'account' => $parent['account'],
'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**',
@ -2120,18 +2142,24 @@ class QueryController extends BaseController
// 'new_create_role_device_count' => $selfNewCreateRoleDeviceCountList[$parent['id']],
'new_create_role_ip_count' => $selfNewCreateRoleIpCountList[$parent['id']],
'login_user_count' => $selfLoginUserCountList[$parent['id']],
'recharge_count' => $selfRechargeCountList[$parent['id']],
'recharge_user_count' => $selfRechargeUserCountList[$parent['id']],
'recharge_amount' => $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'],
'recharge_by_ban_coin' => $selfRechargeAmountList[$parent['id']]['ban_coin'],
'recharge_by_coin' => $selfRechargeAmountList[$parent['id']]['coin'],
'recharge_by_cash' => $selfRechargeAmountList[$parent['id']]['cash'],
'current_display' => $currentDisplay,
];
if ($this->canViewUserRecharge) {
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
$record['recharge_count'] = $selfRechargeCountList[$parent['id']];
$record['recharge_user_count'] = $selfRechargeUserCountList[$parent['id']];
$record['recharge_amount'] = $selfRechargeAmountList[$parent['id']]['ban_coin'] + $selfRechargeAmountList[$parent['id']]['coin'] + $selfRechargeAmountList[$parent['id']]['cash'];
$record['recharge_by_ban_coin'] = $selfRechargeAmountList[$parent['id']]['ban_coin'];
$record['recharge_by_coin'] = $selfRechargeAmountList[$parent['id']]['coin'];
$record['recharge_by_cash'] = $selfRechargeAmountList[$parent['id']]['cash'];
}
$records[] = $record;
}
foreach ($promotes as $promote) {
$id = $promote['id'];
$records[] = [
$record = [
'id' => $id,
'account' => $promote['account'],
'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**',
@ -2142,14 +2170,17 @@ class QueryController extends BaseController
// 'new_create_role_device_count' => $newCreateRoleDeviceCountList[$id],
'new_create_role_ip_count' => $newCreateRoleIpCountList[$id],
'login_user_count' => $loginUserCountList[$id],
'recharge_count' => $rechargeCountList[$id],
'recharge_user_count' => $rechargeUserCountList[$id],
'recharge_amount' => $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'],
'recharge_by_ban_coin' => $rechargeAmountList[$id]['ban_coin'],
'recharge_by_coin' => $rechargeAmountList[$id]['coin'],
'recharge_by_cash' => $rechargeAmountList[$id]['cash'],
'current_display' => '',
];
if ($this->canViewUserRecharge) {
$record['recharge_count'] = $rechargeCountList[$id];
$record['recharge_user_count'] = $rechargeUserCountList[$id];
$record['recharge_amount'] = $rechargeAmountList[$id]['ban_coin'] + $rechargeAmountList[$id]['coin'] + $rechargeAmountList[$id]['cash'];
$record['recharge_by_ban_coin'] = $rechargeAmountList[$id]['ban_coin'];
$record['recharge_by_coin'] = $rechargeAmountList[$id]['coin'];
$record['recharge_by_cash'] = $rechargeAmountList[$id]['cash'];
}
$records[] = $record;
}
} else {
$timeout = 1;

@ -33,7 +33,6 @@
<input type="hidden" name="desc" value="{$game['features']}">
<input type="hidden" name="isIOS13" value="<?php if($isIOS13):?>1<?php else:?>0<?php endif;?>">
<input type="hidden" name="isNewIos" value="<?php if($isNewIos):?>1<?php else:?>0<?php endif;?>">
<input type="hidden" name="supersign_status" value="{$game['supersign_status']}" id="supersign_status">
<input type="hidden" name="betaUrl" value="{$game['beta_url']}">
<?php if ($isWechat):?>
@ -104,11 +103,7 @@
<div>{$game['relation_game_name']}</div>
<div>{$game['features']}</div>
<div>
<?php if ($downloadUrl == 'https://'.$_SERVER['HTTP_HOST']) :?>
<div class="download">免费安装</div>
<?php else :?>
<div class="download">免费安装</div>
<?php endif ;?>
<div class="download" data-downloadable="<?= ($game['dow_status'] != 1 || $game['download_ways'] == 0) ? 0 : 1 ?>">免费安装</div>
<img src="__IMG__/wenhao.png" class="doubt" alt="">
</div>
</div>
@ -259,25 +254,31 @@
<div class="window" style="display: none;z-index: 1000">
<div class="containner">
<div class="containner-box">
<div class="text"> 购买至尊下载赠送限量至尊超级礼包价值100元</div>
<div class="text">• 至尊下载:永不闪退、不丢数据稳定有保障</div>
<div class="text"> • 同一设备安装一次可在一年内无限次下载重装</div>
<img src="__IMG__/landing_bg2.png" alt="" style="width: 100%;height: 2.8rem;">
<div class="text-wrapper">
<div style="padding: 0 0.39rem 0.15rem 0.36rem;">
<?php if (($game['download_ways'] & 2) == 2):?>
<div class="text">beta版下载免费下载解决您频繁掉签的烦恼</div>
<?php endif;?>
<?php if (($game['download_ways'] & 4) == 4):?>
<div class="text">至尊下载10元购买永不闪退、不丢数据稳定与保障。同意设备安装一次可在一年内无限次下载重装并赠送限量至尊超级礼包</div>
<?php endif;?>
<?php if (($game['download_ways'] & 1) == 1):?>
<div class="text">普通下载:免费下载,畅游手游世界!</div>
<?php endif;?>
<?php if ($game['dow_status'] ==1):?>
<?php if ($game['supersign_status'] ==1):?>
<div class="blue-btn" onclick="location.href='mobile.php/Ssg/pay/game_id/{$game[\'id\']}/promote_id/{$promoteId}'">¥10至尊下载</div>
<?php else:?>
<div class="blue-btn" onclick="layer.msg('已售空,我们正在努力上货中~');">¥10至尊下载</div>
<?php if (($game['download_ways'] & 2) == 2):?>
<div class="blue-btn stabilization" data-url="{$game['beta_url']}">beta版下载</div>
<?php endif;?>
<?php if ($game['beta_status'] == 1):?>
<div class="blue-btn stabilization" data-url="{$game['beta_url']}">beta版下载</div>
<?php else:?>
<div class="blue-btn" onclick="layer.msg('已售空,我们正在努力上货中~');">beta版下载</div>
<?php if (($game['download_ways'] & 4) == 4):?>
<div class="blue-btn" onclick="location.href='mobile.php/Ssg/pay/game_id/{$game[\'id\']}/promote_id/{$promoteId}'">¥10至尊下载</div>
<?php endif;?>
<?php if (($game['download_ways'] & 1) == 1):?>
<div class="blue-btn down-link" down-link="{$downloadUrl}">普通下载</div>
<?php endif;?>
<?php else:?>
<div class="blue-btn" onclick="layer.msg('该游戏已关闭下载');">¥10至尊下载</div>
@ -286,6 +287,10 @@
<?php endif;?>
</div>
</div>
</div>
</div>
</div>
<div class="second" style="display: none;z-index: 1000">
<div class="second-box">
@ -1076,11 +1081,16 @@ var PhoneObj = {
};
swiperGet();
$(".download").click(function(){
var isTipSafari = is_tip_safari();
if (isTipSafari) {
$('.safari').show();
return;
}
var downloadable = $(this).attr('data-downloadable');
if (downloadable == 0) {
return layer.msg('暂无下载');
}
$(".window").show();
document.body.style.overflow = 'hidden';
});

@ -4,6 +4,7 @@
</block>
<block name="body">
<div class="page-overview promote-index-overview index-overview clearfix poll">
<?php if($canViewUserRecharge):?>
<ul>
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi1.png"/></span></div> <div class="text text2"><p>推广总用户</p><span>{$data.count}</span></div> </li>
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi2.png"/></span></div> <div class="text text1"><p>推广总充值</p><span>¥{$spendData.sum_count}</span></div> </li>
@ -16,6 +17,13 @@
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi3.png"/></span></div> <div class="text text3"><p>今日注册用户</p><span>{$data.today}</span></div> </li>
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi5.png"/></span></div> <div class="text text5"><p>今日充值金额</p><span>¥{$spendData.sum_today}</span></div> </li>
</ul>
<?php else:?>
<ul>
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi1.png"/></span></div> <div class="text text2"><p>推广总用户</p><span>{$data.count}</span></div> </li>
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi1.png"/></span></div> <div class="text text2"><p>昨日注册用户</p><span>{$data.yesterday}</span></div> </li>
<li><div class="icon"><span class="placeholder-graphic"><img src="__IMG__/20180207/icon_chongzhi3.png"/></span></div> <div class="text text3"><p>今日注册用户</p><span>{$data.today}</span></div> </li>
</ul>
<?php endif;?>
</div>
<div class="index-tab-list">
<ul>

@ -55,22 +55,27 @@
$isOpenQuery = true;
?>
<?php if($isOpenQuery):?>
<div class="subNav jssubNav"><i class="prev_icon icon_shujvi"></i><span>数据管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Query/dailySummary')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq dailySummary '>active</if> ">每日概况</a>
<a href="{:U('Query/summary')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq summary '>active</if> ">数据汇总</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/recharge')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq recharge or ACTION_NAME eq viewSpendDetailed) '>active</if> ">订单查询</a>
<?php endif;?>
<a href="{:U('Query/register')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq register or ACTION_NAME eq viewRole) '>active</if> ">注册明细</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/arpu')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq arpu '>active</if> ">ARPU统计</a>
<?php endif;?>
<!-- <a href="{:U('Query/retention_analysis')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq retention_analysis '>active</if> ">留存统计</a> -->
<a href="{:U('Query/userRoles')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq userRoles '>active</if> ">角色查询</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/userRecharges')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq userRecharges '>active</if> ">充值玩家</a>
<?php endif;?>
<a href="{:U('Query/achievement')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq achievement '>active</if> ">团队/推广员业绩</a>
</div>
<?php endif;?>
<?php if ($loginer['level'] == 1) :?>
<?php if ($canViewUserRecharge && $loginer['level'] == 1) :?>
<div class="subNav jssubNav"><i class="prev_icon icon_caiwu"></i><span>财务管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Finance/index')}" class="<if condition='CONTROLLER_NAME eq Finance and ACTION_NAME eq index '>active</if> ">结算中心</a>
@ -128,10 +133,12 @@
<?php endif;?>
</div>
<?php if($canViewUserRecharge):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>玩家管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('Players/playAction')}" class="<if condition='CONTROLLER_NAME eq Players and (ACTION_NAME eq playAction)'>active</if> ">行为日志</a>
</div>
<?php endif;?>
</div>
</div>

@ -83,12 +83,14 @@
<!-- <th>新创角设备</th> -->
<th>新创角IP</th>
<th>登录用户数</th>
<?php if($canViewUserRecharge):?>
<th>充值人数</th>
<th>充值次数</th>
<th>充值总额</th>
<th>现金充值</th>
<th>通用币充值</th>
<th>绑定币充值</th>
<?php endif;?>
<?php if($parent['level'] < 4):?>
<th>操作</th>
<?php endif;?>
@ -109,12 +111,14 @@
<!-- <td>{$record.new_create_role_device_count}</td> -->
<td>{$record.new_create_role_ip_count}</td>
<td>{$record.login_user_count}</td>
<?php if($canViewUserRecharge):?>
<td>{$record.recharge_user_count}</td>
<td>{$record.recharge_count}</td>
<td>{$record.recharge_amount}</td>
<td>{$record.recharge_by_cash}</td>
<td>{$record.recharge_by_coin}</td>
<td>{$record.recharge_by_ban_coin}</td>
<?php endif;?>
<?php if($parent['level'] < 4):?>
<td>
<?php if($record['current_display'] == '' && $record['level'] < 4):?>

@ -158,9 +158,11 @@
<p>新创角用户|设备</p>
</div>
<?php if ($canViewUserRecharge) :?>
<div class="btn btn-role btn-role-border" data-type="3">
<p>充值人数|充值总额</p>
</div>
<?php endif ;?>
</div>
</div>
</div>
@ -179,6 +181,7 @@
</th>
<th class="pointer-hand" title="新增创角IP统计时间范围内首次创建角色IP总数去重">新增创角IP</th>
<th class="pointer-hand" title="登录用户数:统计时间范围内,登录的用户数(去重)">登录用户数</th>
<?php if ($canViewUserRecharge) :?>
<th class="pointer-hand" title="充值人数当日24小时在游戏内充值成功的订单的用户数去重">充值人数</th>
<th class="pointer-hand" title="充值次数当日24小时在游戏内充值成功的订单数量">充值次数</th>
<th class="pointer-hand spend-btn" title="充值总额当日24小时在游戏内充值成功的订单金额总和" style="width: 200px;">充值总额<i
@ -192,6 +195,7 @@
<th class="pointer-hand spend-element th-hide" title="代金券使用:统计时间范围内,在游戏内充值成功的订单,使用代金券总和,该部分不参与结算">
代金劵使用
</th>
<?php endif ;?>
</tr>
<empty name="listData">
<tr class="num2">
@ -208,6 +212,7 @@
<td>{$allData.new_user_num}|{$allData.new_device_num}</td>
<td>{$allData.new_ip_num}</td>
<td>{$allData.login_user_num}</td>
<?php if ($canViewUserRecharge) :?>
<td>{$allData.spend_user_num}</td>
<td>{$allData.spend_num}</td>
<td>{$allData.spend_all_amount}</td>
@ -216,6 +221,7 @@
<td class="spend-element th-hide">{$allData.spend_binding}</td>
<td class="spend-element th-hide">{$allData.spend_discount}</td>
<td class="spend-element th-hide">{$allData.spend_voucher}</td>
<?php endif ;?>
</tr>
<volist name="listData" id="vo">
<tr class="num2">
@ -225,6 +231,7 @@
<td>{$vo.new_user_num}|{$vo.new_device_num}</td>
<td>{$vo.new_ip_num}</td>
<td>{$vo.login_user_num}</td>
<?php if ($canViewUserRecharge) :?>
<td>{$vo.spend_user_num}</td>
<td>{$vo.spend_num}</td>
<td>{$vo.spend_all_amount}</td>
@ -233,6 +240,7 @@
<td class="spend-element th-hide">{$vo.spend_binding}</td>
<td class="spend-element th-hide">{$vo.spend_discount}</td>
<td class="spend-element th-hide">{$vo.spend_voucher}</td>
<?php endif ;?>
</tr>
</volist>
</empty>
@ -323,10 +331,12 @@
dataName2 = '新创角设备';
break;
case 3:
<?php if ($canViewUserRecharge) :?>
data1 = spendUserNum;
data2 = spendAllAmount;
dataName1 = '充值人数';
dataName2 = '充值总额';
<?php endif ;?>
break;
}

@ -146,6 +146,7 @@
</th>
<th class="pointer-hand" title="新增创角IP统计时间范围内首次创建角色IP总数去重">新增创角IP</th>
<th class="pointer-hand" title="登录用户数:统计时间范围内,登录的用户数(去重)">登录用户数</th>
<?php if ($canViewUserRecharge) :?>
<th class="pointer-hand" title="充值人数当日24小时在游戏内充值成功的订单的用户数去重">充值人数</th>
<th class="pointer-hand" title="充值次数当日24小时在游戏内充值成功的订单数量">充值次数</th>
<th class="pointer-hand spend-btn" title="充值总额当日24小时在游戏内充值成功的订单金额总和" style="width: 200px;">充值总额<i
@ -159,6 +160,7 @@
<th class="pointer-hand spend-element th-hide" title="代金券使用:统计时间范围内,在游戏内充值成功的订单,使用代金券总和,该部分不参与结算">
代金劵使用
</th>
<?php endif ;?>
</tr>
<empty name="listData">
<tr class="num2">
@ -177,6 +179,7 @@
<td>{$vo.new_user_num}|{$vo.new_device_num}</td>
<td>{$vo.new_ip_num}</td>
<td>{$vo.login_user_num}</td>
<?php if ($canViewUserRecharge) :?>
<td>{$vo.spend_user_num}</td>
<td>{$vo.spend_num}</td>
<td>{$vo.spend_all_amount|default=0}</td>
@ -185,6 +188,7 @@
<td class="spend-element th-hide">{$vo.spend_binding|default=0}</td>
<td class="spend-element th-hide">{$vo.spend_discount|default=0}</td>
<td class="spend-element th-hide">{$vo.spend_voucher|default=0}</td>
<?php endif ;?>
</tr>
</volist>
<tr class="num2">
@ -195,6 +199,7 @@
<td>{$allData.new_user_num}|{$allData.new_device_num}</td>
<td>{$allData.new_ip_num}</td>
<td>{$allData.login_user_num}</td>
<?php if ($canViewUserRecharge) :?>
<td>{$allData.spend_user_num}</td>
<td>{$allData.spend_num}</td>
<td>{$allData.spend_all_amount}</td>
@ -203,6 +208,7 @@
<td class="spend-element th-hide">{$allData.spend_binding}</td>
<td class="spend-element th-hide">{$allData.spend_discount}</td>
<td class="spend-element th-hide">{$allData.spend_voucher}</td>
<?php endif ;?>
</tr>
</empty>
</table>

@ -5,6 +5,7 @@ use Org\WeixinSDK\Weixin;
use User\Api\MemberApi;
use Base\Tool\TaskClient;
use Think\Log;
use Base\Service\GameService;
class SsgController extends BaseController {
const USER_NOT_ILLEGAL = -1; //用户名不合法
@ -325,12 +326,16 @@ class SsgController extends BaseController {
}
$map["sdk_version"] = 2;
$map["game_status"] = 1;
$map["supersign_status"] = 1;
$game_list = M("game", "tab_")->field("*, id as game_id")->where($map)->select();
for ($i=0; $i < count($game_list); $i++) {
$game_list[$i]["game_icon"] = get_cover($game_list[$i]["icon"], 'path');
$games = [];
foreach ($game_list as $game) {
if (($game['download_ways'] & GameService::DOWNLOAD_SUPER) != GameService::DOWNLOAD_SUPER) {
continue;
}
$res = array("list"=>$game_list);
$game["game_icon"] = get_cover($game["icon"], 'path');
$games[] = $game;
}
$res = array("list"=>$games);
if($type == 1){
$map['user_id']= $user['user_id'];
$map['pay_status'] = 1;

@ -1090,3 +1090,14 @@ ADD COLUMN `relation_game_id` int(11) NOT NULL DEFAULT 0 COMMENT '关联游戏id
ALTER TABLE `tab_spend`
MODIFY COLUMN `selle_status` int(11) NOT NULL DEFAULT 0 COMMENT '渠道结算 0未结算1 结算',
MODIFY COLUMN `selle_ratio` double(5, 2) DEFAULT 0.00 COMMENT '渠道分成比例';
ALTER TABLE `tab_game`
ADD COLUMN `download_ways` tinyint(3) NOT NULL DEFAULT 0 COMMENT '下载方式' AFTER `beta_url`;
-- 是否需要修复旧数据
ALTER TABLE `tab_promote`
ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是';
ALTER TABLE `tab_promote_belong`
ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是';

@ -405,24 +405,37 @@
}
.containner{
width: 5.50rem;
height: 7.82rem;
background: url(../images/landing_bg.png) no-repeat;
background-size: 100% 100%;
display: flex;
justify-content: flex-end;
/* height: 9.20rem; */
/* background: url(../images/landing_bg.png) no-repeat; */
/* background-size: 100% 100%; */
/* background-color: #fff; */
/* display: flex;
justify-content: flex-end; */
}
.containner-box{
padding: 0 0.39rem 0.15rem 0.36rem;
/* padding: 0 0.39rem 0.15rem 0.36rem; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
}
.containner-box .text-wrapper {
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: center;
background-color: #fff;
width: 100%;
border-bottom-left-radius: 0.2rem;
border-bottom-right-radius: 0.2rem;
}
.containner-box .text{
font-size:0.24rem;
font-weight:400;
color:rgba(41,41,41,1);
line-height:0.36rem;
width: 100%;
}
.blue-btn{
width: 4.40rem;

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Loading…
Cancel
Save