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

master
chenxiaojun 5 years ago
parent 602e53e82f
commit 1561e71977

@ -1,7 +1,11 @@
<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends HomeController{
class BaseController extends HomeController
{
protected $loginPromote = null;
protected function _initialize()
@ -9,46 +13,45 @@ class BaseController extends HomeController{
parent::_initialize();
$this->login();
$loginer = $this->getLoginPromote();
$pid = is_login_promote();
define('PLEVEL', $loginer['parent_id']);
define('PID', $pid);
define('PROMOTE_ACCOUNT',session('promote_auth.account'));
if($loginer['grand_id']>0) {/* 三级 */
define('PRO_GRADE',3);
} elseif($loginer['parent_id']>0) {/* 二级 */
define('PRO_GRADE',2);
define('SETTLEMENT_GRADE','third_status'); /* 给三级结算 */
define('G_SETTLEMENT_GRADE','third_status');
define('PROMOTE_ACCOUNT', session('promote_auth.account'));
if ($loginer['grand_id'] > 0) {/* 三级 */
define('PRO_GRADE', 3);
} elseif ($loginer['parent_id'] > 0) {/* 二级 */
define('PRO_GRADE', 2);
define('SETTLEMENT_GRADE', 'third_status'); /* 给三级结算 */
define('G_SETTLEMENT_GRADE', 'third_status');
} else {/* 一级 */
define('PRO_GRADE',1);
define('SETTLEMENT_GRADE','sub_status'); /* 给二级结算 */
define('G_SETTLEMENT_GRADE','sub_status,third_status');
define('PRO_GRADE', 1);
define('SETTLEMENT_GRADE', 'sub_status'); /* 给二级结算 */
define('G_SETTLEMENT_GRADE', 'sub_status,third_status');
}
$this->assign('loginer', $loginer);
$this->assign("parent_id", $loginer['parent_id']);
$this->assign("grand_id", $loginer['grand_id']);
$result = M('site_apply','tab_')->where("promote_id=$pid")->getField('status');
if($result['status'] == 1) {
$this -> assign('noapplysite', $result);
$result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status');
if ($result['status'] == 1) {
$this->assign('noapplysite', $result);
}
if (in_array(CONTROLLER_NAME,array('SiteBase','SiteGame','SiteGift','SiteGroup','SiteServer','SiteAdv'))) {
if ($result != 1) {
$this->redirect('SiteApply/index',array('msg'=>1));
}
if (in_array(CONTROLLER_NAME, array('SiteBase', 'SiteGame', 'SiteGift', 'SiteGroup', 'SiteServer', 'SiteAdv'))) {
if ($result != 1) {
$this->redirect('SiteApply/index', array('msg' => 1));
}
}
}
/* 用户登录检测 */
protected function login(){
protected function login()
{
/* 用户登录检测 */
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>
*/
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('模型名标识必须!');
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
@ -71,92 +75,105 @@ class BaseController extends HomeController{
//解析列表规则
$fields = array();
// 关键字搜索
$map = $extend_map;
$key = $model['search_key']?$model['search_key']:'title';
if(isset($_REQUEST[$key])){
$map[$key] = array('like','%'.$_GET[$key].'%');
$map = $extend_map;
$key = $model['search_key'] ? $model['search_key'] : 'title';
if (isset($_REQUEST[$key])) {
$map[$key] = array('like', '%' . $_GET[$key] . '%');
unset($_REQUEST[$key]);
}
// 条件搜索
foreach($_REQUEST as $name=>$val){
if(in_array($name,$fields)){
$map[$name] = $val;
foreach ($_REQUEST as $name => $val) {
if (in_array($name, $fields)) {
$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);
$data = M($name,"tab_")
$data = M($name, "tab_")
/* 查询指定字段,不指定则查询所有字段 */
->field(empty($fields) ? true : $fields)
// 查询条件
->where($map)
/* 默认通过id逆序排列 */
->order($model['need_pk']?'id DESC':'')
->order($model['need_pk'] ? 'id DESC' : '')
/* 数据分页 */
->page($page, $row)
/* 执行查询 */
->select();
/* 查询记录总数 */
$count = M($name,"tab_")->where($map)->count();
$count = M($name, "tab_")->where($map)->count();
//分页
$parameter = $_POST;
$parameter['p']=I('get.p',1);
$parameter['row']=I('get.row');
$page = set_pagination($count,$row,$parameter);
if($page) {$this->assign('_page', $page);}
$parameter = $_POST;
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$hasList = false;
if ($appendCallback) {
$appends = $appendCallback($data);
foreach ($appends as $key => $value) {
if ($key == 'list_data') {
$hasList = true;
$appends = $appendCallback($data);
foreach ($appends as $key => $value) {
if ($key == 'list_data') {
$hasList = true;
}
$this->assign($key, $value);
}
$this->assign($key, $value);
}
}
$this->assign("count",$count);
$this->assign("count", $count);
$this->assign('model', $model);
$this->assign('list_grids', $grids);
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']);
}
public function data_lists($p,$model,$extend=[]){
public function data_lists($p, $model, $extend = [])
{
$page = intval($p);
$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);
// 条件搜索
$map = [];
foreach(I('get.') as $name=>$val){
$map[$name] = $val;
foreach (I('get.') as $name => $val) {
$map[$name] = $val;
}
$map = array_merge($map,$extend['map']);
$lists_data = $model->where($map)->page($page,$row)->order($extend['order'])->select();
$map = array_merge($map, $extend['map']);
$lists_data = $model->where($map)->page($page, $row)->order($extend['order'])->select();
$count = $model->where($map)->count();
//分页
$parameter = $_POST;
$parameter['p']=I('get.p',1);
$parameter['row']=I('get.row');
$page = set_pagination($count,$row,$parameter);
if($page) {$this->assign('_page', $page);}
$this->assign('lists_data',$lists_data);
$this->assign('count',$count);
$parameter = $_POST;
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('lists_data', $lists_data);
$this->assign('count', $count);
$this->display();
}
@ -166,63 +183,63 @@ class BaseController extends HomeController{
*/
public function paginate($query, $defaultPageSize = 10, $defaultPage = 1)
{
$page = I('get.p', $defaultPage);
$pageSize = I('get.row', $defaultPageSize);
$countQuery = clone $query;
$count = $countQuery->count();
$records = $query->page($page, $pageSize)->select();
$params = [
'p' => $page,
'row' => $pageSize
];
$params = array_merge($params, $_POST);
$params = array_merge($params, $_GET);
$pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count];
$page = I('get.p', $defaultPage);
$pageSize = I('get.row', $defaultPageSize);
$countQuery = clone $query;
$count = $countQuery->count();
$records = $query->page($page, $pageSize)->select();
$params = [
'p' => $page,
'row' => $pageSize
];
$params = array_merge($params, $_POST);
$params = array_merge($params, $_GET);
$pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count];
}
public function getRecordsByIds($query, $ids, $params = [])
{
if (count($ids) == 0) {
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;
if (count($ids) == 0) {
return [];
}
return $records;
}
return $items;
$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;
}
return $items;
}
public function getColumnsByIds($query, $ids, $column, $params = [])
{
if (count($ids) == 0) {
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[$column];
}
} else {
foreach ($items as $item) {
$records[] = $item[$column];
}
}
return $records;
if (count($ids) == 0) {
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[$column];
}
} else {
foreach ($items as $item) {
$records[] = $item[$column];
}
}
return $records;
}
public function getLoginPromote()
@ -233,4 +250,32 @@ class BaseController extends HomeController{
}
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()
{
$metaTitle = '结算明细';
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
@ -85,9 +86,11 @@ class FinanceController extends BaseController
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$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('权限异常');
}
$metaTitle = '分成比例';
$securityCode = empty(session('game_divide_second_pwd')) ? '' : session('game_divide_second_pwd');//安全密码
$model = new PromoteApi();
$res = $model->verify_er_User(PID, $securityCode);//验证安全密码
@ -77,29 +78,11 @@ class GameDivideController extends BaseController
$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->meta_title = $metaTitle;
$this->display();
} else {
$data['status'] = 0;
$data['msg'] = '安全密码不正确';
$modelList = ['游戏管理', $metaTitle];
$this->verifyPasswordView($modelList, $metaTitle);
}
$this->ajaxReturn($data);
}
}

@ -2281,15 +2281,18 @@ class PromoteController extends BaseController
$this->ajaxReturn($data);
} else {
$metaTitle = '设置';
if ($res) {
$map['id'] = PID;
$promoteData = D('Promote')->field('id,child_game_permission')->where($map)->find();
$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/manager.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">
</block>
@ -63,144 +62,95 @@
width: 180px;
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>
<div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>财务管理></span><span>{$meta_title}</span></div>
</div>
<if condition="isset($listData)">
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">{$meta_title}</span>
<else/>
<span class="title_main">安全密码</span>
</if>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">{$meta_title}</span>
</div>
<div class="trunk-content article">
<if condition="isset($listData)">
<div class="trunk-search clearfix">
<div class="tab normal_tab">
</div>
<!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<div class="form-group normal_space">
<input type="text" name="pay_order_number" class="txt normal_txt" placeholder="请输入游戏订单号"
value="{:I('pay_order_number','')}">
</div>
<div class="trunk-search clearfix">
<div class="tab normal_tab">
</div>
<!-- <form action="{:U('Finance/settlementDtl')}" method="get" enctype="multipart/form-data" class="normal_form"> -->
<div class="form-group normal_space">
<input type="text" name="pay_order_number" class="txt normal_txt" placeholder="请输入游戏订单号"
value="{:I('pay_order_number','')}">
</div>
<div class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">充值时间:</label>
<div class="select-time">
<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 class="form-group normal_space">
<label class="form-title select-title" style="position: relative;">充值时间:</label>
<div class="select-time">
<input type="text" readonly id="sdate" class="txt" name="begtime" placeholder="开始时间" value="{$initBegTime}">
</div>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Finance/settlementDtl','model='.$model['name'],false)}"
value="查询">
<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>
<!-- </form> -->
</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">
<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>
<div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Finance/settlementDtl','model='.$model['name'],false)}"
value="查询">
</div>
<!-- </form> -->
</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">
<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>
</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>
<empty name="listData">
<else/>
<volist name="listData" id="vo">
<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>
<else/>
<volist name="listData" id="vo">
<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_order_number}</td>
<td>{$vo.game_name}</td>
<td>{$vo.user_account}</td>
<td>{$vo.promote_account}</td>
<td>{$vo.pay_amount}</td>
<if condition="$vo.pay_way eq -1">
<td>0</td>
<td>{$vo.pay_amount}</td>
<if condition="$vo.pay_way eq -1">
<td>0</td>
<td>{$vo.pay_amount}</td>
<else/>
<td>{$vo.pay_amount}</td>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%|{$vo.selle_ratio}%</td>
<td>{$vo.income}</td>
<td>{$vo.pay_time}</td>
<td>{$vo.selle_status}</td>
</tr>
</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>
<else/>
<td>{$vo.pay_amount}</td>
<td>0</td>
</if>
<td>{$vo.selle_ratio}%|{$vo.selle_ratio}%</td>
<td>{$vo.income}</td>
<td>{$vo.pay_time}</td>
<td>{$vo.selle_status}</td>
</tr>
</volist>
</empty>
</table>
</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 class="pagenation clearfix">
{$_page}
</div>
</div>
</if>
</div>
</div>
</div>
@ -248,31 +198,6 @@
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 () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();

@ -5,7 +5,6 @@
<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">
@ -105,32 +104,6 @@
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>
@ -138,130 +111,108 @@
<div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>分成比例</span></div>
<div class="location-container">当前位置:<span>游戏管理></span><span>{$meta_title}</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>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
</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="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">
<div style="display: flex;">
<div class="btn btn-role <if condition='$serverType eq 0'>highlight</if>" server-type="0">
<p>全部</p>
</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="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="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="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1">
<p>专服</p>
</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="form-group normal_space fl" style="display: none;">
<input id="server_type" name="server_type">
<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="form-group normal_space fl">
<input type="submit" class="submit" id='submit' url="{:U('index','model='.$model['name'],false)}"
value="查询">
<div class="btn btn-role <if condition='$serverType eq 1'>highlight</if>" server-type="1">
<p>专服</p>
</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 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>
<!-- </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>
<empty name="dataList">
<else/>
<volist name="dataList" id="vo">
<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>
<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>
<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>
</volist>
</empty>
</table>
</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 class="pagenation clearfix">
{$_page}
</div>
</if>
</div>
</div>
</div>
</block>
@ -291,31 +242,6 @@
$(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')}";
});
$('#submit').click(function () {
var url = $(this).attr('url');
console.log(url);

@ -4,7 +4,6 @@
<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">
@ -138,49 +137,29 @@
<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>{$meta_title}</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>
<img src="__IMG__/20180207/icon_normal_game.png"><span class="title_main">{$meta_title}</span>
</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 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 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>
<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>
<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>
</div>
@ -190,31 +169,6 @@
<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();

@ -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