You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.2 KiB
PHTML

<?php
// 游戏默认分成比例模板
namespace Admin\Controller;
class GameRatioMouldController extends AdminController
{
public function index()
{
$this->display();
}
public function add()
{
if ($_POST) {
$params = I('post.');
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']);
$this->success('保存成功', U('lists'));
} else {
$game_type = M("game_type","tab_")->field("id,type_name")->where("status=1")->select();
$this->assign("game_type",$game_type);
//渠道类型
$this->assign("company_belong",getCompanyBlong());
$params = I('get.');
$id = $params['id'] ?? 0;
$id = intval($id);
$companyId = 0;
$metaTitle = '游戏分成比例申请';
$this->display();
}
}
public function edit()
{
if ($_POST) {
$params = I('post.');
addOperationLog(['op_type'=>1,'key'=>getPromoteName($promoteGameRatio['promote_id']).'/'.getrelationGameName($promoteGameRatio['game_id']),'op_name'=>'修改游戏分成比例申请','url'=>U('PromoteGameRatio/applyRatio',['id'=>$promoteGameRatio['id']]),'menu'=>'推广员-结算单管理-公会分成管理']);
$this->success('保存成功', U('lists'));
} else {
$params = I('get.');
$id = $params['id'] ?? 0;
$id = intval($id);
$companyId = 0;
$metaTitle = '游戏分成比例申请';
$this->display();
}
}
//基础信息获取
public function getGames()
{
$level = 1;
$gameTypeId = intval(I('game_type_id', 0));
$games = M("game","tab_")->field("relation_game_id,relation_game_name,original_package_name")->where("game_type_id = '{$gameTypeId}'")->group("relation_game_name")->select();
$this->ajaxReturn($games);
}
}