|
|
|
@ -44,6 +44,7 @@
|
|
|
|
|
<li data-tab="tab3" ><a href="javascript:void(0);">参数配置</a></li>
|
|
|
|
|
<li data-tab="tab4" ><a href="javascript:void(0);">H5分享页面</a></li>
|
|
|
|
|
<li data-tab="tab5" ><a href="javascript:void(0);">用户等级设置</a></li>
|
|
|
|
|
<li data-tab="tab6" ><a href="javascript:void(0);">推广配置</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<h3 class="page_title">编辑游戏【{$data.relation_game_name}】</h3>
|
|
|
|
|
<p class="description_text">说明:查看和编辑游戏的基础信息、下载设置、参数信息等。</p>
|
|
|
|
@ -924,6 +925,91 @@
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--推广配置-->
|
|
|
|
|
<div id="tab6" class="tab-pane tab6 ">
|
|
|
|
|
<input type="button" id="addpromote" onclick="addPromote()" style="background: #3E96C9;color:white;border:none;outline: none;width:90px;height:30px;border-radius: 3px;" value="添加" />
|
|
|
|
|
<div class="data_list data_game_list" id="addpromoteindex" style="margin-top:20px;">
|
|
|
|
|
<div class="">
|
|
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>会长账号</th>
|
|
|
|
|
<th>添加时间</th>
|
|
|
|
|
<th>是否已进行推广</th>
|
|
|
|
|
|
|
|
|
|
<th style="width:10%;min-width:150px;">操作</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<if condition="$apply_auth eq 2">
|
|
|
|
|
<empty name ="sociatygames">
|
|
|
|
|
<td colspan="14" class="text-center">aOh! 暂时还没有内容!</td>
|
|
|
|
|
<else />
|
|
|
|
|
<volist name="sociatygames" id="data">
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{$data['promoteAccount']}</td>
|
|
|
|
|
<td>{$data['create_time']}</td>
|
|
|
|
|
<td>{$data['isPromote']}</td>
|
|
|
|
|
<td class="" style="color:red"><a href="javascript:void()" onclick="del({$data['id']})">移除</a></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</volist>
|
|
|
|
|
</empty>
|
|
|
|
|
<else/>
|
|
|
|
|
<td colspan="14" class="text-center">该游戏未设置会长权限,现面对所有会长开放!</td>
|
|
|
|
|
</if>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" id="promoteset" style="display:none">
|
|
|
|
|
<tbody >
|
|
|
|
|
<tr style="display:block;width:600px;" >
|
|
|
|
|
<td class="l">推广限制</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="radio" class="inp_radio js-device js-devices{$key}" value="0" id="all" name="apply_auth" checked> 全部会长可申请
|
|
|
|
|
<input type="radio" class="inp_radio js-device js-devices{$key}" value="0" id="part" name="apply_auth" style="margin-left:20px"> 部分会长可申请
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr style="display:none;width:600px;" id="addtype">
|
|
|
|
|
<td class="l" >添加方式</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="radio" class="inp_radio js-device js-devices{$key}" value="" id="excel" name="" checked> EXCEL导入
|
|
|
|
|
|
|
|
|
|
<input type="radio" class="inp_radio js-device js-devices{$key}" value="" id="partchoose" name="" style="margin-left:20px"> 批量选择
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr style="display:none" id="moban">
|
|
|
|
|
<td class="l">EXCEL模板</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<a href="{:U('downloadDemo',['game_id'=>$game_id])}">下载模板</a>
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr style="display:none" id="daoru">
|
|
|
|
|
|
|
|
|
|
<td class="l">导入模板</td>
|
|
|
|
|
<td class="r" >
|
|
|
|
|
<input type="file" name="upfile" id="file_excel" style="width:200px"/>
|
|
|
|
|
<input type="button" onclick="suba({$game_id})" style="background: #3E96C9;color:white;border:none;outline: none;width:70px;height:30px;border-radius: 3px;" value="导入" />
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="data_list data_game_list" id="data_list"></div>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="__STATIC__/layui-v2.5.5/css/layui.css">
|
|
|
|
|
<input type="hidden" name="group_id" id="group_id" value="{$_GET['group_id']}">
|
|
|
|
|
<input type="hidden" name="promote_data" id="promote_data" value="[]">
|
|
|
|
|
<div id="transfer_promote" class="demo-transfer" style="margin-left: 100px;margin-top: 35px;display:none"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-item cf">
|
|
|
|
|
<input type="hidden" name='id' value="{$data['id']}" />
|
|
|
|
|
<input type="hidden" name='type' value="{$_GET['type']}" />
|
|
|
|
@ -952,7 +1038,198 @@
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<block name="script">
|
|
|
|
|
<script src="__STATIC__/layui-v2.5.5/layui.all.js"></script>
|
|
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
var dataTransfer = '';
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "{:U('getRootPromote')}",
|
|
|
|
|
type: "post",
|
|
|
|
|
data: {group_id: 1},
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
success: function (data) {
|
|
|
|
|
console.log(data,'datadadaa')
|
|
|
|
|
// datas = data;
|
|
|
|
|
layui.use(['transfer', 'layer', 'util'], function(){
|
|
|
|
|
var $ = layui.$
|
|
|
|
|
,transfer = layui.transfer
|
|
|
|
|
,layer = layui.layer
|
|
|
|
|
,util = layui.util;
|
|
|
|
|
|
|
|
|
|
var data1 =data;
|
|
|
|
|
|
|
|
|
|
if (JSON.parse(data1).data_president) {
|
|
|
|
|
var data2 = JSON.parse(data1).data_president.split(",");
|
|
|
|
|
}
|
|
|
|
|
// var dataTransfers = transfer.getData('key123');
|
|
|
|
|
// $('#promote_data').val(JSON.stringify(dataTransfers));
|
|
|
|
|
//显示搜索框
|
|
|
|
|
transfer.render({
|
|
|
|
|
elem: '#transfer_promote'
|
|
|
|
|
,data: JSON.parse(data1).list
|
|
|
|
|
,title: ['全部成员', '选中成员']
|
|
|
|
|
,showSearch: true,
|
|
|
|
|
value: data2,
|
|
|
|
|
id: 'key123',
|
|
|
|
|
onchange: function(data, index){
|
|
|
|
|
dataTransfer = transfer.getData('key123'); //获取右侧数据
|
|
|
|
|
// layer.alert(JSON.stringify(dataTransfer));
|
|
|
|
|
$('#promote_data').val(JSON.stringify(dataTransfer));
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
var dataTransfers = transfer.getData('key123');
|
|
|
|
|
$('#promote_data').val(JSON.stringify(dataTransfers));
|
|
|
|
|
transfets = transfer;
|
|
|
|
|
//批量办法定事件
|
|
|
|
|
util.event('lay-demoTransferActive', {
|
|
|
|
|
getData: function(othis){
|
|
|
|
|
var getData = transfer.getData('key123'); //获取右侧数据
|
|
|
|
|
layer.alert(JSON.stringify(getData));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$("#part").click(function() {
|
|
|
|
|
var addtype = document.getElementById("addtype");
|
|
|
|
|
|
|
|
|
|
addtype.style.display = "block"
|
|
|
|
|
$("#part").attr('checked',true)
|
|
|
|
|
$("#all").attr('checked',false)
|
|
|
|
|
var moban = document.getElementById("moban");
|
|
|
|
|
moban.style.display = "block"
|
|
|
|
|
var daoru = document.getElementById("daoru");
|
|
|
|
|
daoru.style.display = "block"
|
|
|
|
|
document.getElementById('all').value = 1
|
|
|
|
|
document.getElementById('part').value = 2
|
|
|
|
|
})
|
|
|
|
|
$("#all").click(function() {
|
|
|
|
|
var addtype = document.getElementById("addtype");
|
|
|
|
|
addtype.style.display = "none"
|
|
|
|
|
$("#part").attr('checked',false)
|
|
|
|
|
$("#all").attr('checked',true)
|
|
|
|
|
$("#excel").attr('checked',true)
|
|
|
|
|
$("#partchoose").attr('checked',false)
|
|
|
|
|
var moban = document.getElementById("moban");
|
|
|
|
|
moban.style.display = "none"
|
|
|
|
|
var daoru = document.getElementById("daoru");
|
|
|
|
|
daoru.style.display = "none"
|
|
|
|
|
document.getElementById("transfer_promote").style.display = "none"
|
|
|
|
|
document.getElementById("data_list").style.display = "none"
|
|
|
|
|
document.getElementById('all').value = 1
|
|
|
|
|
document.getElementById('part').value = 2
|
|
|
|
|
})
|
|
|
|
|
$("#excel").click(function() {
|
|
|
|
|
var moban = document.getElementById("moban");
|
|
|
|
|
// addtype.style.display = "none"
|
|
|
|
|
$("#excel").attr('checked',true)
|
|
|
|
|
$("#partchoose").attr('checked',false)
|
|
|
|
|
moban.style.display = "block"
|
|
|
|
|
var daoru = document.getElementById("daoru");
|
|
|
|
|
daoru.style.display = "block"
|
|
|
|
|
document.getElementById('transfer_promote').style.display = "none"
|
|
|
|
|
document.getElementById("data_list").style.display = "block"
|
|
|
|
|
})
|
|
|
|
|
$("#partchoose").click(function() {
|
|
|
|
|
var moban = document.getElementById("moban");
|
|
|
|
|
// addtype.style.display = "none"
|
|
|
|
|
$("#excel").attr('checked',false)
|
|
|
|
|
$("#partchoose").attr('checked',true)
|
|
|
|
|
moban.style.display = "none"
|
|
|
|
|
var daoru = document.getElementById("daoru");
|
|
|
|
|
daoru.style.display = "none"
|
|
|
|
|
document.getElementById('transfer_promote').style.display = "block"
|
|
|
|
|
document.getElementById("data_list").style.display = "none"
|
|
|
|
|
})
|
|
|
|
|
function addPromote() {
|
|
|
|
|
var addpromoteindex = document.getElementById("addpromoteindex");
|
|
|
|
|
var addpromote = document.getElementById("addpromote");
|
|
|
|
|
var promoteset = document.getElementById("promoteset");
|
|
|
|
|
addpromoteindex.style.display = "none"
|
|
|
|
|
addpromote.style.display = "none"
|
|
|
|
|
promoteset.style.display = "block"
|
|
|
|
|
document.getElementById('all').value = 1
|
|
|
|
|
document.getElementById('part').value = 2
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function del(id) {
|
|
|
|
|
var msg = "确认删除该项?"
|
|
|
|
|
if(confirm(msg) == true) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"{:U('Game/delSociatyGames')}",
|
|
|
|
|
dataType:'json',
|
|
|
|
|
type:'POST',
|
|
|
|
|
data:{'id':id},
|
|
|
|
|
success:function(res) {
|
|
|
|
|
console.log(res.code)
|
|
|
|
|
if(res.code == 10001) {
|
|
|
|
|
window.location.reload();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function suba(game_id) {
|
|
|
|
|
var file_excel = $('#file_excel')[0].files[0]
|
|
|
|
|
var formData = new FormData();
|
|
|
|
|
formData.append("file",file_excel);
|
|
|
|
|
formData.append("game_id",game_id)
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:"{:U('Game/uploadExcel1')}",
|
|
|
|
|
dataType:'json',
|
|
|
|
|
type:'POST',
|
|
|
|
|
async:false,
|
|
|
|
|
data:formData,
|
|
|
|
|
processData : false, // 使数据不做处理
|
|
|
|
|
contentType : false, // 不要设置Content-Type请求头
|
|
|
|
|
success:function(res) {
|
|
|
|
|
document.getElementById('data_list').style.display = "block"
|
|
|
|
|
|
|
|
|
|
res = JSON.parse(res)
|
|
|
|
|
var datalist = res.datalist
|
|
|
|
|
var outPromote = res.outPromote
|
|
|
|
|
if(datalist.length > 0) {
|
|
|
|
|
html = '<div class="" style="width:500px"><table><thead><tr><th>录入成功会长账号</th></tr></thead><tbody>'
|
|
|
|
|
datalist.forEach(v=>{
|
|
|
|
|
html += '<tr><td>'+v['account']+'</td></tr>';
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
html = '<div class="" style="width:500px"><table><thead><tr><th>录入成功会长账号</th></tr></thead><tbody>'
|
|
|
|
|
+'<tr><td colspan="14" class="text-center">aOh! 暂无账号录入!</td></tr>'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
html += '</tbody></table></div>'
|
|
|
|
|
if(outPromote.length > 0) {
|
|
|
|
|
html += '<div class="" style="width:500px"><table><thead><tr><th>录入失败会长账号</th></tr></thead><tbody>'
|
|
|
|
|
outPromote.forEach(p=>{
|
|
|
|
|
html += '<tr><td>'+p['promote_account']+'</td></tr>';
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
html += '<div class="" style="width:500px"><table><thead><tr><th>录入失败会长账号</th></tr></thead><tbody>'
|
|
|
|
|
+'<tr><td colspan="14" class="text-center">aOh! 暂无录入失败会长账号!</td></tr>>'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
html += '</tbody></table></div>'
|
|
|
|
|
$("#data_list").html(html);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('[name=shift_mode]').on({
|
|
|
|
|
click: function () {
|
|
|
|
|
if ($(this).val() == 2) {
|
|
|
|
|
$('#shift-transfer').show()
|
|
|
|
|
} else {
|
|
|
|
|
$('#shift-transfer').hide()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
//导航高亮
|
|
|
|
|
highlight_subnav('{:U('Game/lists')}');
|
|
|
|
@ -2366,4 +2643,10 @@
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
.layui-transfer-box{
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
height: 410px!important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</block>
|
|
|
|
|