|
|
|
|
<extend name="Public/apply" />
|
|
|
|
|
<block name="body" >
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/uploadify.css">
|
|
|
|
|
<div class="matter" style="width: 1200px; margin: 10px auto">
|
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
|
<li><span class="iconfont icon-home" aria-hidden="true"></span><a href="{:U('Index/index')}">首页</a></li>
|
|
|
|
|
<li><a class="" href="{$p_url}">{$p_title}</a></li>
|
|
|
|
|
<li class="active">{$title}</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<div class="matter_right_top game_progress_wrap clearfix game_pro">
|
|
|
|
|
<img src="__IMG__/step.png" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="matter_right_content">
|
|
|
|
|
<form id="addServer" action="{:U('Game/edit',['id'=>I('id')])}" method="post" class="form-horizontal" enctype="multipart/form-data" novalidate="novalidate">
|
|
|
|
|
<div class="title create_title create_server_title">
|
|
|
|
|
<h3>基本信息 </h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><span class="must_red">*</span> 游戏名称</label>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc input-format matter_border">
|
|
|
|
|
<input type="text" class="form-control" value="{$data.game_name}" readonly disabled>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><span class="must_red">*</span> 游戏类型</label>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc input-format matter_border">
|
|
|
|
|
<input type="text" class="form-control" value="{$data.game_type_name}" readonly disabled>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><span class="must_red">*</span> 平台类型</label>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc input-format">
|
|
|
|
|
<div class="radio">
|
|
|
|
|
<label><input type="radio" value="1" name="sdk_version" readonly disabled> 安卓</label>
|
|
|
|
|
<label><input type="radio" value="2" name="sdk_version" readonly disabled> 苹果</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><span class="must_red">*</span>运营状态</label>
|
|
|
|
|
<div class="mrc_left mrc input-format ">
|
|
|
|
|
<select name="category" class="form-control" aria-required="true" aria-invalid="true" aria-describedby="open-error">
|
|
|
|
|
<volist name=":get_opentype_all()" id="vo">
|
|
|
|
|
<option value="{$vo.id}">{$vo.open_name}</option>
|
|
|
|
|
</volist>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc mrc_colum4_1_6 input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><span class="must_red">*</span> 游戏简介</label>
|
|
|
|
|
<div class="mrc_right4 mrc input-format">
|
|
|
|
|
<input type="text" class="form-control" name="features" placeholder="请将游戏简介浓缩为一句话,长度5-20个字" value="{$data.features}" >
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><font color="red">*</font> 游戏介绍</label>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc3 mrc input-format">
|
|
|
|
|
<textarea name="introduction" class="form-control" rows="4" placeholder="游戏介绍内容在50-200字以内">{$data.introduction}</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><font color="red">*</font> 游戏ICON</label>
|
|
|
|
|
<div class="mrc_colum2_5 mrc input-format">
|
|
|
|
|
<input type="file" id="upload_picture_icon">
|
|
|
|
|
<input type="hidden" name="icon" id="cover_id_icon" value="{$data.icon}" />
|
|
|
|
|
<div class="upload-img-box">
|
|
|
|
|
<notempty name="data['icon']">
|
|
|
|
|
<div class="upload-pre-item"><img src="{$data.icon|get_cover='path'}"/></div>
|
|
|
|
|
</notempty>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc">
|
|
|
|
|
<label class="col-lg-11 control-label matter_notice" style="font-weight: normal;text-align:left;color: #999;">尺寸不得小于512*512px,圆角半径113px,不强制要求,可直接提供512*512px方图</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><font color="red">*</font> 游戏推荐图</label>
|
|
|
|
|
<div class="mrc_colum2_5 mrc input-format">
|
|
|
|
|
<input type="file" id="upload_picture_cover">
|
|
|
|
|
<input type="hidden" name="cover" id="cover_id_cover" value="{$data.cover}" />
|
|
|
|
|
<div class="upload-img-box">
|
|
|
|
|
<notempty name="data['cover']">
|
|
|
|
|
<div class="upload-pre-item"><img src="{$data.cover|get_cover='path'}"/></div>
|
|
|
|
|
</notempty>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc">
|
|
|
|
|
<label class="col-lg-11 control-label matter_notice" style="font-weight: normal;text-align:left;color: #999;">470*350px(用于官网首屏推荐游戏位展示)</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"><font color="red">*</font> 游戏截图</label>
|
|
|
|
|
<div class="mrc_colum2_5 mrc input-format">
|
|
|
|
|
{:W('UploadImages/upload', array('key'=>['name'=>'screenshot','class'=>'user_file','value'=>$data['screenshot']]))}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc">
|
|
|
|
|
<label class="control-label matter_notice" style="font-weight: normal;text-align:left;color: #999;" >
|
|
|
|
|
横版游戏建议尺寸:16:9,1280*720px及以上;竖版游戏建议尺寸:9:16,720*1280px及以上,用于游戏详情页内展示
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"> 知识产权</label>
|
|
|
|
|
<div class="mrc_colum2_5 mrc input-format">
|
|
|
|
|
{:W('UploadImages/upload', array('key'=>['name'=>'accredit_img','class'=>'user_file','value'=>$data['accredit_img']]))}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mrc_right4_3_3 mrc">
|
|
|
|
|
<label class="col-lg-11 control-label matter_notice" style="font-weight: normal;text-align:left;">请上传游戏授权书或知识产权证明(选填,可在上线前补充)</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mrc_colum_ml mrc_colum4_1_6 mrc input-status"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
|
<label class="mrc_left mrc control-label"></label>
|
|
|
|
|
<div class="mrc_colum4_1_6 mrc">
|
|
|
|
|
<input name="id" type="hidden" value="{$data.id}">
|
|
|
|
|
<input type="submit" class="btn btn_primary user_btn" id="editServer" value="提交审核"> <a href="javascript:history.go(-1);" class="btn btn_default user_btn_default">取消</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
$(function() {
|
|
|
|
|
Think.setValue('sdk_version',"{$data['sdk_version']}");
|
|
|
|
|
Think.setValue('category',"{$data['category']}");
|
|
|
|
|
|
|
|
|
|
$.validator.addMethod("checkFileSize", function(value, element,params){
|
|
|
|
|
var size = element.files[0].size;
|
|
|
|
|
if (size<params) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}, "上传文件大小超出限制");
|
|
|
|
|
|
|
|
|
|
$.validator.addMethod("checkFileType", function(value, element,params){
|
|
|
|
|
var type = element.files[0].type;
|
|
|
|
|
if (!type) {type = element.files[0].name;}
|
|
|
|
|
var flag = false;
|
|
|
|
|
for (var i=0;i<params.length;i++) {
|
|
|
|
|
if (type.indexOf(params[i])>-1) {
|
|
|
|
|
flag = true;break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return flag;
|
|
|
|
|
}, "上传文件类型错误");
|
|
|
|
|
|
|
|
|
|
$("#addServer").validate({
|
|
|
|
|
//定义规则
|
|
|
|
|
rules:{
|
|
|
|
|
game_name: {
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
features: {
|
|
|
|
|
required: true,
|
|
|
|
|
rangelength: [5,20],
|
|
|
|
|
},
|
|
|
|
|
introduction: {
|
|
|
|
|
required: true,
|
|
|
|
|
rangelength: [50,200],
|
|
|
|
|
},
|
|
|
|
|
digest: {
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
icon: {
|
|
|
|
|
required: true,
|
|
|
|
|
checkFileSize: 2000000,
|
|
|
|
|
checkFileType: ['image/jpeg','image/png'],
|
|
|
|
|
},
|
|
|
|
|
shortcut: {
|
|
|
|
|
required: true,
|
|
|
|
|
checkFileSize: 2000000,
|
|
|
|
|
checkFileType: ['image/jpeg','image/png'],
|
|
|
|
|
},
|
|
|
|
|
sorce: {
|
|
|
|
|
required: true,
|
|
|
|
|
checkFileType: ['apk','ipa'],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
messages:{
|
|
|
|
|
game_name: {
|
|
|
|
|
required: "请填写游戏名称",
|
|
|
|
|
},
|
|
|
|
|
features: {
|
|
|
|
|
required: "请填写游戏简介",
|
|
|
|
|
rangelength: $.validator.format(" 游戏介绍内容在{0}-{1}字以内"),
|
|
|
|
|
},
|
|
|
|
|
introduction: {
|
|
|
|
|
required: "请填写游戏介绍内容",
|
|
|
|
|
rangelength: $.validator.format(" 游戏介绍内容在{0}-{1}字以内"),
|
|
|
|
|
},
|
|
|
|
|
icon: {
|
|
|
|
|
required: "请上传游戏图标",
|
|
|
|
|
checkFileSize: "上传文件不能超过2M",
|
|
|
|
|
checkFileType: "上传文件类型必须是.jpg 或 .png",
|
|
|
|
|
},
|
|
|
|
|
shortcut: {
|
|
|
|
|
required: "请上传游戏图标",
|
|
|
|
|
checkFileSize: "上传文件不能超过2M",
|
|
|
|
|
checkFileType: "上传文件类型必须是.jpg 或 .png",
|
|
|
|
|
},
|
|
|
|
|
sorce: {
|
|
|
|
|
required: "请上传游戏原包",
|
|
|
|
|
checkFileType: "上传文件类型必须是.apk 或 .ipa",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
submitHandler: function (form) {
|
|
|
|
|
var button = $(form).find('#editServer');
|
|
|
|
|
if(button.hasClass('nosubmit')) {return false;}
|
|
|
|
|
button.addClass('nosubmit');
|
|
|
|
|
$(form).ajaxSubmit({
|
|
|
|
|
url:"{:U('Game/edit',['id'=>I('id')])}",
|
|
|
|
|
success:function(result){
|
|
|
|
|
if(result.status == 1){
|
|
|
|
|
layer.msg(result.info,{time:1500},function(){
|
|
|
|
|
location.href = "{:U('Game/index')}";
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
layer.msg(result.info);setTimeout(function(){button.removeClass('nosubmit');},1500);
|
|
|
|
|
}
|
|
|
|
|
},error:function(a,b,c){layer.msg("服务器异常");button.removeClass('nosubmit');}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$.VMenu.show('#menu');
|
|
|
|
|
$.VMenu.open('m2.1');
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$("#upload_picture_icon").uploadify({
|
|
|
|
|
"height" : 30,
|
|
|
|
|
"swf" : "__STATIC__/uploadify/uploadify.swf",
|
|
|
|
|
"fileObjName" : "download",
|
|
|
|
|
"buttonText" : "上传图标",
|
|
|
|
|
"uploader" : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
|
|
|
|
|
"width" : 120,
|
|
|
|
|
'removeTimeout' : 1,
|
|
|
|
|
'buttonClass' : "user_file",
|
|
|
|
|
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
|
|
|
|
|
"onUploadSuccess" : upload_picture_icon,
|
|
|
|
|
'onFallback' : function() {
|
|
|
|
|
alert('未检测到兼容版本的Flash.');
|
|
|
|
|
},
|
|
|
|
|
'onUploadStart':function(file){
|
|
|
|
|
if(file.size>2*1024*1024) {
|
|
|
|
|
layer.msg('上传文件大小不符');
|
|
|
|
|
$("#upload_picture_icon").uploadify('cancel',file.id);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function upload_picture_icon(file, data){
|
|
|
|
|
var data = $.parseJSON(data);
|
|
|
|
|
var src = '';
|
|
|
|
|
if(data.status){
|
|
|
|
|
$("#cover_id_icon").val(data.id);
|
|
|
|
|
src = data.url || '__ROOT__' + data.path;
|
|
|
|
|
$("#cover_id_icon").parent().find('.upload-img-box').html(
|
|
|
|
|
'<div class="upload-pre-item"><img src="' + src + '"/></div>'
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(data.info,{icon:2});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#upload_picture_cover").uploadify({
|
|
|
|
|
"height" : 30,
|
|
|
|
|
"swf" : "__STATIC__/uploadify/uploadify.swf",
|
|
|
|
|
"fileObjName" : "download",
|
|
|
|
|
"buttonText" : "上传图片",
|
|
|
|
|
"uploader" : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
|
|
|
|
|
"width" : 120,
|
|
|
|
|
'removeTimeout' : 1,
|
|
|
|
|
'buttonClass' : "user_file",
|
|
|
|
|
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
|
|
|
|
|
"onUploadSuccess" : upload_picture_cover,
|
|
|
|
|
'onFallback' : function() {
|
|
|
|
|
alert('未检测到兼容版本的Flash.');
|
|
|
|
|
},
|
|
|
|
|
'onUploadStart':function(file){
|
|
|
|
|
if(file.size>2*1024*1024) {
|
|
|
|
|
layer.msg('上传文件大小不符');
|
|
|
|
|
$("#upload_picture_cover").uploadify('cancel',file.id);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function upload_picture_cover(file, data){
|
|
|
|
|
var data = $.parseJSON(data);
|
|
|
|
|
var src = '';
|
|
|
|
|
if(data.status){
|
|
|
|
|
$("#cover_id_cover").val(data.id);
|
|
|
|
|
src = data.url || '__ROOT__' + data.path;
|
|
|
|
|
$("#cover_id_cover").parent().find('.upload-img-box').html(
|
|
|
|
|
'<div class="upload-pre-item"><img src="' + src + '"/></div>'
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
updateAlert(data.info,'tip_error');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
$('#top-alert').find('button').click();
|
|
|
|
|
$(that).removeClass('disabled').prop('disabled',false);
|
|
|
|
|
},1500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</block>
|