diff --git a/Application/Admin/View/Game/add.html b/Application/Admin/View/Game/add.html
index ddafadddd..27196ce88 100644
--- a/Application/Admin/View/Game/add.html
+++ b/Application/Admin/View/Game/add.html
@@ -1074,7 +1074,7 @@
uploaderImg.on( 'fileQueued', function( file ) {
var html = '';
html += '
';
- html += '
" style="width: 100px;height: 100px;">';
+ html += '
" style="width: 100px;height: 100px;cursor: move;">';
html += '
';
html += '删除';
html += '
';
@@ -1163,6 +1163,7 @@
$.each(imgListData,function(index, item) {
if (thisId == item) {
imgListData.splice(index,1);
+ return false;
}
});
@@ -1176,7 +1177,7 @@
uploaderImg.on( 'fileQueued', function( file ) {
var html = '';
html += '
';
- html += '
';
+ html += '
';
html += '
' + file.name + '
';
html += '
等待上传...
';
html += '
';
@@ -1225,6 +1226,7 @@
$.each(imgListData,function(index, item) {
if (response.id == item) {
imgListData.splice(index,1);
+ return false;
}
});
setFlooringPageImgsVal();
@@ -1232,13 +1234,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) {
diff --git a/Application/Base/Service/ApplyService.class.php b/Application/Base/Service/ApplyService.class.php
index ee93ce635..9d9577554 100644
--- a/Application/Base/Service/ApplyService.class.php
+++ b/Application/Base/Service/ApplyService.class.php
@@ -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);
}
}
\ No newline at end of file
diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php
index 156950d71..f4ce0b712 100644
--- a/Application/Home/Controller/ApplyController.class.php
+++ b/Application/Home/Controller/ApplyController.class.php
@@ -49,8 +49,18 @@ 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');//渠道角色
@@ -65,6 +75,7 @@ class ApplyController extends BaseController
$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 +83,7 @@ class ApplyController extends BaseController
$map['tab_game.relation_game_name'] = ['like', $thisRelationGameName];
}
+ $type = I('get.type', 0);
$group = '';
switch ($type) {
case 1:
@@ -114,7 +126,7 @@ class ApplyController extends BaseController
break;
}
- $page = intval($p);
+ $page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
@@ -180,10 +192,12 @@ class ApplyController extends BaseController
$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->meta_title = "申请游戏";
- $this->display();
+ $this->display('index');
}
//查看游戏详情
@@ -471,8 +485,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 +516,7 @@ class ApplyController extends BaseController
}
$map['tab_apply.promote_id'] = $promoteId;
+ $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 +532,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 +585,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 +592,11 @@ 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->meta_title = "我的游戏";
- $this->display();
+ $this->display('my_game');
}
diff --git a/Application/Home/Controller/GameDivideController.class.php b/Application/Home/Controller/GameDivideController.class.php
new file mode 100644
index 000000000..d0ef8b617
--- /dev/null
+++ b/Application/Home/Controller/GameDivideController.class.php
@@ -0,0 +1,106 @@
+ 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 (!empty($securityCode) && $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'] = '验证成功';
+
+ $this->ajaxReturn($data);
+ } else {
+ $data['status'] = 0;
+ $data['msg'] = '安全密码不正确';
+
+ $this->ajaxReturn($data);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Application/Home/Controller/PromoteCoinController.class.php b/Application/Home/Controller/PromoteCoinController.class.php
index 247e98e21..5a0fedb93 100644
--- a/Application/Home/Controller/PromoteCoinController.class.php
+++ b/Application/Home/Controller/PromoteCoinController.class.php
@@ -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();
}
diff --git a/Application/Home/View/default/Apply/index.html b/Application/Home/View/default/Apply/index.html
index b97fa4100..c540ffa72 100644
--- a/Application/Home/View/default/Apply/index.html
+++ b/Application/Home/View/default/Apply/index.html
@@ -118,37 +118,31 @@
全部游戏
- 全部游戏
+ 全部游戏
Android+ios游戏
- Android+ios游戏
+ Android+ios游戏
IOS游戏
- IOS游戏
+ IOS游戏
Android游戏
- Android游戏
+ Android游戏
-
我的游戏
+
我的游戏