解决冲突

master
ELF 5 years ago
commit 0c34bb88d3

@ -180,6 +180,14 @@ class GameController extends ThinkController
} else {
$_POST['display_site'] = '';
}
$content = $_POST['content'];
if(!empty($content)) {
$_POST['detail_content'] = $content;
} else {
$_POST['detail_content'] = '';
}
$pinyin = new \Think\Pinyin();
$num = mb_strlen($_POST['game_name'], 'UTF8');
@ -288,9 +296,10 @@ class GameController extends ThinkController
} else {
$_POST['display_site'] = '';
}
$content = $_POST['content'];
$game = D(self::model_name);//M('$this->$model_name','tab_');
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['detail_content'] = $content;
$res = $game->update();
$id = $res["id"];
$sibling = D("Game")->find($id);

@ -193,6 +193,7 @@ unset($_REQUEST['parent_id']);
empty(I('post.password')) ? : $data['password'] =I('post.password');
empty(I('post.second_pwd')) ? : $data['second_pwd'] =I('post.second_pwd');
empty(I('post.status')) ? : $data['status'] =I('post.status');
empty(I('post.child_game_permission')) ? : $data['child_game_permission'] =I('post.child_game_permission');
empty(I('post.mark1')) ? : $data['mark1'] =I('post.mark1');
empty(I('post.mark2')) ? : $data['mark2'] = I('post.mark2');
$data['ba_id'] = I('ba_id');

@ -75,6 +75,20 @@
<span class="notice-text">显示该游戏所适用的平台,一般为安卓平台和苹果平台</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">混服设置</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="server_type" checked> 专服
</label>
<label>
<input type="radio" class="inp_radio" value="2" name="server_type"> 混服
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">开放类型</td>
<td class="r table_radio">
@ -177,7 +191,19 @@
<tr>
<td class="l">游戏详细介绍:</td>
<td class="r">
<textarea name="introduction" class="txt_area"></textarea>
<textarea type="text" name="introduction" class="txt_area">
</textarea>
</td>
</tr>
<tr>
<td class="l">游戏资料中心:</td>
<td class="r table_radio">
<span class="form_textarea">
<textarea name="content">{$field.value}</textarea>
{:hook('adminArticleEdit', array('name'=>'content','value'=>$field['value']))}
</span>
</td>
</tr>
<tr class="picbox">
@ -1074,7 +1100,7 @@
uploaderImg.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href=""><img src="" style="width: 100px;height: 100px;"></a>';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
@ -1129,13 +1155,6 @@
return false;
});
if(!response.chunk){
var url = response.path + "/" +response.name;
// $("#file_name").val(response.name);
$("#file_url").val(url);
// $("#file_size").val(response.size);
}
//alert($("#file_name").val()+";"+$("#file_url").val()+";"+$("#file_size").val())
});
uploaderImg.on('uploadError', function(file) {

@ -74,6 +74,21 @@
<span class="notice-text">显示该游戏所适用的平台,一般为安卓平台和苹果平台</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">混服设置</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<eq name="data.server_type" value="1">
<input type="radio" class="inp_radio" value="1" name="server_type" checked> 专服
<else/>
<input type="radio" class="inp_radio" value="2" name="server_type" checked> 混服
</eq>
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
<tr>
<td class="l noticeinfo">开放类型</td>
<td class="r table_radio">
@ -187,6 +202,14 @@
<textarea name="introduction" class="txt_area">{$data['introduction']}</textarea>
</td>
</tr>
<tr>
<td class="l">游戏资料中心:</td>
<td class="r">
<textarea name="content" class="txt_area">{$data['detail_content']}</textarea>
{:hook('adminArticleEdit', array('name'=>'content','value'=>$field['value']))}
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo" >游戏ICON</td>
<td class="r">
@ -1145,7 +1168,7 @@
imgListData.push(<?=$value?>);
html += '<div id="' + <?=$value?> + '" class="item flooring_page_img_box" style="margin-right: 10px;">';
html += '<a href=""><img src="<?=get_cover($value,"path")?>" style="width: 100px;height: 100px;"></a>';
html += '<a href="javascript:;"><img src="<?=get_cover($value,"path")?>" style="width: 100px;height: 100px;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="' + <?=$value?> + '">删除</a>';
html += '</h4>';
@ -1163,6 +1186,7 @@
$.each(imgListData,function(index, item) {
if (thisId == item) {
imgListData.splice(index,1);
return false;
}
});
@ -1176,7 +1200,7 @@
uploaderImg.on( 'fileQueued', function( file ) {
var html = '';
html += '<div id="' + file.id + '" class="item" style="margin-right: 10px;">';
html += '<a href=""><img src="" style="width: 100px;height: 100px;"></a>';
html += '<a href="javascript:;"><img src="" style="width: 100px;height: 100px;cursor: move;"></a>';
html += '<h4 class="info">' + file.name + '</h4>';
html += '<p class="state">等待上传...</p>';
html += '</div>';
@ -1225,6 +1249,7 @@
$.each(imgListData,function(index, item) {
if (response.id == item) {
imgListData.splice(index,1);
return false;
}
});
setFlooringPageImgsVal();
@ -1232,13 +1257,6 @@
return false;
});
if(!response.chunk){
var url = response.path + "/" +response.name;
// $("#file_name").val(response.name);
$("#file_url").val(url);
// $("#file_size").val(response.size);
}
//alert($("#file_name").val()+";"+$("#file_url").val()+";"+$("#file_size").val())
});
uploaderImg.on('uploadError', function(file) {

@ -66,6 +66,21 @@
</script>
</td>
</tr>
<if condition="$data['parent_id'] eq 0">
<tr>
<td class="l">下级游戏展示:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="0" name="child_game_permission" <eq name="data['child_game_permission']" value="0">checked="checked"</eq>>会长已添加游戏
</label >
<label >
<input type="radio" value="1" name="child_game_permission" <eq name="data['child_game_permission']" value="1">checked="checked"</eq>>所有游戏
</label>
</span>
</td>
</tr>
</if>
<tr>
<td class="l">真实姓名:</td>
<td class="r">

@ -17,6 +17,9 @@ class ApplyService {
$ids = [$promoteId];
$list = M('promote', 'tab_')->field('id')->where('parent_id=' . $promoteId . ' or grand_id=' . $promoteId)->select();
$ids = array_merge($ids, array_column($list, 'id'));
M('apply', 'tab_')->where(['game_id' => $gameId, 'promote_id' => ['in', $ids]])->delete();
$save['offline_status'] = 1;
M('apply', 'tab_')->where(['game_id' => $gameId, 'promote_id' => ['in', $ids]])->save($save);
}
}

@ -965,6 +965,14 @@ function getParentPromoteId($promoteId)
return D('Promote')->where($map)->getField('parent_id');
}
//获会长渠道ID
function getGrandPromoteId($promoteId)
{
$map['id'] = $promoteId;
return D('Promote')->where($map)->getField('grand_id');
}
function getGamePermission($gameId)
{
$gameData = M('Game', 'tab_')
@ -1170,4 +1178,10 @@ function promoteCan($promoteId, \Closure $callback)
{
$level = get_promote_level(session('promote_auth.pid'));
return $callback($level);
}
//获取下级游戏添加权限
function getChildGameAddPermission($promoteId)
{
return D('Promote')->where(array('id' => $promoteId))->getField('child_game_permission');
}

@ -49,22 +49,31 @@ class ApplyController extends BaseController
$this->display($model['tem_list']);
}
public function gameSpecialList()
{
$this->index(1);
}
public function gameList()
{
$this->index(2);
}
//首页 $type-查询的游戏平台类型 0-全部 10-安卓+ios 2-ios 1-安卓
public function index($p = 0, $type = 0)
public function index($serverType = 1)
{
$promoteId = empty(I('promote_id')) ? PID : I('promote_id');//搜索的渠道ID
$promoteRole = empty(I('promote_role')) ? 1 : I('promote_role');//渠道角色
$parentPromoteId = getParentPromoteId($promoteId);//上级渠道ID
$grandPromoteId = getGrandPromoteId($promoteId);
$grandPromoteId = empty($grandPromoteId) ? $parentPromoteId : $grandPromoteId;//本账号会长渠道ID
$childGameAddPermission = getChildGameAddPermission($grandPromoteId);//游戏添加权限
$thisParentPromoteId = getParentPromoteId(PID);//本账号上级渠道ID
// $addPermission = 1;//是否有添加游戏权限
// if ($thisParentPromoteId == 0 && $promoteRole == 3) {
// $addPermission = 0;
// }
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
$map['tab_game.server_type'] = $serverType;//专服游戏
if (!empty(I('game_id'))) {
$thisRelationGameName = M('Game', 'tab_')->where(array('id' => I('game_id')))->getField('relation_game_name');
@ -72,6 +81,7 @@ class ApplyController extends BaseController
$map['tab_game.relation_game_name'] = ['like', $thisRelationGameName];
}
$type = I('get.type', 0);
$group = '';
switch ($type) {
case 1:
@ -91,7 +101,7 @@ class ApplyController extends BaseController
case 10:
$group = 'tab_game.relation_game_id';
if ($parentPromoteId > 0) {
if ($parentPromoteId > 0 && $childGameAddPermission == 0) {
$gameRelationGameIdList = M('Game', 'tab_')->group('relation_game_id')->having('count(id) = 2')->getField('relation_game_id', true);
if (count($gameRelationGameIdList) > 0) {
$gameRelationGameIdList = implode(',', $gameRelationGameIdList);
@ -114,7 +124,7 @@ class ApplyController extends BaseController
break;
}
$page = intval($p);
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
@ -124,14 +134,14 @@ class ApplyController extends BaseController
}
$join = '';
if ($parentPromoteId > 0) {
$map['tab_apply.promote_id'] = PID;
if ($parentPromoteId > 0 && $childGameAddPermission == 0) {
$map['tab_apply.promote_id'] = $grandPromoteId;
if (!empty($where)) {
$map['_logic'] = 'and';
$map['_complex'] = $where;
}
$join = 'inner join tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0';//查询上级游戏
$join = 'tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0';//查询上级游戏
}
$data = M('Game', 'tab_')
@ -143,6 +153,7 @@ class ApplyController extends BaseController
->where($map)
->group($group)
->order('tab_game.sort desc,tab_game.id desc')
// ->fetchSql(true)
->page($page, $row)
->select();
@ -178,8 +189,107 @@ class ApplyController extends BaseController
$this->assign('promoteRole', $promoteRole);
$this->assign('pID', PID);
$this->assign('promoteData', getAllPromoteListByType($promoteRole));
// $this->assign('addPermission', $addPermission);
$this->assign('type', $type);
$this->assign('myGame', ($serverType == 1) ? 'specialMyGameList' : 'myGameList');
$this->assign('game', ($serverType == 1) ? 'gameSpecialList' : 'gameList');
$this->assign('position', ($serverType == 1) ? '专服管理' : '混服管理');
$this->meta_title = "申请游戏";
$this->display('index');
}
//查看游戏资料专区
public function feature($p = 0, $type = 0)
{
$promoteId = empty(I('promote_id')) ? PID : I('promote_id');//搜索的渠道ID
$promoteRole = empty(I('promote_role')) ? 1 : I('promote_role');//渠道角色
//$parentPromoteId = getParentPromoteId($promoteId);//上级渠道ID
$thisParentPromoteId = getParentPromoteId(PID);//本账号上级渠道ID
// $addPermission = 1;//是否有添加游戏权限
// if ($thisParentPromoteId == 0 && $promoteRole == 3) {
// $addPermission = 0;
// }
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
$map['tab_game.developers'] = 0; //平台游戏(官网游戏,非开发者游戏)
$applyPromote = M('apply','tab_')->field('game_id')->where(['promote_id' => $promoteId])->select();
$noDeveloperGameArr = array();
foreach ($applyPromote as $key => $value) {
$applyPromoteGameId = $value['game_id'];
$gameInfo = M('Game','tab_')
->field('id,icon,game_name,features,sdk_version,game_size,game_type_name,relation_game_name,developers')
->where(['id' => $applyPromoteGameId])->select();
if($gameInfo[0]['developers'] > 0){
unset($gameInfo[0]['developers']);
$noDeveloperGameArr[] = $gameInfo[0]['id'] ; //非开发者游戏
}
}
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$map['_logic'] = 'and';
if (!empty(I('game_id'))) {
$thisRelationGameName = M('Game', 'tab_')->where(array('id' => I('game_id')))->getField('relation_game_name');
$map['tab_game.relation_game_name'] = ['like', $thisRelationGameName];
$where['_complex'] = $map;
// $where['tab_game.id'] = ['in',$noDeveloperGameArr];
// $where['_logic']='or';
}else {
$where['_complex'] = $map;
$where['tab_game.id'] = ['in',$noDeveloperGameArr];
$where['_logic']='or';
}
$data = M('Game', 'tab_')
->field('tab_game.id,tab_game.icon,tab_game.game_name,tab_game.features,tab_game.sdk_version,tab_game.game_size,tab_game.game_type_name,tab_game.relation_game_name,ta_1.id as apply_id_1')
->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.offline_status = 0 and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏
->where($where)
->order('tab_game.developers desc,tab_game.sort desc,tab_game.id desc')
->page($page, $row)
->select();
//$AllData = array_merge($noDeveloperGameArr,$data);
/* 查询记录总数 */
$count = M("Game", "tab_")
->field('tab_game.id')
->where($map)
->select();
$count = count($count);
//分页
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$parameter['type'] = $type;
$parameter['promote_role'] = $promoteRole;
empty(I('promote_id')) || $parameter['promote_id'] = I('promote_id');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('list_data', $data);
$this->assign("count", $count);
$this->assign("promoteId", $promoteId);
// $this->assign('parentPromoteId', $parentPromoteId);
$this->assign('thisParentPromoteId', $thisParentPromoteId);
// $this->assign('promoteRole', $promoteRole);
$this->assign('pID', PID);
//$this->assign('promoteData', getAllPromoteListByType($promoteRole));
// $this->assign('addPermission', $addPermission);
// $this->assign('type', $type);
$this->meta_title = "申请游戏";
@ -471,8 +581,17 @@ class ApplyController extends BaseController
}
public function specialMyGameList()
{
$this->my_game(1);
}
public function myGameList()
{
$this->my_game(2);
}
public function my_game($type = -1, $p = 0)
public function my_game($serverType = 1)
{
//渠道可申请游戏
if (empty($_REQUEST['promote_id'])) {
@ -493,6 +612,10 @@ class ApplyController extends BaseController
}
$map['tab_apply.promote_id'] = $promoteId;
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
$map['tab_game.server_type'] = $serverType;//游戏服务器类型
if ($_REQUEST['game_id'] != null) {
$relationGameName = M('Game', 'tab_')->where(array('id' => $_REQUEST['game_id']))->getField('relation_game_name');
@ -508,7 +631,7 @@ class ApplyController extends BaseController
// $map['tab_apply.status'] = 1;
// $map['tab_game.game_status'] = 1;//游戏状态
// empty(I('sdk_version')) || $map['tab_game.sdk_version'] = I('sdk_version');
$page = intval($p);
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
@ -561,7 +684,6 @@ class ApplyController extends BaseController
$this->assign("url", $url);
$this->assign("count", $count);
$this->assign("row", $row);
$this->assign('model', $model);
$this->assign('promoteId', $promoteId);
$this->assign('thisParentPromoteId', getParentPromoteId(PID));
$this->assign('parentPromoteId', getParentPromoteId($promoteId));
@ -569,8 +691,12 @@ class ApplyController extends BaseController
$this->assign('promoteRole', $promoteRole);
$this->assign('promoteData', getAllPromoteListByType($promoteRole));
$this->assign('list_data', $data);
$this->assign('serverType', $serverType);
$this->assign('myGame', ($serverType == 1) ? 'specialMyGameList' : 'myGameList');
$this->assign('game', ($serverType == 1) ? 'gameSpecialList' : 'gameList');
$this->assign('position', ($serverType == 1) ? '专服管理' : '混服管理');
$this->meta_title = "我的游戏";
$this->display();
$this->display('my_game');
}
@ -883,13 +1009,16 @@ class ApplyController extends BaseController
}
$promoteData = D('Promote')->where(array('id' => $promoteId))->find();
$grandPromoteId = getGrandPromoteId($promoteId);
$grandPromoteId = empty($grandPromoteId) ? $promoteData['parent_id'] : $grandPromoteId;//本账号会长渠道ID
$childGameAddPermission = getChildGameAddPermission($grandPromoteId);//游戏添加权限
if ($_POST['sdk_type'] > 0) {
if ($promoteData['parent_id'] > 0) {
if ($promoteData['parent_id'] > 0 && $childGameAddPermission == 0) {
$gameRelationName = M('game', 'tab_')->where(array('id' => $_POST['game_id']))->getField('relation_game_name');
$gameData = M('game', 'tab_')
->field('tab_game.*')
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . PID)
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . $grandPromoteId)
->where(array('tab_game.relation_game_name' => $gameRelationName))
->select();
} else {
@ -899,10 +1028,10 @@ class ApplyController extends BaseController
->select();
}
} else {
if ($promoteData['parent_id'] > 0) {
if ($promoteData['parent_id'] > 0 && $childGameAddPermission == 0) {
$gameData = M('game', 'tab_')
->field('tab_game.*')
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . PID)
->join('tab_apply on tab_game.id = tab_apply.game_id and tab_apply.offline_status = 0 and tab_apply.promote_id = ' . $grandPromoteId)
->where($gameMap)->select();
} else {
$gameData = M('game', 'tab_')->where($gameMap)->select();
@ -956,12 +1085,12 @@ class ApplyController extends BaseController
if (($updateStatus == 0 && $res) || ($updateStatus == 1 && $res !== false)) {
$thsiAppltId = M('Apply', 'tab_')->where(array('game_id' => $list['id'], 'promote_id' => $promoteId))->getField('id');
$gameSource = M('Game_source', 'tab_')->field('id,source_version')->where(['game_id' => $list['id']])->find();
if (file_exists(get_game_source_file_url($list['id'])) || null == $gameSource) {
M('apply', 'tab_')->where(['id' => $thsiAppltId])->setField(['enable_status' => 2, 'pack_url' => '', 'plist_url' => '']);
M('apply_launch', 'tab_')->where(['apply_id' => $thsiAppltId])->setField('launch_packge', 0);
} else {
if (!file_exists(get_game_source_file_url($list['id'])) || null == $gameSource) {
M('apply', 'tab_')->where(['id' => $thsiAppltId])->setField('enable_status', -1);
M('apply_launch', 'tab_')->where(['apply_id' => $thsiAppltId])->setField('launch_packge', -1);
} else {
M('apply', 'tab_')->where(['id' => $thsiAppltId])->setField(['enable_status' => 2, 'pack_url' => '', 'plist_url' => '']);
M('apply_launch', 'tab_')->where(['apply_id' => $thsiAppltId])->setField('launch_packge', 0);
}
} else {
$this->ajaxReturn(array("status" => 0, "msg" => "申请失败", 'ret' => $res));
@ -1571,4 +1700,25 @@ class ApplyController extends BaseController
$this->ajaxReturn(['status' => 1, 'data' => $enableStatus]);
}
public function backDetailData() { //返回详情数据
$result = ['code' => 10001,'msg' => "该游戏信息不存在,请确认!",'error' => 1,'info' => ''];
$id = $_POST['id'];
if(empty($id)) {
$this->ajaxReturn($result);
}
$gameInfo = M('Game','tab_')->where(['id' => $id])->getField('detail_content');
if(!$gameInfo) {
$this->ajaxReturn($result);
}else {
$result['code'] = 10000;
$result['msg'] = "获取信息成功";
$result['error'] = -1;
$result['info'] = $gameInfo;
$this->ajaxReturn($result);
}
}
}

@ -0,0 +1,105 @@
<?php
namespace Home\Controller;
use Admin\Model\PromoteModel;
use Think\Controller;
use User\Api\PromoteApi;
/**
* 游戏分成比例控制器
*/
class GameDivideController extends BaseController
{
//首页
public function index()
{
$parentId = getParentPromoteId(PID);//上级ID
if ($parentId > 0) {
$this->error('权限异常');
}
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
if ($res) {
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
empty(I('relation_game_id')) || $map['relation_game_id'] = I('relation_game_id');
empty(I('sdk_version')) || $map['sdk_version'] = I('sdk_version');
empty(I('server_type')) || $map['server_type'] = I('server_type');
$minRatio = floatval(I('min_ratio', 0));
$maxRatio = floatval(I('max_ratio', 0));
if (!empty($minRatio) && empty($maxRatio)) {
$map['ratio'] = ['egt', $minRatio];
} elseif (empty($minRatio) && !empty($maxRatio)) {
$map['ratio'] = ['elt', $maxRatio];
} elseif (!empty($minRatio) && !empty($maxRatio)) {
$map['ratio'] = ['between', [$minRatio, $maxRatio]];
}
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$data = M('Game', 'tab_')
->field('id,icon,game_name,game_type_name,sdk_version,server_type,discount,ratio')
->where($map)
->order('sort desc')
->page($page, $row)
->select();
$count = M('Game', 'tab_')
->where($map)
->count();
//分页
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
empty(I('relation_game_id')) || $parameter['relation_game_id'] = I('relation_game_id');
empty(I('sdk_version')) || $parameter['sdk_version'] = I('sdk_version');
empty(I('server_type')) || $parameter['server_type'] = I('server_type');
empty($minRatio) || $parameter['min_ratio'] = $minRatio;
empty($maxRatio) || $parameter['max_ratio'] = $maxRatio;
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('dataList', $data);
$this->assign('count', $count);
$this->assign('serverType', I('server_type', 0));
}
$this->meta_title = "分成比例";
$this->display();
}
//验证安全密码
public function verifyPassword()
{
$password = I('post.password');
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $password);
if ($res) {
session('game_divide_second_pwd', $password);
$data['status'] = 1;
$data['msg'] = '验证成功';
} else {
$data['status'] = 0;
$data['msg'] = '安全密码不正确';
}
$this->ajaxReturn($data);
}
}

@ -90,6 +90,7 @@ class PromoteCoinController extends BaseController
$this->assign('data', $data);
$this->assign('count', $count);
$this->meta_title = '我的平台币';
$this->display();
}
@ -198,6 +199,7 @@ class PromoteCoinController extends BaseController
$this->assign('count', $count);
$this->assign('gameId', I('get.game_id'));
$this->assign('setDate', date("Y-m-d"));
$this->meta_title = '交易明细';
$this->display();
}
@ -258,6 +260,7 @@ class PromoteCoinController extends BaseController
}
$this->assign('data', $data);
$this->meta_title = '查看明细';
$this->display();
}

File diff suppressed because it is too large Load Diff

@ -99,7 +99,7 @@ class QueryController extends BaseController
$map['tab_spend.is_check'] = ['neq', 2];
$data = M('Spend', 'tab_')
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.grand_id as pro_grand_id')
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.grand_id as pro_grand_id,tab_promote.parent_id as pro_parent_id')
->join('tab_game on tab_spend.game_id = tab_game.id')
->join('left join tab_promote on tab_spend.promote_id = tab_promote.id')
->where($map)
@ -114,6 +114,14 @@ class QueryController extends BaseController
if (!empty($data)) {
foreach ($data as &$list) {
if ($list['pro_grand_id'] > 0) {
$thisPromoteData = D('Promote')
->field('account,real_name')
->where(array('id' => $list['pro_parent_id']))
->find();
$list['p_pro_account'] = $thisPromoteData['account'];
$list['p_pro_real_name'] = $thisPromoteData['real_name'];
}
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
}
}
@ -148,7 +156,7 @@ class QueryController extends BaseController
$this->assign('pID', PID);
$this->assign('ownId', I('own_id'));
$this->assign('payWayData', QueryController::$payWay);
$this->meta_title = "充值明细";
$this->meta_title = "订单查询";
$this->display();
}
@ -950,7 +958,7 @@ class QueryController extends BaseController
$allData['spend_voucher'] = 0;
foreach ($data as &$list) {
$thisDateTime = strtotime($list['day']);
$userPlayInfoWhere['tab_user_play_info.play_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
$userPlayInfoWhere['tab_user_play_info.create_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
$userGameLoginWhere['tab_user_game_login_record.login_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
$spendWhere['tab_spend.pay_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
@ -968,7 +976,7 @@ class QueryController extends BaseController
->group('tab_user_play_info.user_id')
->select());//创角用户
$newUserSql = '(select count(ti.id) from tab_user_play_info as ti where ti.user_id = tab_user_play_info.user_id and ti.game_id = tab_user_play_info.game_id and ti.play_time < ' . $thisDateTime . $newWhere . ') as old_num';
$newUserSql = '(select count(ti.id) from tab_user_play_info as ti where ti.user_id = tab_user_play_info.user_id and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $thisDateTime . $newWhere . ') as old_num';
$list['new_user_num'] = count($userPlayInfoModel
->field($newUserSql)
->join($join)
@ -977,15 +985,24 @@ class QueryController extends BaseController
->group('tab_user_play_info.user_id')
->having('old_num = 0')
->select());//新创角用户
$list['new_device_num'] = 0;//新创角设备
$newIpSql = '(select count(ti.id) from tab_user_play_info as ti where ti.play_ip = tab_user_play_info.play_ip and ti.game_id = tab_user_play_info.game_id and ti.play_time < ' . $thisDateTime . $newWhere . ') as old_num';
$newDeviceSql = '(select count(ti.id) from tab_user_play_info as ti where ti.create_device_number = tab_user_play_info.create_device_number and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $thisDateTime . $newWhere . ') as old_num';
$list['new_device_num'] = count($userPlayInfoModel
->field($newDeviceSql)
->join($join)
->where($userPlayInfoWhere)
->where($map)
->group('tab_user_play_info.create_device_number')
->having('old_num = 0')
->select());//新创角设备
$newIpSql = '(select count(ti.id) from tab_user_play_info as ti where ti.create_ip = tab_user_play_info.create_ip and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $thisDateTime . $newWhere . ') as old_num';
$list['new_ip_num'] = count($userPlayInfoModel
->field($newIpSql)
->join($join)
->where($userPlayInfoWhere)
->where($map)
->group('tab_user_play_info.play_ip')
->group('tab_user_play_info.create_ip')
->having('old_num = 0')
->fetchSql(true)
->select());//新增创角IP
@ -1207,7 +1224,7 @@ class QueryController extends BaseController
$newWhere = '';
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$userPlayInfoWhere['tab_user_play_info.play_time'] = ['between', [$begTime, $endTime + 86399]];
$userPlayInfoWhere['tab_user_play_info.create_time'] = ['between', [$begTime, $endTime + 86399]];
$userGameLoginWhere['tab_user_game_login_record.login_time'] = ['between', [$begTime, $endTime + 86399]];
$spendWhere['tab_spend.pay_time'] = ['between', [$begTime, $endTime + 86399]];
$spendWhere['tab_spend.pay_status'] = 1;
@ -1230,7 +1247,7 @@ class QueryController extends BaseController
->group('tab_user_play_info.user_id')
->select());//创角用户
$newUserSql = '(select count(ti.id) from tab_user_play_info as ti where ti.user_id = tab_user_play_info.user_id and ti.game_id = tab_user_play_info.game_id and ti.play_time < ' . $begTime . $newWhere . ') as old_num';
$newUserSql = '(select count(ti.id) from tab_user_play_info as ti where ti.user_id = tab_user_play_info.user_id and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $begTime . $newWhere . ') as old_num';
$list['new_user_num'] = count($userPlayInfoModel
->field($newUserSql)
->where($userPlayInfoWhere)
@ -1238,13 +1255,19 @@ class QueryController extends BaseController
->having('old_num = 0')
->select());//新创角用户
$list['new_device_num'] = 0;//新创角设备
$newDeviceSql = '(select count(ti.id) from tab_user_play_info as ti where ti.create_device_number = tab_user_play_info.create_device_number and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $begTime . $newWhere . ') as old_num';
$list['new_device_num'] = count($userPlayInfoModel
->field($newDeviceSql)
->where($userPlayInfoWhere)
->group('tab_user_play_info.create_device_number')
->having('old_num = 0')
->select());//新创角设备
$newIpSql = '(select count(ti.id) from tab_user_play_info as ti where ti.play_ip = tab_user_play_info.play_ip and ti.game_id = tab_user_play_info.game_id and ti.play_time < ' . $begTime . $newWhere . ') as old_num';
$newIpSql = '(select count(ti.id) from tab_user_play_info as ti where ti.create_ip = tab_user_play_info.create_ip and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $begTime . $newWhere . ') as old_num';
$list['new_ip_num'] = count($userPlayInfoModel
->field($newIpSql)
->where($userPlayInfoWhere)
->group('tab_user_play_info.play_ip')
->group('tab_user_play_info.create_ip')
->having('old_num = 0')
->fetchSql(true)
->select());//新增创角IP
@ -1880,6 +1903,7 @@ class QueryController extends BaseController
}
$this->assign('list_data', $spendData);
$this->meta_title = "订单详情";
$this->display('view_spend_detailed');
}
}

@ -3,10 +3,125 @@
namespace Home\Controller;
use Home\Model\SupportModel;
class TestResourceController extends BaseController
{
public function test(){
echo 'test1';
}
public function supportNumberList($p = 1) {
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$map = [];
if(!empty(I('server_name'))){
$map['server_name']=I('server_name');
}
if(!empty(I('game_name'))){
$map['game_name']=I('game_name');
}
if(!empty(I('role_name'))){
$map['tab_support.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
$map['user_account']=I('user_account');
}
if(!empty(I('promote_name'))){
$map['tab_support.promote_account']=I('promote_name');
}
$data = M('support','tab_')
->field('tab_support.id,tab_support.role_name,tab_support.game_name,tab_support.promote_account,tab_support.create_time,user_account,role_name,server_name,freeze,user.device_number')
->join('left join tab_user as user on tab_support.user_id = user.id')
->where($map)
->page($page,$row)
->select();
foreach ($data as $key => $value) {
$data[$key]['create_time'] = date('Y-m-d H:m:i',$value['create_time']);
}
$count = M('support','tab_')
->field('tab_support.role_name,tab_support.game_id,tab_support.promote_id,tab_support.create_time,user_account,role_name,server_name,freeze,user.device_number')
->join('left join tab_user as user on tab_support.user_id = user.id')
->where($map)
->select();
$count = count($count);
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->assign('data',$data);
// var_dump($data);
$this->display();
}
public function freezeSupport() {
$supportId = I('support_id', 0);
if ($supportId == 0) {
$this->ajaxReturn(['status'=>0,'msg'=>"参数错误"]);
}
$isFreeze = D('support')->froze($supportId);
if ($isFreeze) {
$this->ajaxReturn(['status'=>1, 'msg'=> '冻结成功']);
} else {
$this->ajaxReturn(['status'=>0, 'msg'=> '冻结失败']);
}
}
public function unfreezeSupport() {
$supportId = I('support_id', 0);
if ($supportId == 0) {
$this->ajaxReturn(['status'=>0,'msg'=>"参数错误"]);
}
$isFreeze = D('support')->unfreeze($supportId);
if ($isFreeze) {
$this->ajaxReturn(['status'=>1, 'msg'=> '启用成功']);
} else {
$this->ajaxReturn(['status'=>0, 'msg'=> '启用失败']);
}
}
public function rechangePassward() {
$supportId = I('support_id', 0);
if ($supportId == 0) {
$this->ajaxReturn(['status'=>0,'msg'=>"参数错误"]);
}
$passward = D('support')->rechangePassward($supportId);
if ($passward) {
$this->ajaxReturn(['status'=>1, 'msg'=> '新密码:'.$passward]);
} else {
$this->ajaxReturn(['status'=>0, 'msg'=> '重置密码失败']);
}
}
/**
* 获取区服列表
* @param $game_id
*/
public function getServer($game_id=""){
$map['game_id']=$game_id;
$map['start_time']=['lt',time()];
if(I('status')==2){
$map['show_status']=1;
}
$data = M('server','tab_')
->field('tab_server.server_name,support_quota')
->where($map)
->join('join tab_game tg ON tg.id=tab_server.game_id')
->select();
$this->AjaxReturn($data);
}
}

@ -0,0 +1,107 @@
<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Home\Model;
use Think\Model;
/**
* 分类模型
*/
class SupportModel extends Model{
protected $_validate = array(
);
protected $_auto = array(
);
/**
* 构造函数
* @param string $name 模型名称
* @param string $tablePrefix 表前缀
* @param mixed $connection 数据库连接信息
*/
public function __construct($name = '', $tablePrefix = '', $connection = '') {
/* 设置默认的表前缀 */
$this->tablePrefix ='tab_';
/* 执行构造方法 */
parent::__construct($name, $tablePrefix, $connection);
}
/**
* 按照时间分组统计注册总数
* @param integer $id 数据库表行id
*/
public function froze($id) {
$data = [
'freeze' => 0
];
return $this->where("id=".$id)->save($data);
}
/**
* 按照时间分组统计注册总数
* @param integer $id 数据库表行id
*/
public function unfreeze($id)
{
$data = [
'freeze' => 1
];
return $this->where("id=".$id)->save($data);
}
public function rechangePassward($id) {
$passward = $this->getRandomPassword(6);
$data = [
'user_password' => base64_encode($passward)
];
if ($this->where("id=".$id)->save($data)) {
return $passward;
} else {
return false;
}
}
private function getRandomPassword($length, $special = true){
$chars = array(
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2',
'3', '4', '5', '6', '7', '8', '9'
);
if($special){
$chars = array_merge($chars, array(
'!', '@', '#', '$', '?', '|', '{', '/', ':', ';',
'%', '^', '&', '*', '(', ')', '-', '_', '[', ']',
'}', '<', '>', '~', '+', '=', ',', '.'
));
}
$charsLen = count($chars) - 1;
shuffle($chars);
$password = '';
for($i=0; $i<$length; $i++){
$password .= $chars[mt_rand(0, $charsLen)];
}
return $password;
}
}

@ -0,0 +1,750 @@
<extend name="Public/promote_base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/20170831/select2.min.css" type="text/css"/>
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style type="text/css">
.trunk-list {
position: relative;
min-height: 66vh;
}
.pagenation {
text-align: center;
line-height: 5vh;
}
.lwx_dialog_prompt .layui-layer-content {
padding-top: 15px;
}
.lwx_dialog_title {
margin: 0;
padding: 0;
}
.launch_platform_prompt .layui-layer-input, .lwx_dialog_input, .lwx_dialog_select, .lwx_dialog_textarea {
display: block;
width: 220px;
height: 32px;
margin: 0 auto;
line-height: 32px;
padding: 0 5px;
border: 1px solid #ccc;
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1) inset;
color: #333;
}
.lwx_dialog_select {
width: 272px;
}
.lwx_dialog_textarea {
height: 64px;
width: 260px;
margin-top: 10px;
resize: none;
}
.lwx_dialog_input {
width: 260px;
margin-top: 10px;
}
.launch_platform_prompt .layui-layer-btn, .lwx_dialog_prompt .layui-layer-btn {
text-align: center;
padding-bottom: 25px;
}
.launch_platform_prompt .layui-layer-btn .layui-layer-btn0, .lwx_dialog_prompt .layui-layer-btn .layui-layer-btn0 {
width: 81%;
line-height: 32px;
height: 32px;
margin: 0;
}
.lwx_dialog_notice {
position: absolute;
bottom: 6px;
left: 20px;
font-size: 12px;
color: #999;
}
.lwx_dialog_prompt .select2-container, .select2-container--default .select2-selection--single {
width: 272px !important;
}
.applycbtn {
display: block;
color: #50B370;
}
textarea {
font-family: inherit;
}
.trunk-content {
margin: 0 2%;
}
.pic-prev:hover, .pic-next:hover {
background-color: #4ac5c3;
}
.add-disable {
color: #999;
}
.detailback {
display:none;
width:100%;
z-index: 999;
top:0px;
left:0px;
position:absolute;
background: rgba(47, 79, 79,0.5);
min-height:900px
}
.detailindex {
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content:center;
align-items:center;
width:50%;
margin-left:25%;
background: white;opacity: 1.0;
min-height:900px;
}
.detailindex img {
width: 100%;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>资料专区</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">资料专区</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<div class="tab marg_top20" style="clear:both;display: flex;">
<form action="{:U('feature',array('row'=>I('get.row'),'type'=>$type))}" method="post" enctype="multipart/form-data"
class="marg_top20">
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询" style="background-color: #62A8EA">
</div>
<div class="form-group normal_space fr">
<select id="game_id" name="game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="">请选择游戏名称</option>
<volist name=":get_promote_serach_game()" id="vo">
<option value="{$vo.id}" title="{$vo.relation_game_name}">{$vo.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fr" style="display: none;">
<input id="promote_role" name="promote_role">
</div>
</form>
</div>
</div>
<div class="trunk-list">
<div class="div_bgtab">
<ul class="game-ul">
<empty name="list_data">
<ul class="game-ul">
<li class="game-li" style="text-align: center;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</li>
</ul>
<else/>
<volist name="list_data" id="vo">
<li class="game-li">
<div class="media">
<div class="img-box" onclick="viewGameDetailed({$vo.id})">
<img src="__ROOT__{$vo.icon|get_cover='path'}" />
</div>
<div class="game-msg" style="width: calc(92% - 90px);">
<h5 class="game-title" style="font-weight: normal">
<if condition="$type eq 10">
《{$vo.relation_game_name}》产品资料
<else/>
《{$vo.game_name}》产品资料
</if>
</h5>
<p><span style="color:#76838F">{$vo.features}</span></p>
<!-- <p>
<if condition="$type eq 10">
<span>平台:<span>Android+ios</span>&nbsp;&nbsp;</span>
<else/>
<span>平台:<span>{:getSDKTypeName($vo['sdk_version'])}</span>&nbsp;&nbsp;</span>
</if>
<span>版本:<span>{$vo.version}</span>&nbsp;&nbsp;</span>
<span>大小:<span>{$vo.game_size}</span>&nbsp;&nbsp;</span>
<span>游戏类型:<span>{$vo.game_type_name}</span>&nbsp;&nbsp;</span>
</p>-->
</div>
<div class="game-operating" style="width: 8%;">
<!--<if condition="$type eq 10">
<if condition="addedAboutDoubleSdk($promoteId,$vo['id']) eq 1">
<span class="add-disable" style="cursor: pointer;">已添加</span>
<else/>
<span onclick="commonApply({$vo.id},this,0,10)" style="cursor: pointer;"><u>添加</u></span>
</if>
<else/>
<if condition="$vo.apply_id_1 gt 0">
<span class="add-disable" style="cursor: pointer;">已添加</span>
<else/>
<span onclick="commonApply({$vo.id},this,0,0)" style="cursor: pointer;"><u>添加</u></span>
</if>
</if>-->
<!--<span onclick="commonApply({$vo.id},this,0,0)" style="cursor: pointer;"><u>查看详情</u></span>-->
<span onclick="lookdetail({$vo.id})" style="cursor: pointer;"><u class="lookdetail">查看详情</u></span>
</div>
</div>
</li>
</volist>
</empty>
</ul>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</div>
</div>
<div class="detailback" id="detailback">
<div class="detailindex" style="">
</div>
</div>
</block>
<block name="script">
<script src="__STATIC__/zeroclipboard/jquery.zclip.min.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
function lookdetail(id) {
$.ajax({
type: "post",
url: "__URL__/backDetailData",
// dataType: "json",
data: {'id': id},
success:function(res) {
console.log(res)
if(res.code == 10000) {
content = res.info;
html = '';
html += content;
$('.detailindex').html(html);$('.detailindex').val();
$('.detailback').css('display','block')
}else {
content = "暂无资料查询";
html = '';
html += content;
$('.detailindex').html(html);$('.detailindex').val();
$('.detailback').css('display','block')
}
},
fail:function(err) {
console.log('err')
}
})
}
window.onload=function(){
var detailback = document.getElementById("detailback");
document.addEventListener("click",function(){
detailback.style.display="none";
});
detailback.addEventListener("click",function(event){
event=event||window.event;
event.stopPropagation();
});
};
</script>
<script type="text/javascript">
var gameScreenshotCount = 0; //游戏截图数量
var newPromoteId = 0;
setValue('sdk_version', {$Think.request.sdk_version |default = '""'});
setValue('game_id', {$Think.request.game_id |default = '""'});
setValue('promote_id', {$Think.request.promote_id |default = '""'});
setValue('enable_status', {$Think.request.enable_status |default = '""'});
setValue('promote_role', {$Think.request.promote_role |default = 1});
setValue('row', '{:I("row",10)}');
$('.btn-role').on('click', function () {
var thisElement = $(this);
if (!thisElement.hasClass('highlight')) {
var promoteRole = thisElement.attr('promote-role');
console.log(promoteRole);
setValue('promote_role', promoteRole);
$('.btn-role').removeClass('highlight');
thisElement.addClass('highlight');
if (promoteRole == 1) {
location.href = "{:U('index', array('type' => $type))}";
} else {
getPromoteListByRole(promoteRole);
}
}
});
function getPromoteListByRole(promoteRole)
{
$.ajax({
type: "post",
url: "__URL__/getPromoteListByRole",
dataType: "json",
data: {'promote_role': promoteRole},
success: function (data) {
var html = '<option value="">请选择渠道</option>';
if (data.length > 0) {
$.each(data, function (index, item) {
var promoteTitle = item['account'] + '(' + item['nickname'] + ')';
html += '<option value="' + item['id'] + '" title="' + promoteTitle + '">';
html += promoteTitle;
html += '</option>';
});
}
$('#promote_id').html(html);
$('#promote_id').val();
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
}
$(document).ready(function () {
$(".select_gallery").select2();
$('.download').click(function (event) {
var href = $(this).attr('href');
if (href == '#') {
layer.msg("暂无下载内容", {icon: 2, time: 1000});
return false;
}
});
$('a.copy').zclip({
path: '__STATIC__/zeroclipboard/ZeroClipboard.swf',
copy: function () {
if ($(this).attr('pack_status') == undefined) {
return $(this).attr('data-url');
} else {
//alert($(this).attr('pack_status'));
switch ($(this).attr('pack_status')) {
case "1":
return $(this).attr('data-url');
break;
default:
layer.msg("尚未打包", {icon: 2});
break;
}
}
},
beforeCopy: function () {
$(this).addClass("proc");
},
afterCopy: function () {
$(this).removeClass("copy");
if ($(this).attr('data-url') == "" || $(this).attr('data-url') == null) {
layer.msg("暂无下载内容", {icon: 2});
} else if ($(this).attr('data-url') == "#") {
layer.msg("暂无原包,无法复制链接", {icon: 2});
} else {
layer.msg("复制成功", {icon: 1, time: 1000});
}
}
});
$('#batch_application').on('click', function () {
var gameid = '';
$(this).closest('.trunk-content').find('table input[class="ids"]:checked').each(function () {
gameid += ',' + $(this).val();
});
gameid = gameid.slice(1);
if (!gameid) {
layer.msg('你还没有选择任何内容!');
} else {
var select = $('#platform_list');
select.find('select').attr('id', 'lwx_dialog_select').addClass('lwx_dialog_select');
layer.confirm(select.html() + '<input id="lwx_dialog_input" type="text" class="lwx_dialog_input" placeholder="可输入其他平台" value=""><textarea class="lwx_dialog_textarea" id="lwx_dialog_textarea" name="remark" placeholder="备注"></textarea>', {
title: '投放平台', zIndex: 1, skin: 'lwx_dialog_prompt', success: function (layero, index) {
layero.append('<p class="lwx_dialog_notice">注:选择后不可修改</p>');
layero.find(".lwx_dialog_select").select2();
}, btn: ['确定']
}, function (index, layero) {
var select = layero.find('#lwx_dialog_select');
var input = layero.find('#lwx_dialog_input');
var textarea = layero.find('#lwx_dialog_textarea');
var val_s = select.val();
var val_i = input.val();
var remark = textarea.val();
if (!val_s && !val_i) {
layer.msg('请输入投放平台', {type: 1, time: 1500}, function (index) {
layer.close(index);
});
select.focus();
return false;
}
$.ajax({
type: "post",
url: "{:U('batch_apply_game')}",
dataType: "json",
data: {game_id: gameid, platform_id: val_s, platform_name: val_i, remark: remark},
success: function (res) {
if (res.status) {
layer.msg(res.msg, {icon: 1});
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg(res.msg, {icon: 2});
}
},
error: function () {
layer.msg('服务器故障', {icon: 5});
}
});
});
}
return false;
});
});
$("#all").click(
function () {
if (this.checked) {
$("input[name='zi']").prop('checked', true)
} else {
$("input[name='zi']").prop('checked', false)
}
}
);
//批量申请
$("#gapply").click(function () {
var chk_value = "";
var pattern_value = "";
$(':checkbox').each(function () {
if ($(this).val() != "" && $(this).prop('checked')) {
chk_value += ("," + $(this).val());
}
});
chk_value = chk_value.substr(1, chk_value.length - 1);
chk_value = chk_value.slice(0);
pattern_value = pattern_value.substr(1, pattern_value.length - 1);
pattern_value = pattern_value.slice(0);
if (chk_value == 0) {
layer.msg('你还没有选择任何内容!');
} else {
$.ajax({
type: "post",
url: "__URL__/gapply",
dataType: "json",
data: {game_id: chk_value},//,pattern:pattern
success: function (res) {
if (res.status) {
layer.msg(res.msg, {icon: 1});
setTimeout(function () {
window.location.reload();
}, 1500);
} else {
layer.msg(res.msg, {icon: 2});
}
},
error: function () {
layer.msg('服务器故障', {icon: 5});
}
})
// $("#gapply").attr('href', '__MODULE__/Apply/gapply/game_id/'+chk_value);//+'/pattern/'+pattern_value
}
});
function errapply($gameid, pattern, obj) {
layer.msg("上级渠道未申请或未通过该游戏,不能申请", {icon: 2});
}
function erapply($gameid, pattern, obj) {
$.ajax({
type: "post",
url: "__URL__/apply",
dataType: "json",
data: {game_id: $gameid, pattern: pattern},
success: function (res) {
if (res.status) {
$(obj).attr("onclick", "").html("<span style='color:#26C7DB'>申请成功</span>").addClass("proc wait");
location.href = "{:U('index')}";
} else {
layer.msg(res.msg, {icon: 2});
}
},
error: function () {
layer.msg('服务器故障', {icon: 5});
}
})
}
function firstapply(gameid, obj, type, version) {
var select = $('#platform_list');
select.find('select').attr('id', 'lwx_dialog_select').addClass('lwx_dialog_select');
layer.confirm(select.html() + '<input id="lwx_dialog_input" type="text" class="lwx_dialog_input" placeholder="可输入其他平台" value=""><textarea class="lwx_dialog_textarea" id="lwx_dialog_textarea" name="remark" placeholder="备注"></textarea>', {
title: '投放平台', zIndex: 1, skin: 'lwx_dialog_prompt', success: function (layero, index) {
layero.append('<p class="lwx_dialog_notice">注:选择后不可修改</p>');
layero.find(".lwx_dialog_select").select2();
}, btn: ['确定']
}, function (index, layero) {
var select = layero.find('#lwx_dialog_select');
var input = layero.find('#lwx_dialog_input');
var textarea = layero.find('#lwx_dialog_textarea');
var val_s = select.val();
var val_i = input.val();
var remark = textarea.val();
if (!val_s && !val_i) {
layer.msg('请输入投放平台', {type: 1, time: 1500}, function (index) {
layer.close(index);
});
select.focus();
return false;
}
$.ajax({
type: 'post',
url: '{:U("apply_game")}',
dataType: 'json',
data: {
game_id: gameid,
sdk_version: version,
platform_id: val_s,
platform_name: val_i,
remark: remark
},
success: function (res) {
if (res.status) {
if (type == 1 && parseInt(res.exist) == 0) {
$(obj).attr("onclick", "").html("<span >审核中</span>").addClass("proc wait");
} else {
$(obj).html("<span >再次申请</span>").addClass("proc wait");
}
layer.msg(res.msg, {icon: 1, time: 1500}, function (index) {
layer.close(index);
});
layer.close(index);
} else {
layer.msg(res.msg, {icon: 2, time: 1500}, function (index) {
layer.close(index);
});
}
},
error: function () {
layer.msg('服务器故障', {icon: 5});
layer.close(index);
}
});
});
}
function commonApply(gameid, obj, type, sdkType) {
var that = $(obj);
if (that.hasClass('no_submit')) {
return false;
}
that.addClass('no_submit');
$.ajax({
type: 'post',
url: '{:U("apply")}',
dataType: 'json',
data: {game_id: gameid, promote_id: {$promoteId}, sdk_type: sdkType},
success: function (res) {
console.log(res);
if (res.status) {
if (type == 1) {
that.attr("onclick", "").html("<span>审核中</span>").addClass("proc wait");
} else {
that.addClass('add-disable');
that.text('已添加');
that.removeAttr('onclick');
}
layer.msg(res.msg, {icon: 1, time: 1500});
} else {
layer.msg(res.msg, {icon: 2, time: 1500});
console.log(res.ret);
}
that.removeClass('no_submit');
},
error: function () {
layer.msg('服务器故障', {icon: 5});
that.removeClass('no_submit');
}
})
}
function yiapply($gameid, obj, type) {
$.ajax({
type: "post",
url: "__URL__/apply",
dataType: "json",
data: {game_id: $gameid},//,pattern:pattern
success: function (res) {
if (res.status) {
if (type == 1) {
$(obj).attr("onclick", "").html("<span style='color:#26C7DB'>审核中</span>").addClass("proc wait");
} else {
$(obj).attr("onclick", "").html("<span style='color:#26C7DB'>申请成功</span>").addClass("proc wait");
}
layer.msg(res.msg, {icon: 1});
} else {
layer.msg(res.msg, {icon: 2});
}
},
error: function () {
layer.msg('服务器故障', {icon: 5});
}
})
}
function package($id, $game_id) {
$.ajax({
type: "post",
url: "__URL__/allpackage",
dataType: "json",
data: {ids: $id, game_id: $game_id},
success: function (result) {
layer.msg(result.info, {icon: 6, time: 3000},
function () {
location.reload();
}
);
},
error: function () {
alert('错误');
}
})
}
//导航高亮
highlight_subnav('{:U("Apply / index")}');
//查看游戏详情
function viewGameDetailed(id) {
$.ajax({
type: "post",
url: "__URL__/viewGameDetailed",
dataType: "json",
data: {'id': id},
success: function (data) {
$('#game_icon').attr('src', data.icon ? data.icon : '');
$('#game_name').text(data.game_name ? data.game_name : '');
$('#version').text(data.version ? data.version : '无');
$('#game_type_name').text(data.game_type_name ? data.game_type_name : '无');
$('#game_size').text(data.game_size ? data.game_size : 0);
$('#create_time').text(data.create_time ? data.create_time : '无');
$('#dow_num').text(data.dow_num ? data.dow_num : 0);
$('#features').text(data.features ? data.features : '无');
gameScreenshotCount = data.screenshot.length; //游戏截图数量
if (gameScreenshotCount > 0) {
var html = '';
$.each(data.screenshot_url, function (index, item) {
html += '<li>';
html += '<img src="' + item + '">';
html += '</li>';
});
$('.game-slide-li').html(html);
}
$('.detail-body').show();
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
}
$('.game-detail-close').on('click', function () {
$('.detail-body').hide();
});
$('.pic-prev').on('click', function () {
var element = $('.game-slides').children('ul');
var oldLeft = element.position().left;
var newLeft = oldLeft + 280;
if (newLeft <= 0 && newLeft % 1 === 0) {
element.css('left', newLeft);
}
});
$('.pic-next').on('click', function () {
var element = $('.game-slides').children('ul');
var oldLeft = element.position().left;
var newLeft = oldLeft - 280;
var minLeft = -(gameScreenshotCount * 280 -560);
if (newLeft >= minLeft && newLeft % 1 === 0) {
element.css('left', newLeft);
}
});
$('.pack-inner').hover(function () {
var element = $(this);
$('.pack-inner').children('.pack-word').hide();
element.children('.pack-word').show();
});
$('#promote_id').on('change', function () {
newPromoteId = $(this).val();
});
</script>
</block>

@ -108,7 +108,7 @@
<div class="page-list normal_list apply-index-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>游戏列表</span></div>
<div class="location-container">当前位置:<span>游戏管理></span><span>{$position}</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">游戏列表</span>
</div>
@ -118,37 +118,31 @@
<eq name="type" value="0">
<a href="javascript:;" class="current">全部游戏</a>
<else/>
<a href="{:U('index')}" class="">全部游戏</a>
<a href="{:U($game)}" class="">全部游戏</a>
</eq>
<eq name="type" value="10">
<a href="javascript:;" class="current">Android+ios游戏</a>
<else/>
<a href="{:U('index', array('type' => 10))}" class="">Android+ios游戏</a>
<a href="{:U($game, array('type' => 10))}" class="">Android+ios游戏</a>
</eq>
<eq name="type" value="2">
<a href="javascript:;" class="current">IOS游戏</a>
<else/>
<a href="{:U('index', array('type' => 2))}" class="">IOS游戏</a>
<a href="{:U($game, array('type' => 2))}" class="">IOS游戏</a>
</eq>
<eq name="type" value="1">
<a href="javascript:;" class="current">Android游戏</a>
<else/>
<a href="{:U('index', array('type' => 1))}" class="">Android游戏</a>
<a href="{:U($game, array('type' => 1))}" class="">Android游戏</a>
</eq>
<a href="{:U('my_game')}" class="">我的游戏</a>
<a href="{:U($myGame)}" class="">我的游戏</a>
</div>
<div class="tab marg_top20" style="clear:both;display: flex;">
<!-- <if condition="C('LAUNCH_SWITCH') eq 1">-->
<!-- <a href="#" class="btn_calc" id="batch_application" style="color:#fff;border: 1px solid #3A97FF;">批量申请</a>-->
<!-- <else/>-->
<!-- <a href="#" class="examine_a examine_aon" id="gapply" style="color:#fff;border: 1px solid #3A97FF;background: #3A97FF;">批量申请</a>-->
<!-- </if>-->
<div style="display: flex;">
<if condition="$promoteRole eq 1">
<div class="btn btn-role highlight" promote-role="1">
@ -186,7 +180,7 @@
</div>
</div>
<form action="{:U('index',array('row'=>I('get.row'),'type'=>$type))}" method="post" enctype="multipart/form-data"
<form action="{:U($game,array('row'=>I('get.row'),'type'=>$type))}" method="post" enctype="multipart/form-data"
class="marg_top20">
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询">
@ -434,7 +428,7 @@
thisElement.addClass('highlight');
if (promoteRole == 1) {
location.href = "{:U('index', array('type' => $type))}";
location.href = "{:U($game, array('type' => $type))}";
} else {
getPromoteListByRole(promoteRole);
}
@ -640,7 +634,7 @@
success: function (res) {
if (res.status) {
$(obj).attr("onclick", "").html("<span style='color:#26C7DB'>申请成功</span>").addClass("proc wait");
location.href = "{:U('index')}";
location.href = "{:U($game)}";
} else {
layer.msg(res.msg, {icon: 2});
}
@ -800,7 +794,7 @@
}
//导航高亮
highlight_subnav('{:U("Apply / index")}');
highlight_subnav('{:U("Apply/".$game)}');
//查看游戏详情
function viewGameDetailed(id) {

@ -92,17 +92,17 @@
<div class="page-list normal_list apply-my_game-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>我的游戏</span></div>
<div class="location-container">当前位置:<span>游戏管理></span><span>{$position}</span></div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">游戏列表</span>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">我的游戏</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<div class="tab">
<a href="{:U('index')}" class="">全部游戏</a>
<a href="{:U('index', array('type' => 10))}" class="">Android+ios游戏</a>
<a href="{:U('index', array('type' => 2))}" class="">IOS游戏</a>
<a href="{:U('index', array('type' => 1))}" class="">Android游戏</a>
<a href="{:U($game)}" class="">全部游戏</a>
<a href="{:U($game, array('type' => 10))}" class="">Android+ios游戏</a>
<a href="{:U($game, array('type' => 2))}" class="">IOS游戏</a>
<a href="{:U($game, array('type' => 1))}" class="">Android游戏</a>
<a href="javascript:;" class="current">我的游戏</a>
<!-- <a href="javascript:void(0);" title="集成推广多款游戏,生成游戏大全推广页" style="background:#ffffff;width:68px;height:68px; position:relative" onmouseover="this.style.background='#E3E5E4'" onmouseout="this.style.background='#ffffff'" class="spread"><img src="/Public/Home/images/generalization.png" />
<img src="/Public/Home/images/hot.png" style="width: 20px;
@ -156,7 +156,7 @@
<!-- <a class="btn_calc" href="javascript:;">审核通过</a>-->
<!-- <a class="btn_calc examine_a" href="{:U('my_game_ch')}">审核中</a>-->
<!-- </div>-->
<form class="marg_top20" action="{:U('my_game',array('row'=>I('get.row')))}" method="post"
<form class="marg_top20" action="{:U($myGame,array('row'=>I('get.row')))}" method="post"
enctype="multipart/form-data">
<div class="form-group normal_space fr">
<input type="submit" class="submit zwm_submit" value="查询">
@ -488,7 +488,7 @@
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
highlight_subnav("{:U('Apply/index')}");
highlight_subnav("{:U('Apply/'.$game)}");
setValue('type', {$Think.request.type |default = '""'});
setValue('sdk_version', {$Think.request.sdk_version |default = '""'});
setValue('promote_id', {$Think.request.promote_id |default = '""'});
@ -522,7 +522,7 @@
thisElement.addClass('highlight');
if (promoteRole == 1) {
location.href = "{:U('my_game')}";
location.href = "{:U($myGame)}";
} else {
getPromoteListByRole(promoteRole);
}

@ -0,0 +1,319 @@
<extend name="Public/promote_base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/20170831/select2.min.css" type="text/css"/>
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.css" rel="stylesheet">
<link href="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style type="text/css">
.trunk-list {
position: relative;
min-height: 66vh;
}
.pagenation {
text-align: center;
line-height: 5vh;
}
.lwx_dialog_prompt .layui-layer-content {
padding-top: 15px;
}
.lwx_dialog_title {
margin: 0;
padding: 0;
}
.launch_platform_prompt .layui-layer-input, .lwx_dialog_input, .lwx_dialog_select, .lwx_dialog_textarea {
display: block;
width: 220px;
height: 32px;
margin: 0 auto;
line-height: 32px;
padding: 0 5px;
border: 1px solid #ccc;
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1) inset;
color: #333;
}
.lwx_dialog_select {
width: 272px;
}
.lwx_dialog_textarea {
height: 64px;
width: 260px;
margin-top: 10px;
resize: none;
}
.lwx_dialog_input {
width: 260px;
margin-top: 10px;
}
.launch_platform_prompt .layui-layer-btn, .lwx_dialog_prompt .layui-layer-btn {
text-align: center;
padding-bottom: 25px;
}
.launch_platform_prompt .layui-layer-btn .layui-layer-btn0, .lwx_dialog_prompt .layui-layer-btn .layui-layer-btn0 {
width: 81%;
line-height: 32px;
height: 32px;
margin: 0;
}
.lwx_dialog_notice {
position: absolute;
bottom: 6px;
left: 20px;
font-size: 12px;
color: #999;
}
.lwx_dialog_prompt .select2-container, .select2-container--default .select2-selection--single {
width: 272px !important;
}
.applycbtn {
display: block;
color: #50B370;
}
textarea {
font-family: inherit;
}
.trunk-content {
margin: 0 2%;
}
.pic-prev:hover, .pic-next:hover {
background-color: #4ac5c3;
}
.add-disable {
color: #999;
}
.input-number {
width: 80px;
text-align: center;
}
.input-security {
width: 500px;
height: 2.5rem;
padding-left: 10px;
border-radius: 5px;
border: 0;
}
.btn-security {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #358fe4;
color: #fff;
}
.btn-security-close {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #fff;
color: #999;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>分成比例</span></div>
</div>
<if condition="isset($dataList)">
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">分成比例</span>
<else/>
<span class="title_main">安全密码</span>
</if>
</div>
<div class="trunk-content article">
<if condition="isset($dataList)">
<div class="trunk-search clearfix">
<div class="tab marg_top20" style="clear:both;display: flex;"></div>
<form action="{:U('index',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"
class="marg_top20" style="float: left;">
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="">请选择游戏</option>
<volist name=":get_promote_serach_game()" id="vo">
<option value="{$vo.relation_game_id}" title="{$vo.relation_game_name}">{$vo.relation_game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width:215px;">
<option value="0">请选择设备类型</option>
<volist name=":getSDKType()" id="vo" key="k">
<option value="{$k}">{$vo}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<label class="form-title select-title" style="position: relative;">分成比例:</label>
<div class="select-time">
<input type="text" id="min_ratio" class="txt input-number" name="min_ratio" placeholder="" value="{:I('min_ratio')}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" id="max_ratio" class="txt input-number" name="max_ratio" placeholder="" value="{:I('max_ratio')}">
</div>
</div>
<div class="form-group normal_space fl">
<div style="display: flex;">
<div class="btn btn-role <if condition='$serverType eq 0'>highlight</if>" server-type="0">
<p>全部</p>
</div>
<div class="btn btn-role <if condition='$serverType eq 2'>highlight</if>" style="border-left: 0;border-right: 0;" server-type="2">
<p>混服</p>
</div>
<div class="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1">
<p>专服</p>
</div>
</div>
</div>
<div class="form-group normal_space fl" style="display: none;">
<input id="server_type" name="server_type">
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" value="查询">
</div>
</form>
</div>
<div class="trunk-list">
<div class="div_bgtab">
<table class="table normal_table zwm_tab">
<tr class="odd <if condition='get_parent_id(PID) eq 0'>pid</if> zwm_tr">
<th>游戏图标</th>
<th>游戏名称</th>
<th>游戏类型</th>
<th>平台</th>
<th>混服情况</th>
<th>玩家折扣</th>
<th>分成比例</th>
</tr>
<empty name="dataList">
<tr>
<td colspan="7" 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="dataList" id="vo">
<tr>
<td><img src="__ROOT__{$vo.icon|get_cover='path'}" style="width: 50px;height: 50px;border-radius: 8px;"/></td>
<td>{$vo.game_name}</td>
<td>{$vo.game_type_name}</td>
<td>{:getSDKTypeName($vo['sdk_version'])}</td>
<td><?=($vo['server_type']==1)?'专服':'混服'?></td>
<td><?=($vo['discount']==10)?'----':($vo['discount'].'折')?></td>
<td>{$vo.ratio}%</td>
</tr>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
<else/>
<div class="trunk-search clearfix" style="display: table-caption;">
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;">安全密码:</label>
<div class="detailed-content-box">
<input class="input-security" id="security_password" type="password" placeholder="安全密码">
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label>
<div class="detailed-content-box" style="display: flex;width: 100%;">
<button class="btn-security" style="margin-right: 20px;">确定</button>
<button class="btn-security-close">取消</button>
</div>
</div>
</div>
</if>
</div>
</div>
</block>
<block name="script">
<script src="__STATIC__/zeroclipboard/jquery.zclip.min.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
setValue('relation_game_id', {$Think.request.relation_game_id |default = '""'});
setValue('sdk_version', {$Think.request.sdk_version |default = '""'});
setValue('server_type', {$Think.request.server_type |default = 0});
setValue('row', '{:I("row",10)}');
$('.btn-role').on('click', function () {
var thisElement = $(this);
if (!thisElement.hasClass('highlight')) {
var serverType = thisElement.attr('server-type');
console.log(serverType);
setValue('server_type', serverType);
$('.btn-role').removeClass('highlight');
thisElement.addClass('highlight');
}
});
$(document).ready(function () {
$(".select_gallery").select2();
$('.btn-security').on('click', function () {
var password = $('#security_password').val();
$.ajax({
type: "post",
url: "__URL__/verifyPassword",
dataType: "json",
data: {'password': password},
success: function (data) {
if (data.status == 1) {
window.location.reload();
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
$('.btn-security-close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
});
</script>
</block>

@ -237,7 +237,7 @@
});
var dataIndex = getVs();
$('#data-' + dataIndex).css('display','unset');
$('#data-' + dataIndex).show();
$.ajax({
url: "{:U('Home/generateWechatSign')}",

@ -0,0 +1,240 @@
<extend name="Public/promote_base"/>
<block name="css">
<link rel="stylesheet" href="__CSS__/20170831/select2.min.css" type="text/css"/>
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.css" rel="stylesheet">
<link href="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style type="text/css">
.trunk-list {
position: relative;
min-height: 66vh;
}
.pagenation {
text-align: center;
line-height: 5vh;
}
.lwx_dialog_prompt .layui-layer-content {
padding-top: 15px;
}
.lwx_dialog_title {
margin: 0;
padding: 0;
}
.launch_platform_prompt .layui-layer-input, .lwx_dialog_input, .lwx_dialog_select, .lwx_dialog_textarea {
display: block;
width: 220px;
height: 32px;
margin: 0 auto;
line-height: 32px;
padding: 0 5px;
border: 1px solid #ccc;
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1) inset;
color: #333;
}
.lwx_dialog_select {
width: 272px;
}
.lwx_dialog_textarea {
height: 64px;
width: 260px;
margin-top: 10px;
resize: none;
}
.lwx_dialog_input {
width: 260px;
margin-top: 10px;
}
.launch_platform_prompt .layui-layer-btn, .lwx_dialog_prompt .layui-layer-btn {
text-align: center;
padding-bottom: 25px;
}
.launch_platform_prompt .layui-layer-btn .layui-layer-btn0, .lwx_dialog_prompt .layui-layer-btn .layui-layer-btn0 {
width: 81%;
line-height: 32px;
height: 32px;
margin: 0;
}
.lwx_dialog_notice {
position: absolute;
bottom: 6px;
left: 20px;
font-size: 12px;
color: #999;
}
.lwx_dialog_prompt .select2-container, .select2-container--default .select2-selection--single {
width: 272px !important;
}
.applycbtn {
display: block;
color: #50B370;
}
textarea {
font-family: inherit;
}
.trunk-content {
margin: 0 2%;
}
.pic-prev:hover, .pic-next:hover {
background-color: #4ac5c3;
}
.add-disable {
color: #999;
}
.input-number {
width: 80px;
text-align: center;
}
.input-security {
width: 500px;
height: 2.5rem;
padding-left: 10px;
border-radius: 5px;
border: 0;
}
.btn-security {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #358fe4;
color: #fff;
}
.btn-security-close {
width: 300px;
height: 2.4rem;
border: 0;
border-radius: 5px;
background-color: #fff;
color: #999;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>设置</span></div>
</div>
<if condition="isset($data)">
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">设置</span>
<else/>
<span class="title_main">安全密码</span>
</if>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix" style="display: table-caption;">
<if condition="isset($data)">
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;">下级账号游戏展示:</label>
<div class="detailed-content-box">
<label style="margin-right: 20px;">
<input name="child_game_permission" value="1" type="radio" <if condition="$data.child_game_permission eq 1">checked</if>> 所有游戏
</label>
<label>
<input name="child_game_permission" value="0" type="radio" <if condition="$data.child_game_permission eq 0">checked</if>> 会长已添加游戏
</label>
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;"></label>
<div class="detailed-content-box" style="display: flex;">
<button class="btn-security" id="btn_save" style="margin-right: 20px;width: 200px;">保存</button>
</div>
</div>
<else/>
<div class="tab detailed-box" style="margin-top: 40px;align-items: center;">
<label class="detailed-title detailed-label" style="margin-right: 20px;">安全密码:</label>
<div class="detailed-content-box">
<input class="input-security" id="security_password" type="password" placeholder="安全密码">
</div>
</div>
<div class="tab detailed-box">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label>
<div class="detailed-content-box" style="display: flex;width: 100%;">
<button class="btn-security" id="btn_security" style="margin-right: 20px;">确定</button>
<button class="btn-security-close" id="btn_security_close">取消</button>
</div>
</div>
</if>
</div>
</div>
</div>
</block>
<block name="script">
<script src="__STATIC__/zeroclipboard/jquery.zclip.min.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#btn_security').on('click', function () {
var password = $('#security_password').val();
$.ajax({
type: "post",
url: "{:U('GameDivide/verifyPassword')}",
dataType: "json",
data: {'password': password},
success: function (data) {
if (data.status == 1) {
window.location.reload();
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
$('#btn_security_close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
$('#btn_save').on('click', function () {
var childGamePermission = $('input[name=child_game_permission]:checked').val();
$.ajax({
type: "post",
url: "{:U('setChildGamePermission')}",
dataType: "json",
data: {'child_game_permission': childGamePermission},
success: function (data) {
if (data.status == 1) {
layer.msg(data.msg, {icon: 1});
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
});
</script>
</block>

@ -47,12 +47,12 @@
<a href="{:U('Promote/mygrand')}" class="<if condition='CONTROLLER_NAME eq Promote and (ACTION_NAME eq mygrand or ACTION_NAME eq add_chlid or ACTION_NAME eq edit_chlid) '>active</if> ">推广员管理</a>
</if>
</div>
<!-- <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>-->
<!-- <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>-->
<!-- <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>-->
<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>
<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>
<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>
<!-- <a href="{:U('Query/arpu_analysis')}" class="<if condition='CONTROLLER_NAME eq Query and ACTION_NAME eq arpu_analysis '>active</if> ">ARPU统计</a>-->
<!-- <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>-->
@ -66,11 +66,16 @@
<!-- <lt name="Think.const.PRO_GRADE" value="3"> -->
<!-- <a href="{:U('Query/son_earning')}" class="<if condition='CONTROLLER_NAME eq Query and (ACTION_NAME eq son_earning or ACTION_NAME eq son_list)'>active</if> ">子渠道结算</a> -->
<!-- </lt> -->
<!-- </div> -->
</div>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>游戏管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Apply/index')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq index or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">专服管理</a>
<a href="{:U('Apply/gameSpecialList')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq gameSpecialList or ACTION_NAME eq specialMyGameList) '>active</if> ">专服管理</a>
<a href="{:U('Apply/gameList')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq gameList or ACTION_NAME eq myGameList) '>active</if> ">混服管理</a>
<if condition="getParentPromoteId(PID) eq 0">
<a href="{:U('GameDivide/index')}" class="<if condition='CONTROLLER_NAME eq GameDivide and (ACTION_NAME eq index) '>active</if> ">分成比例</a>
<a href="{:U('Promote/setChildGamePermission')}" class="<if condition='CONTROLLER_NAME eq Promote and (ACTION_NAME eq setChildGamePermission) '>active</if> ">设置</a>
</if>
</div>
<!-- <eq name="parent_id" value="0">

@ -55,11 +55,11 @@
<div class="page-search normal_list query-recharge-search">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>充值明细</span></div>
<div class="location-container">当前位置:<span>数据管理></span><span>订单查询</span></div>
</div>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">充值明细</span>
<span class="details">对所有渠道用户玩家产生的充值信息,进行记录的功能</span>
<span class="title_main">订单数据</span>
<span class="details">对所有渠道用户玩家产生的订单信息,进行记录的功能</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
@ -175,8 +175,8 @@
<tr class="odd">
<th>玩家账号</th>
<th>游戏订单</th>
<th>订单金额</th>
<th>支付方式</th>
<th>订单金额</th>
<th>游戏名称</th>
<th>区服</th>
<th>角色名</th>
@ -199,17 +199,17 @@
<tr class="num2">
<td>{$vo.user_account}</td>
<td>{$vo.order_number}</td>
<td>{$vo.pay_amount}</td>
<td>{:get_pay_way($vo['pay_way'])}</td>
<td>{$vo.pay_amount}</td>
<td>{$vo.game_name}</td>
<td>{$vo.server_name}</td>
<td>{$vo.game_player_name}</td>
<empty name="ownId">
<empty name="vo.pro_grand_id">
<td>{$vo.pro_account}({$vo.pro_real_name})</td>
<td></td>
<td>{$vo.pro_account}({$vo.pro_real_name})</td>
<else/>
<td></td>
<td>{$vo.p_pro_account}({$vo.p_pro_real_name})</td>
<td>{$vo.pro_account}({$vo.pro_real_name})</td>
</empty>
</empty>

@ -33,7 +33,7 @@
</div>
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>充值明细></span><span>查看详细</span></div>
<div class="location-container">当前位置:<span>数据管理></span><span>订单查询></span><span>查看详细</span></div>
</div>
<span class="title_main">订单详情</span>
</div>

@ -0,0 +1,442 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/manager.css" rel="stylesheet" >
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<style>
.page-list .trunk-search{
padding-top: 20px;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list apply-app_apply-list">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>测试资源管理></span><span>扶持号管理</span></div>
</div>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">扶持号管理</span>
<span class="details">说明:扶持号管理</span>
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<!-- <br><br><br>-->
<div id="form1">
<div class="form-group normal_space fl">
<select id="game_id" name="game_name" class="reselect select_gallery" >
<option game-id="0" value="">请选择游戏</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}" <if condition="$_GET['game_name'] eq $vo['game_name']">selected="selected"</if>>{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="form-group normal_space fl">
<span id="server_js">
<select id="server_id" name="server_name" class="reselect select_gallery" style="width:101px">
<option game-id="0" value="">请选择区服</option>
<volist name=":getServer_name_on($_GET['game_name'])" id="vo">
<option value="{$vo.server_name}" <if condition="$_GET['server_name'] eq $vo['server_name']">selected="selected"</if>>{$vo.server_name}</option>
</volist>
</select>
</span>
</div>
<div class="form-group normal_space fl">
<input type="text" name="role_name" class="txt normal_txt" style="width:110px;" placeholder="角色名" value="{:I('role_name')}" onKeyDown="webchat_chkkeysend(event);">
</div>
<div class="form-group normal_space fl">
<input type="text" name="user_account" class="txt normal_txt" style="width:110px;" placeholder="测试账号" value="{:I('user_account')}" onKeyDown="webchat_chkkeysend(event);">
</div>
<div class="form-group normal_space fl">
<input type="text" name="promote_name" class="txt normal_txt" style="width:110px;" placeholder="推广员" value="{:I('promote_name')}" onKeyDown="webchat_chkkeysend(event);">
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' value="查询" url="{:U('supportNumberList',['type'=>I('type')])}" style="cursor:pointer;">
</div>
<!-- <div class="form-group normal_space fl" style="margin-left: 9px;">-->
<!-- <label class="form-title select-title" style="margin-right: 9px;">至</label>-->
<!-- <div class="select-time">-->
<!-- <input type="text" id="edate" class="txt" name="end" placeholder="结束时间" value="{:I('end')}">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group normal_space fl">-->
<!-- <label class="form-title select-title">申请时间:</label>-->
<!-- <div class="select-time">-->
<!-- <input type="text" id="sdate" class="txt" name="start" placeholder="开始时间" value="{:I('start')}" >-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="form-group normal_space fl">-->
<!-- <input type="text" name="user_account" class="txt normal_txt" id="uid" style="width:110px;" placeholder="请输入玩家账号" value="{:I('user_account')}" onKeyDown="webchat_chkkeysend(event);">-->
<!-- </div>-->
</div>
</div>
</div>
<div class="page-list apply-app_apply-list query-recharge-list">
<div class="trunk-content article">
<div class="tabcon trunk-list">
<table class="table normal_table zwm_tab">
<tr class="odd zwm_tr">
<th>产品名称</th>
<th>区服</th>
<th>测试账号</th>
<th>所属推广员</th>
<th>角色名称</th>
<th>设备信息</th>
<th>状态</th>
<th>创建时间</th>
<th>操作</th>
</tr>
<empty name="data">
<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>
<else />
<volist name="data" id="s" mod="2">
<tr data-id="{$s.id}" class="<eq name='mod' value='1'>odd</eq>">
<td>{$s.game_name}</td>
<td>{$s.server_name}</td>
<td>{$s.user_account}</td>
<td>{$s.promote_account}</td>
<td>{$s.role_name}</td>
<td>
<if condition="$s['device_number'] eq ''">尚未登录,无设备号
<else/>{$s.device_number}
</if>
</td>
<td>
<if condition="$s['freeze'] eq 0">冻结
<else/>启用
</if>
</td>
<td>{$s.create_time}</td>
<td>
<if condition="$s['freeze'] eq 1">
<a href="javascript:;" class="froze-btn editbtn">冻结</a>
<else/>
<a href="javascript:;" class="unfroze-btn editbtn">启用</a>
</if>
<a href="javascript:;" class="changePassward-btn editbtn">重置密码</a>
</td>
</tr>
</volist>
</empty>
</table>
<div class="pagenation clearfix">{$_page}</div>
</div>
</div>
</div>
</div>
</block>
<block name="script">
<link rel="stylesheet" type="text/css" href="__CSS__/p_jquery.datetimepicker.css">
<script type="text/javascript" src="__JS__/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript">
$().ready(function(){
setValue('row','{:I("get.row",10)}');
$("#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();
});
$('#sdate').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d',
timepicker:false
});
$('#add').click(function(){
var url = $(this).attr('url');
window.location.href = url;
});
$('.apply').click(function(){
var id = $(this).attr('data-id');
var url = "{:U('apply','','')}"+'/id/'+id;
window.location.href = url;
});
$('.open_edit').click(function(){
var account=$(this).attr('data-account');
var password=$(this).attr('data-password');
var game_name=$(this).attr('data-game_name');
var server_name=$(this).attr('data-server_name');
var role_name=$(this).attr('data-role_name');
var support_id=$(this).attr('data-support_id');
$('#i_account').val(account);
$('#i_password').val(password);
$('#i_game_name').val(game_name);
$('#i_server_name').val(server_name);
$('#i_role_name').val(role_name);
$('#i_support_id').val(support_id);
var id_editor= '.div_editor';
//页面层
layer.open({
type: 1,
title: '新增扶持-修改',
closeBtn: 1,
area: ['600px','580px'],
//skin: 'layui-layer-bgwhite', //白色背景色
shadeClose: true,
content: $(id_editor),
})
});
$('.i_save').click(function () {
var id = $('#i_support_id').val();
var role_name =$('#i_role_name').val();
var user_password = $('#i_password').val();
if(role_name==''){
layer.msg('角色名不能为空');
return false;
}
if(user_password==''){
layer.msg('密码不能为空');
return false;
}
$.ajax({
async: false,
url:"{:U('support_edit')}",
type:"POST",
dataType:"json",
data:{id:id,role_name:role_name,user_password:user_password},
success:function(result){
if(result.status==0){
layer.msg(result.msg,{icon: 2});
}else{
layer.msg('修改成功');
setTimeout(function(){
location.reload();
},1000);
}
},
error:function(){
}
});
});
$('.i_cancel').click(function () {
location.reload();
});
$(".select_gallery").select2();
$('#edate').datetimepicker({
lang:'ch',
format:'Y-m-d',
formatDate:'Y-m-d',
timepicker:false
});
});
</script>
<script type="text/javascript">
$("#submit").click(function(){
var sdate =$('#sdate').val();
var edate =$('#edate').val();
if(Date.parse(sdate) > Date.parse(edate)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
var url = $(this).attr('url');
var query = $('#form1').find('input').serialize();
query += "&"+$('#form1').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
query = query.replace(/^&/g,'');
if( url.indexOf('?')>0 ){
url += '&' + query;
}else{
url += '?' + query;
}
window.location.href = url;
});
$("#game_id").change(function(){
$.ajax({
url:"{:U('getServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
console.log(data);
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
})
$("#server_js").click(function(event) {
var game_id=$("#game_id").val();
if(game_id==0){
layer.msg('请先选择游戏');
}
});
function webchat_chkkeysend(event)
{
if (event.keyCode==13) {
$('#submit').click();
}
}
$('.froze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认冻结帐号?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('TestResource/freezeSupport')}",
data: {support_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.unfroze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认启用帐号?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('TestResource/unfreezeSupport')}",
data: {support_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.unfroze-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认启用帐号?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('TestResource/unfreezeSupport')}",
data: {support_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
$('.changePassward-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
layer.confirm('是否确认重置账号密码?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:U('TestResource/rechangePassward')}",
data: {support_id: id},
type: 'post',
dataType: 'json',
success: function(response) {
console.log(response)
layer.confirm(response.msg, {icon: 3, title:'提示'}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
</script>
</block>

@ -19,20 +19,26 @@ class SsgController extends BaseController {
const RETURN_FALSE = 2;
public function login(){
public function login()
{
$promoteId = I("promote_id", 0);
$user = session("user_auth");
$promoteId = I("promote_id");
if (!$promoteId) {
$this->error("参数非法");
}
$exists = M("promote", "tab_")->where(array('id' => $promoteId))->find();
if (!$exists) {
$this->error("参数非法.");
if ($user) {
redirect(U("ssg/index", array('promete_id' => $promoteId)));
}
/*if ($user) {
redirect(U("ssg/index"));
/*if (!$promoteId) {
echo "链接失效,请重新向推广员索取链接。";
exit();
$this->error("参数非法");
}*/
if ($promoteId) {
$exists = M("promote", "tab_")->where(array('id' => $promoteId))->find();
if (!$exists) {
$this->error("链接失效,请重新向推广员索取链接.");
}
}
$this->assign("promote_id", $promoteId);
$this->display();
}
@ -46,13 +52,16 @@ class SsgController extends BaseController {
{
$account = I("Account");
$password = I("Password");
$promoteId = I("promote_id");
if (!$promoteId) {
$promoteId = I("promote_id", 0);
/*if (!$promoteId) {
$this->ajaxReturn(array("ErrorCode" => -97, "ResultMsg" => "参数非法"));
}
$promote = M("promote", "tab_")->where(array('id' => $promoteId))->find();
if (!$promote) {
$this->ajaxReturn(array("ErrorCode" => -97, "ResultMsg" => "参数非法."));
}*/
$promote = array();
if ($promoteId) {
$promote = M("promote", "tab_")->where(array('id' => $promoteId))->find();
if (!$promote) {
$this->ajaxReturn(array("ErrorCode" => -97, "ResultMsg" => "参数非法."));
}
}
//var_dump($password);
@ -85,7 +94,7 @@ class SsgController extends BaseController {
$user = M('user', 'tab_')->where(array(
'id' => $user_id
))->find();
if (!$user['promote_id']) {
if (!$user['promote_id'] && $promote) {
M('user', 'tab_')->where(array(
'id' => $user_id
))->save(array(

@ -231,7 +231,7 @@ class UserController extends BaseController
$userData = M('User', 'tab_')->where($whereUser)->find();
if (!empty($userData)) {
if (empty($userData['promote_id'])) {
if (empty($userData['promote_id']) && empty($userData['promote_account'])) {
$saveData['promote_id'] = $promoteId;
$saveData['promote_account'] = $promoteData['account'];

@ -38,7 +38,7 @@
</ul>
</div>
<div class="login-btn"><a href="javascript:;" onclick="Login()">登录</a></div>
<div style="padding-top: 0.2rem;" class="login-btn"><a href="https://m.wmtxkj.com/mobile.php?s=/User/step1.html">注册</a></div>
<div style="padding-top: 0.2rem;" class="login-btn"><a href="/mobile.php?s=/User/step1.html">注册</a></div>
</div>
</div>
</body>

@ -7,8 +7,16 @@ use Mobile\Controller\SsgController;
// a8eeac3335cef5ee117d357738598f691932513b
class Ipa365Controller extends BaseController{
const signprice = 10; // 超级签价格
public $userinfo;
public function __construct() {
$this->userinfo = $_SESSION['onethink_home']['user_auth'];
parent::__construct();
}
public function test(){
$user = $this->userinfo;
pp($user);
die();
$ipa365 = new Ipa365Controller();
$result = $ipa365->pay_notify(array(
@ -95,7 +103,7 @@ class Ipa365Controller extends BaseController{
* 发起支付
*/
public function pay() {
$userId = $_SESSION['user_id'];
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
@ -165,8 +173,13 @@ class Ipa365Controller extends BaseController{
}
// 微信分享页面
public function paytip(){
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
$orderId = I('order_id');
$payLog = M('game_supersign', 'tab_')->where(array(
@ -214,11 +227,15 @@ class Ipa365Controller extends BaseController{
public function install_show() {
$orderId = I('order_id', 0);
$gameId = I('game_id', 0);
$userId = I('user_id', 0);
/* $userId = I('user_id', 0);
$user = M('user', 'tab_')->where(array(
'id' => $userId
))->find();
))->find(); */
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
// $userId = $_SESSION['user_id'];
if (!$userId ) {
@ -250,7 +267,7 @@ class Ipa365Controller extends BaseController{
* 获取用户安装历史url
*/
public function get_install_list() {
$gameId = I('game_id', 0);
/* $gameId = I('game_id', 0);
$where = array(
'pay_status' => 1,
'ticket' => array('neq', '')
@ -261,14 +278,14 @@ class Ipa365Controller extends BaseController{
// pp($list);
$url = $game['supersign_url']."?code={$code}";
pp($url);
redirect($url);
redirect($url); */
}
/**
* 用户点击安装
*/
public function install() {
$userId = I('user_id', 0);
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
@ -342,7 +359,11 @@ class Ipa365Controller extends BaseController{
* 打包列表
*/
public function pay_list() {
$userId = 0;
$userId = $this->userinfo['user_id'];
if (!$userId ) {
$this->error("请登入", "/mobile.php/ssg/login");
}
$list = M('game_supersion', 'tab_')->where(array(
'user_id' => $userId,
))->select();

@ -119,7 +119,7 @@ class PromoteApi extends Api{
return $this->model->verifyUser($uid,$password_in);
}
public function verify_er_User($uid, $password_in){
return $this->model->verifyUser($uid,$password_in);
return $this->model->verify_er_User($uid,$password_in);
}

@ -63,5 +63,20 @@ INSERT INTO `tab_promote_quick_menu` VALUES ('18', '1', '1', '1569720739');
alter table tab_game_source add column `original_url` varchar(255) NOT NULL default '' COMMENT '原包路径';
alter table tab_game_source add column `org_plist_url` varchar(255) NOT NULL default '' COMMENT '原包Plist路径';
-- ----------------------------
-- 2019-10-08 cxj
-- ----------------------------
ALTER TABLE `tab_game` ADD COLUMN `server_type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '1-专服 2-混服' AFTER `support_ratio`;
ALTER TABLE `tab_game` ADD COLUMN `detail_content` MEDIUMTEXT NULL DEFAULT NULL COMMENT '游戏资料介绍' AFTER `features`;
-- ----------------------------
-- 2019-10-10 cxj
-- ----------------------------
ALTER TABLE `tab_promote` ADD COLUMN `child_game_permission` tinyint(2) NOT NULL DEFAULT 0 COMMENT '下级游戏添加权限 0-本账号已添加游戏 1-所有游戏' AFTER `idcard`;
-- ----------------------------
-- 2019-10-11 zyx
-- ----------------------------
ALTER TABLE `tab_support` ADD COLUMN `freeze` tinyint(2) NOT NULL DEFAULT 1 COMMENT '0-冻结 1-启用' AFTER `notice_status`;
-- 2019-10-11 cxj
ALTER TABLE `tab_apply` ADD COLUMN `bale_sort` int(5) NOT NULL DEFAULT 0 COMMENT '打包顺序' AFTER `offline_status`;

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Loading…
Cancel
Save