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

891 lines
33 KiB
HTML

5 years ago
<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;
}
</style>
</block>
<block name="body">
<div class="page-list normal_list apply-index-list jssearch">
5 years ago
<div class="trunk-title">
<div class="location">
5 years ago
<div class="location-container">当前位置:<span>游戏管理></span><span>{$position}</span></div>
5 years ago
</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">
<eq name="type" value="0">
<a href="javascript:;" class="current">全部游戏</a>
<else/>
<a href="{:U($game)}" class="">全部游戏</a>
5 years ago
</eq>
<eq name="type" value="10">
<a href="javascript:;" class="current">Android+ios游戏</a>
<else/>
<a href="{:U($game, array('type' => 10))}" class="">Android+ios游戏</a>
5 years ago
</eq>
<eq name="type" value="2">
<a href="javascript:;" class="current">IOS游戏</a>
<else/>
<a href="{:U($game, array('type' => 2))}" class="">IOS游戏</a>
5 years ago
</eq>
<eq name="type" value="1">
<a href="javascript:;" class="current">Android游戏</a>
<else/>
<a href="{:U($game, array('type' => 1))}" class="">Android游戏</a>
5 years ago
</eq>
<a href="{:U($myGame)}" class="">我的游戏</a>
5 years ago
</div>
<div class="tab marg_top20" style="clear:both;display: flex;">
<div style="display: flex;">
<if condition="$promoteRole eq 1">
<div class="btn btn-role highlight" promote-role="1">
<p>本账号</p>
</div>
<else/>
<div class="btn btn-role" promote-role="1">
<p>本账号</p>
</div>
</if>
<if condition="$thisParentPromoteId eq 0">
<if condition="$promoteRole eq 2">
<div class="btn btn-role highlight" style="border-left: 0;<?=(isMinPromote($pID)==0)?'border-right: 0;':''?>" promote-role="2">
<p>组长</p>
</div>
<else/>
<div class="btn btn-role" style="border-left: 0;<?=(isMinPromote($pID)==0)?'border-right: 0;':''?>" promote-role="2">
<p>组长</p>
</div>
</if>
</if>
<eq name="pID|isMinPromote" value="0">
<if condition="$promoteRole eq 3">
<div class="btn btn-role highlight" promote-role="3">
<p>推广员</p>
</div>
<else/>
<div class="btn btn-role" promote-role="3">
<p>推广员</p>
</div>
</if>
</eq>
</div>
</div>
<!-- <form action="{:U($game,array('row'=>I('get.row'),'type'=>$type))}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20">-->
5 years ago
<div class="form-group normal_space fr">
<input type="submit" class="submit" id='submit' url="{:U($game,array('model'=>$model['name'],'type'=>$type),false)}"
value="查询">
5 years ago
</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">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<empty name="promoteData">
<option value="" selected="selected">请选择渠道</option>
<else/>
<option value="">请选择渠道</option>
<volist name="promoteData" id="vo">
<if condition="$vo.id eq $promoteId">
<option value="{$vo.id}" title="{$vo.account}({$vo.nickname})" selected="selected">
{$vo.account}({$vo.nickname})
</option>
<else/>
<option value="{$vo.id}" title="{$vo.account}({$vo.nickname})">
{$vo.account}({$vo.nickname})
</option>
</if>
</volist>
</empty>
</select>
</div>
<div class="form-group normal_space fr" style="display: none;">
<input id="promote_role" name="promote_role">
</div>
<!-- </form>-->
5 years ago
</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">
<if condition="$type eq 10">
{$vo.relation_game_name}
<else/>
{$vo.game_name}
</if>
</h5>
<p><span>{$vo.features}</span></p>
<p>
<if condition="$type eq 10">
<span>平台:<span>Android+ios</span>&nbsp;&nbsp;</span>
<else/>
<span>平台:<span>{:getSDKTypeName($vo['sdk_version'])}</span>&nbsp;&nbsp;</span>
</if>
<span>版本:<span>{$vo.version}</span>&nbsp;&nbsp;</span>
<span>大小:<span>{$vo.game_size}</span>&nbsp;&nbsp;</span>
<span>游戏类型:<span>{$vo.game_type_name}</span>&nbsp;&nbsp;</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>
5 years ago
</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>
5 years ago
</if>
</if>
</div>
</div>
</li>
</volist>
</empty>
</ul>
</div>
<div class="pagenation clearfix">
{$_page}
</div>
</div>
</div>
</div>
<div id="platform_list" style="display:none;">
<select>
<option value="">选择投放平台</option>
<volist name=":get_launch_platform_list(0)" id="vo">
<option value="{$vo.id}">{$vo.name}</option>
</volist>
</select>
</div>
<div class="detail-body" style="display: none;">
<div class="detail-box">
<a href="javascript:;" class="game-detail-close jq-detail-close"><i class="iconfont iconguanbi" style="font-size: 40px;"></i></a>
<div class="game-detail-inner">
<div class="detail-list">
<dl>
<dt>
<img src="" id="game_icon">
</dt>
<dd class="game-title" id="game_name"></dd>
<dd class="game-word">
<span><b>版本:</b><span id="version"></span></span>
<span><b>类型:</b><span id="game_type_name"></span></span>
<span><b>大小:</b><span id="game_size"></span></span>
<span><b>更新时间:</b><span id="create_time"></span></span>
<span><b>下载:</b><span id="dow_num"></span></span>
</dd>
<dd class="game-tab">
<i>西游</i>
<i>回合</i>
<i>回合</i>
</dd>
</dl>
</div>
<div class="game-detail-outer">
<div class="game-detail-left fl">
<div class="detail-con game-synopsis panel panel-bordered">
<div class="panel-heading"><h3 class="panel-title">游戏简介</h3></div>
<p id="features"></p>
</div>
<div class="detail-con game-pic panel panel-bordered">
<div class="panel-heading"><h3 class="panel-title">游戏截图</h3></div>
<div class="pic-box">
<div class="game-slides">
<ul style="width: 1400px;" class="game-slide-li">
</ul>
</div>
<a href="javascript:;" class="pic-prev" style="left: 10px;">
<i class="iconfont iconfanhui" style="font-size: 30px;margin-left: 4px;color: #fff;"></i>
</a>
<a href="javascript:;" class="pic-next down-img" style="right: 10px;">
<i class="iconfont icongengduo" style="font-size: 30px;margin-left: -7px;color: #fff;"></i>
</a>
</div>
</div>
</div>
<!-- <div class="game-detail-right fr">-->
<!-- <div class="detail-con game-date panel panel-bordered">-->
<!-- <div class="panel-heading"><h3 class="panel-title">游戏开服</h3></div>-->
<!-- <div class="date-box ">-->
<!-- <ul class="date-tit">-->
<!-- <li>时间</li>-->
<!-- <li>服务器名称</li>-->
<!-- </ul>-->
<!-- <div class="list-outer ">-->
<!-- <ul class="date-list">-->
<!-- <li><span class="android"></span></li>-->
<!-- </ul>-->
<!-- <ul class="date-list">-->
<!-- <li><span>09-06 16:00</span></li>-->
<!-- <li>天宫73区</li>-->
<!-- </ul>-->
<!-- <ul class="date-list">-->
<!-- <li><span>09-07 16:00</span></li>-->
<!-- <li>天宫74区</li>-->
<!-- </ul>-->
<!-- <ul class="date-list">-->
<!-- <li><span>09-09 16:00</span></li>-->
<!-- <li>天宫75区</li>-->
<!-- </ul>-->
<!-- <ul class="date-list">-->
<!-- <li><span>09-10 16:00</span></li>-->
<!-- <li>天宫76区</li>-->
<!-- </ul>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="detail-con game-pack panel panel-bordered">-->
<!-- <div class="panel-heading"><h3 class="panel-title">游戏礼包</h3></div>-->
<!-- <div class="pack-box ">-->
<!-- <ul id="GamePackInfo">-->
<!-- <li class="">-->
<!-- <div class="pack-inner">-->
<!-- <p class="pack-tit">《天宫计》新手礼包</p>-->
<!-- <p class="pack-word">天女礼物礼包*1、悬赏令*1、铜币*5000</p>-->
<!-- <p class="pack-num">剩余:<b>82.2%</b></p>-->
<!-- </div>-->
<!-- </li>-->
<!-- <li class="current">-->
<!-- <div class="pack-inner">-->
<!-- <p class="pack-tit">《天宫计》媒体礼包</p>-->
<!-- <p class="pack-word">技能书礼包*1、宠物经验丹*1、铜币*5000</p>-->
<!-- <p class="pack-num">剩余:<b>83.3%</b></p>-->
<!-- </div>-->
<!-- </li>-->
<!-- </ul>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</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">
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($game, array('type' => $type))}";
5 years ago
} 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($game)}";
5 years ago
} 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/".$game)}');
5 years ago
//查看游戏详情
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();
});
$('#submit').click(function () {
var url = $(this).attr('url');
console.log(url);
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
query = query.replace(/^&/g, '');
if (url.indexOf('?') > 0) {
url += '&' + query;
} else {
url += '?' + query;
}
window.location.href = url;
});
5 years ago
</script>
</block>