解决冲突
commit
0c34bb88d3
@ -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);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -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> </span>
|
||||
<else/>
|
||||
<span>平台:<span>{:getSDKTypeName($vo['sdk_version'])}</span> </span>
|
||||
</if>
|
||||
<span>版本:<span>{$vo.version}</span> </span>
|
||||
<span>大小:<span>{$vo.game_size}</span> </span>
|
||||
<span>游戏类型:<span>{$vo.game_type_name}</span> </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>
|
@ -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"> 至 </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>
|
@ -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>
|
Binary file not shown.
After Width: | Height: | Size: 234 KiB |
Loading…
Reference in New Issue