资料专区

master
18850253506@163.com 5 years ago
parent 35df2c87aa
commit 4a96cf7871

@ -181,6 +181,14 @@ class GameController extends ThinkController
$_POST['display_site'] = '';
}
$content = $_POST['content'];
if(!empty($content)) {
$_POST['detail_content'] = $content;
} else {
$_POST['detail_content'] = '';
}
$pinyin = new \Think\Pinyin();
$num = mb_strlen($_POST['game_name'], 'UTF8');
$short = '';
@ -288,9 +296,10 @@ class GameController extends ThinkController
} else {
$_POST['display_site'] = '';
}
$content = $_POST['content'];
$game = D(self::model_name);//M('$this->$model_name','tab_');
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['detail_content'] = $content;
$res = $game->update();
$id = $res["id"];
$sibling = D("Game")->find($id);

@ -191,7 +191,19 @@
<tr>
<td class="l">游戏详细介绍:</td>
<td class="r">
<textarea name="introduction" class="txt_area"></textarea>
<textarea type="text" name="introduction" class="txt_area">
</textarea>
</td>
</tr>
<tr>
<td class="l">游戏资料中心:</td>
<td class="r table_radio">
<span class="form_textarea">
<textarea name="content">{$field.value}</textarea>
{:hook('adminArticleEdit', array('name'=>'content','value'=>$field['value']))}
</span>
</td>
</tr>
<tr class="picbox">

@ -202,6 +202,14 @@
<textarea name="introduction" class="txt_area">{$data['introduction']}</textarea>
</td>
</tr>
<tr>
<td class="l">游戏资料中心:</td>
<td class="r">
<textarea name="content" class="txt_area">{$data['detail_content']}</textarea>
{:hook('adminArticleEdit', array('name'=>'content','value'=>$field['value']))}
</td>
</tr>
<tr class="picbox">
<td class="l noticeinfo" >游戏ICON</td>
<td class="r">

@ -199,6 +199,105 @@ class ApplyController extends BaseController
$this->display('index');
}
//查看游戏资料专区
public function feature($p = 0, $type = 0)
{
$promoteId = empty(I('promote_id')) ? PID : I('promote_id');//搜索的渠道ID
$promoteRole = empty(I('promote_role')) ? 1 : I('promote_role');//渠道角色
//$parentPromoteId = getParentPromoteId($promoteId);//上级渠道ID
$thisParentPromoteId = getParentPromoteId(PID);//本账号上级渠道ID
// $addPermission = 1;//是否有添加游戏权限
// if ($thisParentPromoteId == 0 && $promoteRole == 3) {
// $addPermission = 0;
// }
$map['tab_game.online_status'] = 1;//开发者游戏上线状态
$map['tab_game.down_port'] = 1;//游戏端口 第三方接口不能申请
$map['tab_game.game_status'] = 1;//游戏状态
$map['tab_game.developers'] = 0; //平台游戏(官网游戏,非开发者游戏)
$applyPromote = M('apply','tab_')->field('game_id')->where(['promote_id' => $promoteId])->select();
$noDeveloperGameArr = array();
foreach ($applyPromote as $key => $value) {
$applyPromoteGameId = $value['game_id'];
$gameInfo = M('Game','tab_')
->field('id,icon,game_name,features,sdk_version,game_size,game_type_name,relation_game_name,developers')
->where(['id' => $applyPromoteGameId])->select();
if($gameInfo[0]['developers'] > 0){
unset($gameInfo[0]['developers']);
$noDeveloperGameArr[] = $gameInfo[0]['id'] ; //非开发者游戏
}
}
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
if (isset($_REQUEST['row'])) {
$row = $_REQUEST['row'];
} else {
$row = 10;
}
$map['_logic'] = 'and';
if (!empty(I('game_id'))) {
$thisRelationGameName = M('Game', 'tab_')->where(array('id' => I('game_id')))->getField('relation_game_name');
$map['tab_game.relation_game_name'] = ['like', $thisRelationGameName];
$where['_complex'] = $map;
// $where['tab_game.id'] = ['in',$noDeveloperGameArr];
// $where['_logic']='or';
}else {
$where['_complex'] = $map;
$where['tab_game.id'] = ['in',$noDeveloperGameArr];
$where['_logic']='or';
}
$data = M('Game', 'tab_')
->field('tab_game.id,tab_game.icon,tab_game.game_name,tab_game.features,tab_game.sdk_version,tab_game.game_size,tab_game.game_type_name,tab_game.relation_game_name,ta_1.id as apply_id_1')
->join('left join tab_apply as ta_1 on tab_game.id = ta_1.game_id and ta_1.offline_status = 0 and ta_1.promote_id = ' . $promoteId)//查询是否拥有该游戏
->where($where)
->order('tab_game.developers desc,tab_game.sort desc,tab_game.id desc')
->page($page, $row)
->select();
//$AllData = array_merge($noDeveloperGameArr,$data);
/* 查询记录总数 */
$count = M("Game", "tab_")
->field('tab_game.id')
->where($map)
->select();
$count = count($count);
//分页
$parameter['p'] = I('get.p', 1);
$parameter['row'] = I('get.row');
$parameter['type'] = $type;
$parameter['promote_role'] = $promoteRole;
empty(I('promote_id')) || $parameter['promote_id'] = I('promote_id');
$page = set_pagination($count, $row, $parameter);
if ($page) {
$this->assign('_page', $page);
}
$this->assign('list_data', $data);
$this->assign("count", $count);
$this->assign("promoteId", $promoteId);
// $this->assign('parentPromoteId', $parentPromoteId);
$this->assign('thisParentPromoteId', $thisParentPromoteId);
// $this->assign('promoteRole', $promoteRole);
$this->assign('pID', PID);
//$this->assign('promoteData', getAllPromoteListByType($promoteRole));
// $this->assign('addPermission', $addPermission);
// $this->assign('type', $type);
$this->meta_title = "申请游戏";
$this->display();
}
//查看游戏详情
public function viewGameDetailed()
{
@ -1597,4 +1696,25 @@ class ApplyController extends BaseController
$this->ajaxReturn(['status' => 1, 'data' => $enableStatus]);
}
public function backDetailData() { //返回详情数据
$result = ['code' => 10001,'msg' => "该游戏信息不存在,请确认!",'error' => 1,'info' => ''];
$id = $_POST['id'];
if(empty($id)) {
$this->ajaxReturn($result);
}
$gameInfo = M('Game','tab_')->where(['id' => $id])->getField('detail_content');
if(!$gameInfo) {
$this->ajaxReturn($result);
}else {
$result['code'] = 10000;
$result['msg'] = "获取信息成功";
$result['error'] = -1;
$result['info'] = $gameInfo;
$this->ajaxReturn($result);
}
}
}

@ -0,0 +1,748 @@
<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: row;
flex-wrap: wrap;
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>&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>
</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>

@ -67,3 +67,4 @@ alter table tab_game_source add column `org_plist_url` varchar(255) NOT NULL def
-- 2019-10-08 cxj
-- ----------------------------
ALTER TABLE `tab_game` ADD COLUMN `server_type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '1-专服 2-混服' AFTER `support_ratio`;
ALTER TABLE `tab_game` ADD COLUMN `detail_content` MEDIUMTEXT NULL DEFAULT NULL COMMENT '游戏资料介绍' AFTER `features`;
Loading…
Cancel
Save