推广后台->验证安全密码--更新

master
chenxiaojun 5 years ago
parent 602e53e82f
commit 1561e71977

@ -1,7 +1,11 @@
<?php <?php
namespace Home\Controller; namespace Home\Controller;
use Think\Controller; use Think\Controller;
class BaseController extends HomeController{
class BaseController extends HomeController
{
protected $loginPromote = null; protected $loginPromote = null;
protected function _initialize() protected function _initialize()
@ -9,46 +13,45 @@ class BaseController extends HomeController{
parent::_initialize(); parent::_initialize();
$this->login(); $this->login();
$loginer = $this->getLoginPromote(); $loginer = $this->getLoginPromote();
$pid = is_login_promote(); $pid = is_login_promote();
define('PLEVEL', $loginer['parent_id']); define('PLEVEL', $loginer['parent_id']);
define('PID', $pid); define('PID', $pid);
define('PROMOTE_ACCOUNT',session('promote_auth.account')); define('PROMOTE_ACCOUNT', session('promote_auth.account'));
if($loginer['grand_id']>0) {/* 三级 */ if ($loginer['grand_id'] > 0) {/* 三级 */
define('PRO_GRADE',3); define('PRO_GRADE', 3);
} elseif($loginer['parent_id']>0) {/* 二级 */ } elseif ($loginer['parent_id'] > 0) {/* 二级 */
define('PRO_GRADE',2); define('PRO_GRADE', 2);
define('SETTLEMENT_GRADE','third_status'); /* 给三级结算 */ define('SETTLEMENT_GRADE', 'third_status'); /* 给三级结算 */
define('G_SETTLEMENT_GRADE','third_status'); define('G_SETTLEMENT_GRADE', 'third_status');
} else {/* 一级 */ } else {/* 一级 */
define('PRO_GRADE',1); define('PRO_GRADE', 1);
define('SETTLEMENT_GRADE','sub_status'); /* 给二级结算 */ define('SETTLEMENT_GRADE', 'sub_status'); /* 给二级结算 */
define('G_SETTLEMENT_GRADE','sub_status,third_status'); define('G_SETTLEMENT_GRADE', 'sub_status,third_status');
} }
$this->assign('loginer', $loginer); $this->assign('loginer', $loginer);
$this->assign("parent_id", $loginer['parent_id']); $this->assign("parent_id", $loginer['parent_id']);
$this->assign("grand_id", $loginer['grand_id']); $this->assign("grand_id", $loginer['grand_id']);
$result = M('site_apply','tab_')->where("promote_id=$pid")->getField('status'); $result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status');
if($result['status'] == 1) { if ($result['status'] == 1) {
$this -> assign('noapplysite', $result); $this->assign('noapplysite', $result);
} }
if (in_array(CONTROLLER_NAME,array('SiteBase','SiteGame','SiteGift','SiteGroup','SiteServer','SiteAdv'))) { if (in_array(CONTROLLER_NAME, array('SiteBase', 'SiteGame', 'SiteGift', 'SiteGroup', 'SiteServer', 'SiteAdv'))) {
if ($result != 1) { if ($result != 1) {
$this->redirect('SiteApply/index',array('msg'=>1)); $this->redirect('SiteApply/index', array('msg' => 1));
} }
} }
} }
/* 用户登录检测 */ /* 用户登录检测 */
protected function login(){ protected function login()
{
/* 用户登录检测 */ /* 用户登录检测 */
is_login_promote() || $this->error('您还没有登录,请先登录!', U('Index/index')); is_login_promote() || $this->error('您还没有登录,请先登录!', U('Index/index'));
} }
@ -56,10 +59,11 @@ class BaseController extends HomeController{
/** /**
* 显示指定模型列表数据 * 显示指定模型列表数据
* @param String $model 模型标识 * @param String $model 模型标识
* @author 麦当苗儿 <zuojiazi@vip.qq.com> * @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/ */
public function lists($model = null, $p = 0, $extend_map = array(), \Closure $appendCallback = null){ public function lists($model = null, $p = 0, $extend_map = array(), \Closure $appendCallback = null)
{
$model || $this->error('模型名标识必须!'); $model || $this->error('模型名标识必须!');
$page = intval($p); $page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据 $page = $page ? $page : 1; //默认显示第一页数据
@ -71,92 +75,105 @@ class BaseController extends HomeController{
//解析列表规则 //解析列表规则
$fields = array(); $fields = array();
// 关键字搜索 // 关键字搜索
$map = $extend_map; $map = $extend_map;
$key = $model['search_key']?$model['search_key']:'title'; $key = $model['search_key'] ? $model['search_key'] : 'title';
if(isset($_REQUEST[$key])){ if (isset($_REQUEST[$key])) {
$map[$key] = array('like','%'.$_GET[$key].'%'); $map[$key] = array('like', '%' . $_GET[$key] . '%');
unset($_REQUEST[$key]); unset($_REQUEST[$key]);
} }
// 条件搜索 // 条件搜索
foreach($_REQUEST as $name=>$val){ foreach ($_REQUEST as $name => $val) {
if(in_array($name,$fields)){ if (in_array($name, $fields)) {
$map[$name] = $val; $map[$name] = $val;
} }
} }
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$name = parse_name(get_table_name($model['id']), true); $name = parse_name(get_table_name($model['id']), true);
$data = M($name,"tab_") $data = M($name, "tab_")
/* 查询指定字段,不指定则查询所有字段 */ /* 查询指定字段,不指定则查询所有字段 */
->field(empty($fields) ? true : $fields) ->field(empty($fields) ? true : $fields)
// 查询条件 // 查询条件
->where($map) ->where($map)
/* 默认通过id逆序排列 */ /* 默认通过id逆序排列 */
->order($model['need_pk']?'id DESC':'') ->order($model['need_pk'] ? 'id DESC' : '')
/* 数据分页 */ /* 数据分页 */
->page($page, $row) ->page($page, $row)
/* 执行查询 */ /* 执行查询 */
->select(); ->select();
/* 查询记录总数 */ /* 查询记录总数 */
$count = M($name,"tab_")->where($map)->count(); $count = M($name, "tab_")->where($map)->count();
//分页 //分页
$parameter = $_POST; $parameter = $_POST;
$parameter['p']=I('get.p',1); $parameter['p'] = I('get.p', 1);
$parameter['row']=I('get.row'); $parameter['row'] = I('get.row');
$page = set_pagination($count,$row,$parameter); $page = set_pagination($count, $row, $parameter);
if($page) {$this->assign('_page', $page);} if ($page) {
$this->assign('_page', $page);
}
$hasList = false; $hasList = false;
if ($appendCallback) { if ($appendCallback) {
$appends = $appendCallback($data); $appends = $appendCallback($data);
foreach ($appends as $key => $value) { foreach ($appends as $key => $value) {
if ($key == 'list_data') { if ($key == 'list_data') {
$hasList = true; $hasList = true;
}
$this->assign($key, $value);
} }
$this->assign($key, $value);
}
} }
$this->assign("count",$count); $this->assign("count", $count);
$this->assign('model', $model); $this->assign('model', $model);
$this->assign('list_grids', $grids); $this->assign('list_grids', $grids);
if ($hasList == false) { if ($hasList == false) {
$this->assign('list_data', $data); $this->assign('list_data', $data);
} }
$this->meta_title = $model['title'].'列表'; $this->meta_title = $model['title'] . '列表';
$this->display($model['template_list']); $this->display($model['template_list']);
} }
public function data_lists($p,$model,$extend=[]){ public function data_lists($p, $model, $extend = [])
{
$page = intval($p); $page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据 $page = $page ? $page : 1; //默认显示第一页数据
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$model = D($model); $model = D($model);
// 条件搜索 // 条件搜索
$map = []; $map = [];
foreach(I('get.') as $name=>$val){ foreach (I('get.') as $name => $val) {
$map[$name] = $val; $map[$name] = $val;
} }
$map = array_merge($map,$extend['map']); $map = array_merge($map, $extend['map']);
$lists_data = $model->where($map)->page($page,$row)->order($extend['order'])->select(); $lists_data = $model->where($map)->page($page, $row)->order($extend['order'])->select();
$count = $model->where($map)->count(); $count = $model->where($map)->count();
//分页 //分页
$parameter = $_POST; $parameter = $_POST;
$parameter['p']=I('get.p',1); $parameter['p'] = I('get.p', 1);
$parameter['row']=I('get.row'); $parameter['row'] = I('get.row');
$page = set_pagination($count,$row,$parameter); $page = set_pagination($count, $row, $parameter);
if($page) {$this->assign('_page', $page);} if ($page) {
$this->assign('_page', $page);
$this->assign('lists_data',$lists_data); }
$this->assign('count',$count);
$this->assign('lists_data', $lists_data);
$this->assign('count', $count);
$this->display(); $this->display();
} }
@ -166,63 +183,63 @@ class BaseController extends HomeController{
*/ */
public function paginate($query, $defaultPageSize = 10, $defaultPage = 1) public function paginate($query, $defaultPageSize = 10, $defaultPage = 1)
{ {
$page = I('get.p', $defaultPage); $page = I('get.p', $defaultPage);
$pageSize = I('get.row', $defaultPageSize); $pageSize = I('get.row', $defaultPageSize);
$countQuery = clone $query; $countQuery = clone $query;
$count = $countQuery->count(); $count = $countQuery->count();
$records = $query->page($page, $pageSize)->select(); $records = $query->page($page, $pageSize)->select();
$params = [ $params = [
'p' => $page, 'p' => $page,
'row' => $pageSize 'row' => $pageSize
]; ];
$params = array_merge($params, $_POST); $params = array_merge($params, $_POST);
$params = array_merge($params, $_GET); $params = array_merge($params, $_GET);
$pagination = set_pagination($count, $pageSize, $params); $pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count]; return [$records, $pagination, $count];
} }
public function getRecordsByIds($query, $ids, $params = []) public function getRecordsByIds($query, $ids, $params = [])
{ {
if (count($ids) == 0) { if (count($ids) == 0) {
return []; return [];
}
$field = isset($params['field']) ? $params['field'] : 'id';
$indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
$items = $query->where([$field => ['in', $ids]])->select();
$records = [];
if ($indexBy) {
foreach ($items as $item) {
$records[$item[$field]] = $item;
} }
return $records; $field = isset($params['field']) ? $params['field'] : 'id';
} $indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
return $items;
$items = $query->where([$field => ['in', $ids]])->select();
$records = [];
if ($indexBy) {
foreach ($items as $item) {
$records[$item[$field]] = $item;
}
return $records;
}
return $items;
} }
public function getColumnsByIds($query, $ids, $column, $params = []) public function getColumnsByIds($query, $ids, $column, $params = [])
{ {
if (count($ids) == 0) { if (count($ids) == 0) {
return []; return [];
} }
$field = isset($params['field']) ? $params['field'] : 'id'; $field = isset($params['field']) ? $params['field'] : 'id';
$indexBy = isset($params['indexBy']) ? $params['indexBy'] : ''; $indexBy = isset($params['indexBy']) ? $params['indexBy'] : '';
$items = $query->where([$field => ['in', $ids]])->select(); $items = $query->where([$field => ['in', $ids]])->select();
$records = []; $records = [];
if ($indexBy) { if ($indexBy) {
foreach ($items as $item) { foreach ($items as $item) {
$records[$item[$field]] = $item[$column]; $records[$item[$field]] = $item[$column];
} }
} else { } else {
foreach ($items as $item) { foreach ($items as $item) {
$records[] = $item[$column]; $records[] = $item[$column];
} }
} }
return $records; return $records;
} }
public function getLoginPromote() public function getLoginPromote()
@ -233,4 +250,32 @@ class BaseController extends HomeController{
} }
return $this->loginPromote; return $this->loginPromote;
} }
//验证安全密码视图
public function verifyPasswordView($modelList, $metaTitle)
{
$this->assign('modelList', $modelList);
$this->assign('metaTitle', $metaTitle);
$this->display('Public/verify_password');
}
//验证安全密码
public function verifyPassword()
{
$password = I('post.password');
$model = new \User\Api\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);
}
} }

@ -15,6 +15,7 @@ class FinanceController extends BaseController
{ {
public function settlementDtl() public function settlementDtl()
{ {
$metaTitle = '结算明细';
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码 $securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi(); $model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码 $res = $model->verify_er_User(PID, $securityCode);//验证安全密码
@ -85,9 +86,11 @@ class FinanceController extends BaseController
$this->assign('initBegTime', $initBegTime); $this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime); $this->assign('initEndTime', $initEndTime);
$this->assign('_page', $page); $this->assign('_page', $page);
$this->assign('meta_title', '结算明细');
$this->display();
} else {
$modelList = ['财务管理', $metaTitle];
$this->verifyPasswordView($modelList, $metaTitle);
} }
$this->assign('meta_title', '结算明细');
$this->display();
} }
} }

@ -20,6 +20,7 @@ class GameDivideController extends BaseController
$this->error('权限异常'); $this->error('权限异常');
} }
$metaTitle = '分成比例';
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码 $securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi(); $model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码 $res = $model->verify_er_User(PID, $securityCode);//验证安全密码
@ -77,29 +78,11 @@ class GameDivideController extends BaseController
$this->assign('dataList', $data); $this->assign('dataList', $data);
$this->assign('count', $count); $this->assign('count', $count);
$this->assign('serverType', I('server_type', 0)); $this->assign('serverType', I('server_type', 0));
} $this->meta_title = $metaTitle;
$this->display();
$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 { } else {
$data['status'] = 0; $modelList = ['游戏管理', $metaTitle];
$data['msg'] = '安全密码不正确'; $this->verifyPasswordView($modelList, $metaTitle);
} }
$this->ajaxReturn($data);
} }
} }

@ -2281,15 +2281,18 @@ class PromoteController extends BaseController
$this->ajaxReturn($data); $this->ajaxReturn($data);
} else { } else {
$metaTitle = '设置';
if ($res) { if ($res) {
$map['id'] = PID; $map['id'] = PID;
$promoteData = D('Promote')->field('id,child_game_permission')->where($map)->find(); $promoteData = D('Promote')->field('id,child_game_permission')->where($map)->find();
$this->assign('data', $promoteData); $this->assign('data', $promoteData);
$this->meta_title = $metaTitle;
$this->display();
} else {
$modelList = ['游戏管理', $metaTitle];
$this->verifyPasswordView($modelList, $metaTitle);
} }
$this->meta_title = "设置";
$this->display();
} }
} }

@ -3,7 +3,6 @@
<link href="__CSS__/20180207/data.css" rel="stylesheet"> <link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/manager.css" rel="stylesheet"> <link href="__CSS__/20180207/manager.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet"> <link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet"> <link href="__STATIC__/icons_alibaba/iconfont.css?v=1.2" rel="stylesheet">
</block> </block>
@ -63,144 +62,95 @@
width: 180px; width: 180px;
height: 34px; height: 34px;
} }
.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> </style>
<div class="page-search normal_list query-recharge-search jssearch"> <div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title"> <div class="trunk-title">
<div class="location"> <div class="location">
<div class="location-container">当前位置:<span>财务管理></span><span>{$meta_title}</span></div> <div class="location-container">当前位置:<span>财务管理></span><span>{$meta_title}</span></div>
</div> </div>
<if condition="isset($listData)"> <img src="__IMG__/20180207/icon_chongzhi.png">
<img src="__IMG__/20180207/icon_chongzhi.png"> <span class="title_main">{$meta_title}</span>
<span class="title_main">{$meta_title}</span>
<else/>
<span class="title_main">安全密码</span>
</if>
</div> </div>
<div class="trunk-content article"> <div class="trunk-content article">
<if condition="isset($listData)"> <div class="trunk-search clearfix">
<div class="trunk-search clearfix"> <div class="tab normal_tab">
<div class="tab normal_tab"> </div>
</div> <!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> --> <div class="form-group normal_space">
<div class="form-group normal_space"> <input type="text" name="pay_order_number" class="txt normal_txt" placeholder="请输入游戏订单号"
<input type="text" name="pay_order_number" class="txt normal_txt" placeholder="请输入游戏订单号" value="{:I('pay_order_number','')}">
value="{:I('pay_order_number','')}"> </div>
</div>
<div class="form-group normal_space"> <div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">充值时间:</label> <label class="form-title select-title" style="position: relative;">充值时间:</label>
<div class="select-time"> <div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}"> <input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
</div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="select-time">
<input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
</div>
</div> </div>
<label class="form-title select-title zhi_color">&nbsp;&nbsp;</label>
<div class="form-group normal_space"> <div class="select-time">
<input type="submit" class="submit" id='submit' url="{:U('Finance/settlementDtl','model='.$model['name'],false)}" <input type="text" readonly id="edate" class="txt" name="endtime" placeholder="结束时间" value="{$initEndTime}">
value="查询">
</div> </div>
<!-- </form> -->
</div> </div>
<div class="page-list apply-app_apply-list query-recharge-list"> <div class="form-group normal_space">
<div class="trunk-content article"> <input type="submit" class="submit" id='submit' url="{:U('Finance/settlementDtl','model='.$model['name'],false)}"
<div class="tabcon trunk-list"> value="查询">
<table class="table normal_table"> </div>
<tr class="odd"> <!-- </form> -->
<th>游戏订单号</th> </div>
<th>游戏</th> <div class="page-list apply-app_apply-list query-recharge-list">
<th>玩家账号</th> <div class="trunk-content article">
<th>推广员账号</th> <div class="tabcon trunk-list">
<th>订单总额</th> <table class="table normal_table">
<th>直充</th> <tr class="odd">
<th>内充</th> <th>游戏订单号</th>
<th>分成比例(直充|内充)</th> <th>游戏</th>
<th>收益</th> <th>玩家账号</th>
<th>充值时间</th> <th>推广员账号</th>
<th>订单状态</th> <th>订单总额</th>
<th>直充</th>
<th>内充</th>
<th>分成比例(直充|内充)</th>
<th>收益</th>
<th>充值时间</th>
<th>订单状态</th>
</tr>
<empty name="listData">
<tr class="num2">
<td colspan="99" style="text-align: center;height: 45vh;">
<img src="__IMG__/20180207/icon_wushujv2.png"/>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>
</td>
</tr> </tr>
<empty name="listData"> <else/>
<volist name="listData" id="vo">
<tr class="num2"> <tr class="num2">
<td colspan="99" style="text-align: center;height: 45vh;"> <td>{$vo.pay_order_number}</td>
<img src="__IMG__/20180207/icon_wushujv2.png"/> <td>{$vo.game_name}</td>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p> <td>{$vo.user_account}</td>
</td> <td>{$vo.promote_account}</td>
</tr> <td>{$vo.pay_amount}</td>
<else/> <if condition="$vo.pay_way eq -1">
<volist name="listData" id="vo"> <td>0</td>
<tr class="num2">
<td>{$vo.pay_order_number}</td>
<td>{$vo.game_name}</td>
<td>{$vo.user_account}</td>
<td>{$vo.promote_account}</td>
<td>{$vo.pay_amount}</td> <td>{$vo.pay_amount}</td>
<if condition="$vo.pay_way eq -1"> <else/>
<td>0</td> <td>{$vo.pay_amount}</td>
<td>{$vo.pay_amount}</td> <td>0</td>
<else/> </if>
<td>{$vo.pay_amount}</td> <td>{$vo.selle_ratio}%|{$vo.selle_ratio}%</td>
<td>0</td> <td>{$vo.income}</td>
</if> <td>{$vo.pay_time}</td>
<td>{$vo.selle_ratio}%|{$vo.selle_ratio}%</td> <td>{$vo.selle_status}</td>
<td>{$vo.income}</td> </tr>
<td>{$vo.pay_time}</td> </volist>
<td>{$vo.selle_status}</td> </empty>
</tr> </table>
</volist>
</empty>
</table>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</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>
<div class="tab detailed-box"> <div class="pagenation clearfix">
<label class="detailed-title detailed-label" style="margin-right: 20px;"></label> {$_page}
<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>
</div> </div>
</if> </div>
</div> </div>
</div> </div>
@ -248,31 +198,6 @@
endDate: date endDate: date
}); });
$('.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')}";
});
$('#submit').click(function () { $('#submit').click(function () {
var sdate = $('#sdate').val(); var sdate = $('#sdate').val();
var edate = $('#edate').val(); var edate = $('#edate').val();

@ -5,7 +5,6 @@
<link href="__CSS__/20180207/game.css" rel="stylesheet"> <link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.css" rel="stylesheet"> <link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.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"> <link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<style type="text/css"> <style type="text/css">
@ -105,32 +104,6 @@
width: 80px; width: 80px;
text-align: center; 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> </style>
</block> </block>
@ -138,130 +111,108 @@
<div class="page-list normal_list apply-index-list jssearch"> <div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title"> <div class="trunk-title">
<div class="location"> <div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>分成比例</span></div> <div class="location-container">当前位置:<span>游戏管理></span><span>{$meta_title}</span></div>
</div> </div>
<if condition="isset($dataList)"> <img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">分成比例</span>
<else/>
<span class="title_main">安全密码</span>
</if>
</div> </div>
<div class="trunk-content article"> <div class="trunk-content article">
<if condition="isset($dataList)"> <div class="trunk-search clearfix">
<div class="trunk-search clearfix"> <div class="tab marg_top20" style="clear:both;display: flex;"></div>
<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"-->
<!-- <form action="{:U('index',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"--> <!-- class="marg_top20" style="float: left;">-->
<!-- class="marg_top20" style="float: left;">--> <div class="form-group normal_space fl">
<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;">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;"> <option value="">请选择游戏</option>
<option value="">请选择游戏</option> <volist name=":get_promote_serach_game()" id="vo">
<volist name=":get_promote_serach_game()" id="vo"> <option value="{$vo.relation_game_id}" title="{$vo.relation_game_name}">{$vo.relation_game_name}</option>
<option value="{$vo.relation_game_id}" title="{$vo.relation_game_name}">{$vo.relation_game_name}</option> </volist>
</volist> </select>
</select> </div>
</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 class="form-group normal_space fl">
<div style="display: flex;"> <select id="sdk_version" name="sdk_version" class="reselect select_gallery" style="width:215px;">
<div class="btn btn-role <if condition='$serverType eq 0'>highlight</if>" server-type="0"> <option value="0">请选择设备类型</option>
<p>全部</p> <volist name=":getSDKType()" id="vo" key="k">
</div> <option value="{$k}">{$vo}</option>
</volist>
</select>
</div>
<div class="btn btn-role <if condition='$serverType eq 2'>highlight</if>" style="border-left: 0;border-right: 0;" server-type="2"> <div class="form-group normal_space fl">
<p>混服</p> <label class="form-title select-title" style="position: relative;">分成比例:</label>
</div> <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="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1"> <div class="form-group normal_space fl">
<p>专服</p> <div style="display: flex;">
</div> <div class="btn btn-role <if condition='$serverType eq 0'>highlight</if>" server-type="0">
</div> <p>全部</p>
</div> </div>
<div class="form-group normal_space fl" style="display: none;"> <div class="btn btn-role <if condition='$serverType eq 2'>highlight</if>" style="border-left: 0;border-right: 0;" server-type="2">
<input id="server_type" name="server_type"> <p>混服</p>
</div> </div>
<div class="form-group normal_space fl"> <div class="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1">
<input type="submit" class="submit" id='submit' url="{:U('index','model='.$model['name'],false)}" <p>专服</p>
value="查询">
</div> </div>
<!-- </form>--> </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" id='submit' url="{:U('index','model='.$model['name'],false)}"
value="查询">
</div> </div>
<div class="trunk-list"> <!-- </form>-->
<div class="div_bgtab"> </div>
<table class="table normal_table zwm_tab"> <div class="trunk-list">
<tr class="odd <if condition='get_parent_id(PID) eq 0'>pid</if> zwm_tr"> <div class="div_bgtab">
<th>游戏图标</th> <table class="table normal_table zwm_tab">
<th>游戏名称</th> <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> <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> </tr>
<empty name="dataList"> <else/>
<volist name="dataList" id="vo">
<tr> <tr>
<td colspan="7" style="text-align: center;height: 45vh;"> <td><img src="__ROOT__{$vo.icon|get_cover='path'}" style="width: 50px;height: 50px;border-radius: 8px;"/></td>
<img src="__IMG__/20180207/icon_wushujv2.png"/> <td>{$vo.game_name}</td>
<p style="line-height: 40px;color: #A5A5A5;">暂无数据</p> <td>{$vo.game_type_name}</td>
</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> </tr>
<else/> </volist>
<volist name="dataList" id="vo"> </empty>
<tr> </table>
<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> </div>
<else/> <div class="pagenation clearfix">
<div class="trunk-search clearfix" style="display: table-caption;"> {$_page}
<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> </div>
</if> </div>
</div> </div>
</div> </div>
</block> </block>
@ -291,31 +242,6 @@
$(document).ready(function () { $(document).ready(function () {
$(".select_gallery").select2(); $(".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')}";
});
$('#submit').click(function () { $('#submit').click(function () {
var url = $(this).attr('url'); var url = $(this).attr('url');
console.log(url); console.log(url);

@ -4,7 +4,6 @@
<link href="__CSS__/20180207/data.css" rel="stylesheet"> <link href="__CSS__/20180207/data.css" rel="stylesheet">
<link href="__CSS__/20180207/game.css" rel="stylesheet"> <link href="__CSS__/20180207/game.css" rel="stylesheet">
<link href="__CSS__/20180207/finance.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="__CSS__/detailed.css?v=1.1" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet"> <link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
@ -138,49 +137,29 @@
<div class="page-list normal_list apply-index-list"> <div class="page-list normal_list apply-index-list">
<div class="trunk-title"> <div class="trunk-title">
<div class="location"> <div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>设置</span></div> <div class="location-container">当前位置:<span>游戏管理></span><span>{$meta_title}</span></div>
</div> </div>
<if condition="isset($data)"> <img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">设置</span>
<else/>
<span class="title_main">安全密码</span>
</if>
</div> </div>
<div class="trunk-content article"> <div class="trunk-content article">
<div class="trunk-search clearfix" style="display: table-caption;"> <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;">
<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>
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;">下级账号游戏展示:</label> <div class="detailed-content-box">
<div class="detailed-content-box"> <label style="margin-right: 20px;">
<label style="margin-right: 20px;"> <input name="child_game_permission" value="1" type="radio" <if condition="$data.child_game_permission eq 1">checked</if>> 所有游戏
<input name="child_game_permission" value="1" type="radio" <if condition="$data.child_game_permission eq 1">checked</if>> 所有游戏 </label>
</label> <label>
<label> <input name="child_game_permission" value="0" type="radio" <if condition="$data.child_game_permission eq 0">checked</if>> 会长已添加游戏
<input name="child_game_permission" value="0" type="radio" <if condition="$data.child_game_permission eq 0">checked</if>> 会长已添加游戏 </label>
</label>
</div>
</div> </div>
<div class="tab detailed-box"> </div>
<label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;"></label> <div class="tab detailed-box">
<div class="detailed-content-box" style="display: flex;"> <label class="detailed-title detailed-label" style="margin-right: 20px;width: 200px;"></label>
<button class="btn-security" id="btn_save" style="margin-right: 20px;width: 200px;">保存</button> <div class="detailed-content-box" style="display: flex;">
</div> <button class="btn-security" id="btn_save" style="margin-right: 20px;width: 200px;">保存</button>
</div> </div>
<else/> </div>
<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> </div>
</div> </div>
@ -190,31 +169,6 @@
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script> <script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(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 () { $('#btn_save').on('click', function () {
var childGamePermission = $('input[name=child_game_permission]:checked').val(); var childGamePermission = $('input[name=child_game_permission]:checked').val();

@ -0,0 +1,198 @@
<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__/detailed.css?v=1.1" 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-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 jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:
<volist name="modelList" id="vo" key="k">
<?php if ($k == count($modelList) - 1) {
echo "<span>$vo></span>";
} else {
echo "<span>$vo</span>";
}?>
</volist>
</div>
</div>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
<span class="title_main">安全密码</span>
</div>
<div class="trunk-content article">
<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>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript">
$(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>
Loading…
Cancel
Save