Merge branch 'dev' into release-1.0.0

master
zhengchanglong 5 years ago
commit 9490c7a40d

@ -6981,5 +6981,84 @@ if ($key == 'model'){
return $data;
}
/**
* 推广补链
* @author 鹿文学
*/
public function Support_list() {
$xlsName = $_REQUEST['xlsname'];
$model = M('user','tab_');
$xlsCell = array(
'一级渠道','玩家账号','游戏名称','区服','角色名','申请额度','扶持类型','备注','申请时间','可用额度','实际发放额度','状态'
);
if(I('promote_id')){
$map['promote_id']=I('promote_id');
}
if(I('game_id')){
$map['game_id']=I('game_id');
}
if(!empty(I('apply_type')) || I('apply_type')==='0'){
$map['apply_type']=I('apply_type');
}
//
if(!empty(I('apply_status')) || I('apply_status')==='0'){
$map['apply_status']=I('apply_status');
}
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
$fp = fopen('php://output', 'a');//打开output流
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$accessNum=M('test_resource','tab_')->where($map)->count();
$perSize = 5000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
for($i = 1; $i <= $pages; $i++) {
/* 获取频道列表 */
$xlsData = M('test_resource','tab_')
->field('promote_account,user_account,game_name,server_name,role_name,
apply_resource,apply_type,apply_remark,create_time,id as max_quota,verify_resource,apply_status')
->where($map)
->order('id desc')
->select();
foreach($xlsData as $key => $value) {
$value['create_time'] = date("Y-m-d H:i:s", $value['create_time']);
$value['max_quota'] = max_quota($value['game_id'],$value['promote_id']);
$value['apply_type'] = $value['apply_type']==0?'新增扶持':'后续扶持';
if($value['apply_status'] == 1) {
$value['apply_status'] = '拒绝';
} else if ($value['apply_status'] == 2) {
$value['apply_status'] = '通过';
} else {
$value['apply_status'] = '待审核';
}
mb_convert_variables('GBK', 'UTF-8', $value);
fputcsv($fp, $value);
}
unset($xlsData);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
}
fclose($fp);
exit();
}
}

@ -347,6 +347,7 @@ class GameController extends ThinkController
$phone['dow_icon'] = $sibling['dow_icon'];
$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'];
M('Game', 'tab_')->data($phone)->where(array('id' => $another['id']))->save();
//同时修改代充游戏折扣

@ -384,6 +384,26 @@
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo" >落地页视频封面</td>
<td class="r">
<span class="table_btn table_upload table_icon" style="float: none;">
<input type="hidden" name="flooring_page_video_cover" value="{$data['flooring_page_video_cover']}" />
<div id="uploadImg" class="wu-example">
<div class="btns">
<div id="flooring_page_video_cover">
<div class="webuploader-pick" style="line-height:13px">上传封面</div>
</div>
</div>
<!--用来存放文件信息-->
<div id="flooring_page_video_cover_thelist" class="uploader-list" style="display: flex;">
</div>
</div>
</span>
<span class="notice-text">安卓视频封面 图片大小不得超过1M 图片比例610 * 343</span>
</td>
</tr>
<tr>
<td class="l">ios视频是否置顶</td>
<if condition="$data['ios_video_top'] eq 1">
@ -1272,6 +1292,118 @@
$( '#'+file.id ).find('.progress').fadeOut();
});
//上传落地页视频封面
var uploaderFlooringVideoPageCover = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,
// swf文件路径
swf: '__STATIC__/webuploader/Uploader.swf',
// 文件接收服务端。
server: "{:U('File/uploadPicture',array('session_id'=>session_id(),'flag'=>true))}",
// 选择文件的按钮。可选。
// 内部根据当前运行是创建可能是input元素也可能是flash.
pick: {
id:'#flooring_page_video_cover',
multiple:true
},
// dnd: false,
paste: document.body,
accept: {
title: '图片',
extensions: 'png,gif,jpg,jpeg,bmp',
mimeTypes: '.png,.gif,.jpg,.jpeg,.bmp',
},
// 不压缩image, 默认如果是jpeg文件上传前会压缩一把再上传
resize: false,
disableGlobalDnd: true,
fileNumLimit:1,
threads:1,
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
chunked:false,
duplicate: true
});
// 当有文件被添加进队列的时候
uploaderFlooringVideoPageCover.on( 'fileQueued', function( file ) {
var html = '';
var imgList = $("#flooring_page_video_cover_thelist");
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="" style="width: 150px;height: 84px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
imgList.html(html);
imgList.css('margin-top','10px');
var img2 = imgList.children('#'+file.id).find('img');
uploaderFlooringVideoPageCover.makeThumb(file, function (error, src) {
if (error) {
return;
}
img2.attr('src', src);
}, 300, 300);
});
// 文件上传过程中创建进度条实时显示。
uploaderFlooringVideoPageCover.on( 'uploadProgress', function(file, percentage) {
var $li = $( '#'+file.id ),
$percent = $li.find('.progress .progress-bar');
// 避免重复创建
if ( !$percent.length ) {
$percent = $('<div class="progress progress-striped active">' +
'<div class="progress-bar" role="progressbar" style="width: 0%">' +
'</div>' +
'</div>').appendTo( $li ).find('.progress-bar');
}
$li.find('p.state').text('上传中');
$percent.css( 'width', percentage * 100 + '%' );
$percent.text( (percentage * 100).toFixed(0) + '%' );
});
uploaderFlooringVideoPageCover.on( 'uploadSuccess', function( file , response) {
$( '#'+file.id ).find('p.state').text('已上传').fadeOut(800);
$('#'+file.id).find('h4.info').append('<a href="javascript:;" class="jsdelvideo table_click" style="float:none;display:inline-block;margin-left:10px;">删除</a>');
console.log(response);
var cover = response.id;
$("input[name=flooring_page_video_cover]").val(cover);
$('#'+file.id).find('.jsdelvideo').on('click',function() {
console.log(file);
$("input[name=flooring_page_video_cover]").val('');
$('#'+file.id).remove();
uploaderFlooringVideoPageCover.removeFile( file.id );
return false;
});
});
var flooringVideoPageCover = [];
<?php if (!empty($data['flooring_page_video_cover'])) :?>
var html = '';
<?php $flooringVideoPageCover = $data['flooring_page_video_cover']; ?>
html += '<div id="' + <?=$flooringVideoPageCover?> + '" class="item" style="margin-right: 10px;">';
html += '<a href="javascript:;"><img src="<?=get_cover($flooringVideoPageCover,"path")?>" style="width: 150px;height: 84px;cursor: move;"></a>';
html += '<h4 class="info" style="text-align: center;">';
html += '<a href="javascript:;" class="jsdelzip table_click" style="float:none;display:inline-block;" img-id="' + <?=$flooringVideoPageCover?> + '">删除</a>';
html += '</h4>';
html += '<div class="progress progress-striped active" style="display: none;">';
html += '<div class="progress-bar" role="progressbar" style="width: 100%;">100%</div>';
html += '</div>';
html += '</div>';
$('#flooring_page_video_cover_thelist').css('margin-top','10px');
$('#flooring_page_video_cover_thelist').html(html);
$('#flooring_page_video_cover_thelist').children().children('h4').children('.jsdelzip').on('click', function() {
$(this).parent().parent().remove();
$("input[name=flooring_page_video_cover]").val('');
});
<?php endif ;?>
var uploaderFile = WebUploader.create({
// 选完文件后,是否自动上传。
auto: true,

@ -119,7 +119,7 @@
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <?php echo $vo.relation_game_name == I('game_name') ? 'selected':''; ?> >{$vo.game_name}</option>
<option value="{$vo.game_name}" <if condition="$vo.game_name eq I('game_name')">selected</if> >{$vo.game_name}</option>
</volist>
</select>
</div>
@ -475,12 +475,14 @@ $(function(){
})
var game_server = "{:I('server_name')}";
$("#game_type").change(function(){
console.log({sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()})
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"

@ -170,6 +170,7 @@
</div>
</div>
<div class="page">
<a class="sch-btn" href="{:U('Export/Support_list',array_merge(array('xlsname'=>'扶持发放'),I('get.')))}">导出</a>
{$_page|default=''}
</div>
</block>

@ -1194,7 +1194,7 @@ class DownloadController extends BaseController {
empty(I('game_player_name')) || $map['tab_pay_info.game_player_name'] = ['like', '%' . I('game_player_name') . '%'];
empty(I('user_account')) || $map['tab_pay_info.user_account'] = ['like', '%' . I('user_account') . '%'];
empty(I('extend')) || $map['tab_pay_info.extend'] = I('extend');
empty(I('user_id')) || $map['tab_pay_info.user_id'] = I('user_id');
empty(I('user_id')) || $map['tab_pay_info.game_player_id'] = I('user_id');
if (!empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['between', [strtotime($begTime), strtotime($endTime) - 1]];
}else if (empty($begTime) && !empty($endTime)) {
@ -1305,7 +1305,7 @@ class DownloadController extends BaseController {
$payStatus = intval(I('pay_status'));
if (in_array($payStatus, array_keys(self::$payStatus))) {
$map['tab_spend.pay_status'] = $payStatus;
$map['tab_spend.pay_status'] = $payStatus + 2;
}
}
$conditions = json_encode($map,TRUE);
@ -1786,7 +1786,6 @@ class DownloadController extends BaseController {
$map[$key] = $value;
}
}
// var_dump($dataname);die();
switch ($dataname) {
case "注册明细数据":
$this->registerExcelInfo($id,$map); //注册明细
@ -1904,7 +1903,7 @@ class DownloadController extends BaseController {
$csvData['game_name'] = $v['game_name'];
$csvData['promote_id'] = $v['promote_id'];
$csvData['server_name'] = $v['server_name'];
$csvData['user_id'] = $v['user_id'];
$csvData['user_id'] = $v['game_player_id'];
$csvData['game_player_name'] = $v['game_player_name'];
$csvData['price'] = $v['price'];
mb_convert_variables('GBK', 'UTF-8', $csvData);
@ -3300,6 +3299,9 @@ class DownloadController extends BaseController {
'付款时间',
);
$model = M('spend','tab_');
if(!empty($map['tab_spend.pay_status'])) {
$map['tab_spend.pay_status'] = $map['tab_spend.pay_status'] -2 ;
}
$data1 = $model
->field('tab_spend.id')
->join('tab_game on tab_spend.game_id = tab_game.id')
@ -3307,7 +3309,6 @@ class DownloadController extends BaseController {
->where($map)
->order('tab_spend.id desc')
->select();
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
@ -3354,13 +3355,13 @@ class DownloadController extends BaseController {
}
foreach ($data as $key1 => $value1) {
$value1['pay_way'] = $this->payWay[$value1['pay_way']];
$value1['pay_time'] = date('Y-m-d H:i:s',$value1['pay_time']);
$value1['p_p_proinfo'] = $value1['pro_account'].'('.$value1['pro_real_name'].')';
$value1['p_proinfo'] = $value1['pro_account'].'('.$value1['pro_real_name'].')';
$value1['proinfo'] = $value1['pro_account'].'('.$value1['pro_real_name'].')';
// $value1['user_account'] = substr_replace($value1['user_account'],'************',3,12);
$value1['user_account'] = $this->encryption($value1['user_account']);
$value1['pay_order_number'] = $this->encryption($value1['pay_order_number']);
$value1['pay_time'] = ($value1['pay_status'] == 1) ? date('Y-m-d H:i:s', $value1['pay_time']) : '--';
$value1['pay_status'] = isset(self::$payStatus[$value1['pay_status']]) ? self::$payStatus[$value1['pay_status']] : "未知状态";
$value1['sdk_version'] = getSDKTypeName($value1['sdk_version']);
switch ($value1['level']) {

@ -179,6 +179,7 @@ class HomeController extends Controller
'game_size',
'introduction',
'flooring_page_video',
'flooring_page_video_cover',
'supersign_status',
'ios_video_top'
];
@ -209,6 +210,7 @@ class HomeController extends Controller
$imageUrls[] = get_cover($imageId, 'path');
}
$game['flooring_page_imgs'] = $imageUrls;
$game['flooring_page_video_cover'] = get_cover($game['flooring_page_video_cover'], 'path');
$screenshotIds = explode(',', $game['screenshot']) ?? [];
$screenshotUrls = [];

@ -57,7 +57,7 @@ class PlayersController extends BaseController {
$map['tab_pay_info.extend'] = $extend;
}
if (!empty($userId)) {
$map['tab_pay_info.user_id'] = $userId;
$map['tab_pay_info.game_player_id'] = $userId;
}
if (!empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime - 1]];
@ -68,7 +68,6 @@ class PlayersController extends BaseController {
}
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
$row=10;
$rs = M('pay_info','tab_')->where($map)->order('tab_pay_info.create_time desc')
->page($page, $row)->select();
foreach($rs as $key => $v) {
@ -98,13 +97,13 @@ class PlayersController extends BaseController {
$parameter['level_promote_2'] = $levelPromote[0];
$parameter['level_promote_3'] = $levelPromote[1];
$parameter['level_promote_4'] = $levelPromote[2];
$serverData = $this->getServer($relationGameId, $sdkVersion);
$serverData = $this->getServer(I('relation_game_id'), I('sdk_version'));
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('listData',$rs);
$this->assign('serverData', $serverData);
$this->assign('serverData', $serverData['data']);
$this->assign('initBegTime', I('begtime'));
$this->assign('initEndTime', I('endtime'));
$this->display();
@ -171,4 +170,10 @@ class PlayersController extends BaseController {
return $result;
}
public function getServerAjax()
{
$serverData = $this->getServer(I('relation_game_id'), I('sdk_version'));
$this->ajaxReturn($serverData);
}
}

@ -1857,7 +1857,7 @@ class QueryController extends BaseController
}
$map['uc.create_time'] = ['between', [$begTime, $endTime - 1]];
$fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today,uc.user_id";
$fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today";
$fieldUI = "ui.user_account,ui.game_name,ui.role_name,ui.role_level,ui.server_name,ui.play_time,ui.play_ip,ui.promote_account,ui.sdk_version,ui.create_time";
$loginRecordMap['lr.create_time'] = $map['uc.create_time'];
@ -1885,10 +1885,6 @@ class QueryController extends BaseController
list($records, $pagination, $count) = $this->paginate($query);
foreach ($records as &$list) {
if (empty($list['user_account']) ) {
$list['user_account'] = M('user', 'tab_')->where("id = {$list['user_id']}")->getField('account');
$list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
}
$list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
$list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name'];
$list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']);

@ -58,15 +58,10 @@
<?php if ($k == 1) :?>
<?php if (!empty($game['flooring_page_video'])):?>
<div class="home-video">
<video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup="{}">
<video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="none" width="640" height="264" poster="{$game['flooring_page_video_cover']}" data-setup='{}'>
<source src="{$game['flooring_page_video']}" type='video/mp4' />
</video>
</div>
<!-- <div class="home-video">-->
<!-- <video id="shakeVideo" src="{$game['flooring_page_video']}" autoplay controls muted webkit-playsinline="true" playsinline="true"></video>-->
<!-- </div>-->
<?php endif;?>
<?php endif ;?>
<?php if ($downloadUrl == 'https://'.$_SERVER['HTTP_HOST']) :?>
@ -85,97 +80,6 @@
var videoWidth = $('.video-js').width();
$('.video-js').height(videoWidth * 0.562295082);
var myPlayer = videojs('example_video_1');
myPlayer.ready(function(){
var myPlayer = this;
myPlayer.play();
});
//设置中文
videojs.addLanguage('zh-CN', {
"Play": "播放",
"Pause": "暂停",
"Current Time": "当前时间",
"Duration": "时长",
"Remaining Time": "剩余时间",
"Stream Type": "媒体流类型",
"LIVE": "直播",
"Loaded": "加载完毕",
"Progress": "进度",
"Fullscreen": "全屏",
"Non-Fullscreen": "退出全屏",
"Mute": "静音",
"Unmute": "取消静音",
"Playback Rate": "播放速度",
"Subtitles": "字幕",
"subtitles off": "关闭字幕",
"Captions": "内嵌字幕",
"captions off": "关闭内嵌字幕",
"Chapters": "节目段落",
"Close Modal Dialog": "关闭弹窗",
"Descriptions": "描述",
"descriptions off": "关闭描述",
"Audio Track": "音轨",
"You aborted the media playback": "视频播放被终止",
"A network error caused the media download to fail part-way.": "网络错误导致视频下载中途失败。",
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "视频因格式不支持或者服务器或网络的问题无法加载。",
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。",
"No compatible source was found for this media.": "无法找到此视频兼容的源。",
"The media is encrypted and we do not have the keys to decrypt it.": "视频已加密,无法解密。",
"Play Video": "播放视频",
"Close": "关闭",
"Modal Window": "弹窗",
"This is a modal window": "这是一个弹窗",
"This modal can be closed by pressing the Escape key or activating the close button.": "可以按ESC按键或启用关闭按钮来关闭此弹窗。",
", opens captions settings dialog": ", 开启标题设置弹窗",
", opens subtitles settings dialog": ", 开启字幕设置弹窗",
", opens descriptions settings dialog": ", 开启描述设置弹窗",
", selected": ", 选择",
"captions settings": "字幕设定",
"Audio Player": "音频播放器",
"Video Player": "视频播放器",
"Replay": "重播",
"Progress Bar": "进度小节",
"Volume Level": "音量",
"subtitles settings": "字幕设定",
"descriptions settings": "描述设定",
"Text": "文字",
"White": "白",
"Black": "黑",
"Red": "红",
"Green": "绿",
"Blue": "蓝",
"Yellow": "黄",
"Magenta": "紫红",
"Cyan": "青",
"Background": "背景",
"Window": "视窗",
"Transparent": "透明",
"Semi-Transparent": "半透明",
"Opaque": "不透明",
"Font Size": "字体尺寸",
"Text Edge Style": "字体边缘样式",
"None": "无",
"Raised": "浮雕",
"Depressed": "压低",
"Uniform": "均匀",
"Dropshadow": "下阴影",
"Font Family": "字体库",
"Proportional Sans-Serif": "比例无细体",
"Monospace Sans-Serif": "单间隔无细体",
"Proportional Serif": "比例细体",
"Monospace Serif": "单间隔细体",
"Casual": "舒适",
"Script": "手写体",
"Small Caps": "小型大写字体",
"Reset": "重启",
"restore all settings to the default values": "恢复全部设定至预设值",
"Done": "完成",
"Caption Settings Dialog": "字幕设定视窗",
"Beginning of dialog window. Escape will cancel and close the window.": "开始对话视窗。离开会取消及关闭视窗",
"End of dialog window.": "结束对话视窗"
});
$('.down-link').on('click', function () {
var dow_status = parseInt($('#dow_status').val());
if (dow_status == 0) {
@ -185,6 +89,7 @@
if ($('.bn-rule').length > 0) {
$('.bn-rule').css('display','block')
$('.bn-rule').css('z-index','12')
$('video').hide();
return
}
if ($('input[name=isNewIos]').val() == 0 && $('input[name=isIOS13]').val() == 1) {

@ -178,7 +178,7 @@
<td>{$vo.game_name}</td>
<td>{$vo.promote_id}</td>
<td>{$vo.server_name}</td>
<td>{$vo.user_id}</td>
<td>{$vo.game_player_id}</td>
<td>{$vo.game_player_name}</td>
<td>{$vo.price}</td>

@ -705,3 +705,8 @@ ADD COLUMN `pay_way` int NOT NULL DEFAULT 0 AFTER `ip`;
-- 菜单(游戏充值预下单)
INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('游戏充值预下单', 16, 0, 'BehaviorLog/game', 0, '', '行为日志', 0, 1);
--2019-12-13
--
ALTER TABLE `tab_game`
ADD COLUMN `flooring_page_video_cover` int(11) NOT NULL DEFAULT 0 COMMENT '落地页视频封面';
Loading…
Cancel
Save