管理后台新增功能添加

master
zhengyongxing 5 years ago
parent 58399f4c69
commit fa393d9c90

@ -0,0 +1,73 @@
<?php
namespace Admin\Controller;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class SuperSignController extends ThinkController
{
public function lists($p = 1) {
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$map =[];
if (I('account')) {
$map['tab_user.account'] = I('account');
}
if (I('order_id')) {
$map['order_id'] = I('order_id');
}
if (I('start')&&I('end')) {
$map['pay_time'] = ['between',[strtotime(I('start')),strtotime(I('end'))]];
} else if(I('start')&&!I('end')) {
$map['pay_time'] = ['egt',strtotime(I('start'))];
} else if (!I('start')&&I('end')) {
$map['pay_time'] = ['elt',strtotime(I('end'))];
}
if (I('game_name')) {
$map['game_name'] = ['like',I('game_name').'%'];
}
if (I('promote_id')||I('promote_id')==0) {
$map['tab_user.promote_id'] = I('promote_id');
}
$map['tab_game_supersign.pay_status'] = 1;
$data = M('game_supersign','tab_')
->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price")
->join("left join tab_user on tab_game_supersign.user_id = tab_user.id")
->join("left join tab_game on tab_game_supersign.game_id = tab_game.id")
->page($p, $row)
->where($map)
->select();
foreach ($data as $key => $Value) {
$data[$key]['pay_time'] = date('Y-m-d H:i:s',$Value['pay_time']);
}
$count = M('game_supersign','tab_')
->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price")
->join("left join tab_user on tab_game_supersign.user_id = tab_user.id")
->join("left join tab_game on tab_game_supersign.game_id = tab_game.id")->where($map)->count();
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
}
$this->m_title = '推广员列表';
$this->assign('data',$data);
$this->display();
}
}

@ -0,0 +1,192 @@
<?php
namespace Admin\Controller;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class TestWhiteListController extends ThinkController
{
public function lists($p = 1) {
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$map =[];
if (I('account')) {
$map['account'] = array('like',I('account').'%');
}
$data = M('test_white_list','tab_')
->page($p, $row)
->where($map)
->select();
foreach ($data as $key => $Value) {
// $data[$key]['show_status'] = $data[$key]['show_status']?'显示':'锁定';
$data[$key]['create_ime'] = date('Y-m-d H:i:s',$Value['create_ime']);
}
$count = M('test_white_list','tab_')
->where($map)
->count();
$page = set_pagination($count, $row);
if ($page) {
$this->assign('_page', $page);
}
$this->m_title = '测试白名单';
$this->assign('data',$data);
$this->display();
}
public function add() {
$this->m_title = '测试白名单添加';
$this->assign('title','新增');
$this->display();
}
public function edit() {
$this->m_title = '测试白名单编辑';
$this->assign('title','编辑');
$this->display("add");
}
public function edit_user() {
$data = I('');
if (!$data['user_id']) {
$this->error('请填写测试账号');
}
$userData['account'] = $data['account'];
$user = M('user','tab_')->where(array('id'=>$data['user_id']))->find();
if (!$user) {
$this->error('账号不存在');
}
$userData['check_status'] = $data['status']?$data['status']:0;
$userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData);
if ($userAdd) {
$whitedata['show_status'] = $data['status']?$data['status']:0;
$whitedata['account'] = $data['account'];
$whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata);
// echo M('test_white_list','tab_')->_sql();die();
if($whiteList) {
$this->success('修改白名单成功',U('TestWhiteList/lists'));
} else {
$this->error('修改白名单失败');
}
} else {
$this->error('修改用户失败');
}
}
public function edit_user1() {
$data = $_GET;
if (!$data['user_id']) {
$this->ajaxReturn(['status'=>0,'msg'=>"请填写测试账号"]);
}
$userData['account'] = $data['account'];
$user = M('user','tab_')->where(array('id'=>$data['user_id']))->find();
if (!$user) {
$this->ajaxReturn(['status'=>0,'msg'=>"账号不存在"]);
}
$userData['check_status'] = $data['status']?$data['status']:0;
$userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData);
if ($userAdd) {
$whitedata['show_status'] = $data['status']?$data['status']:0;
$whitedata['account'] = $data['account'];
$whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata);
// echo M('test_white_list','tab_')->_sql();die();
if($whiteList) {
$this->ajaxReturn(['status'=>1,'msg'=>"修改白名单成功"]);
} else {
$this->ajaxReturn(['status'=>0,'msg'=>"修改白名单成功"]);
}
} else {
$this->ajaxReturn(['status'=>0,'msg'=>"修改用户失败"]);
}
}
public function add_user() {
$data = I('');
if (!$data['account']) {
$this->error('请填写测试账号');
}
$userData['account'] = $data['account'];
$user = M('user','tab_')->where($userData)->find();
if ($user) {
$this->error('账号已经存在');
}
$userData['password'] = md5(sha1('123456') . UC_AUTH_KEY);
$userData['promote_id'] = 0;
$userData['promote_account'] = '官方渠道';
$userData['register_time'] = time();
$userData['check_status'] = $data['status']?$data['status']:0;
$userAdd = M('user','tab_')->add($userData);
if ($userAdd) {
$data['user_id'] = $userAdd;
$data['show_status'] = $data['status']?$data['status']:0;
$data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username'];
$data['create_ime'] = time();
$whiteList = M('test_white_list','tab_')->add($data);
if($whiteList) {
$this->success('添加白名单成功',U('TestWhiteList/lists'));
} else {
$this->error('添加白名单失败');
}
} else {
$this->error('添加用户失败');
}
}
public function freezeSupport() {
$supportId = I('status');
$data = [
'check_status' => $supportId
];
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
if ($supportId == 1) {
$msg = '启用';
} else if ($supportId == 0) {
$msg = '锁定';
}
if ($isFreeze) {
$this->ajaxReturn(['status'=>1, 'msg'=> $msg.'成功']);
} else {
$this->ajaxReturn(['status'=>0, 'msg'=> $msg.'失败']);
}
}
}

@ -0,0 +1,438 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css"/>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<!-- 标题栏 -->
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">超级签订单</h3>
<p class="description_text">说明:超级签购买订单</p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" name="{$model['search_key']|default='user_account'}" placeholder="玩家账号" class=""
value="{:I('user_account')}">
</div>
<div class="input-list">
<input type="text" name="order_id" class="" value="{:I('order_id')}" placeholder="支付订单号">
</div>
<div class="input-list">
<input type="text" readonly id="time-start" name="start" class="" value="{$_GET['start']}"
placeholder="开始时间"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" readonly id="time-end" name="end" class="" value="{$_GET['end']}"
placeholder="结束时间"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <?php echo $vo.relation_game_name == I('game_name') ? 'selected':''; ?> >{$vo.game_name}</option>
</volist>
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_level" style="color:#444" class="select_gallery" id="promote_level">
<option value="">请选择推广员等级</option>
<option value="1" <?php if ($_POST['promote_level'] == 1):?>selected<?php endif;?>>会长</option>
<option value="2" <?php if ($_POST['promote_level'] == 2):?>selected<?php endif;?>>部门长</option>
<option value="3" <?php if ($_POST['promote_level'] == 3):?>selected<?php endif;?>>组长</option>
<option value="4" <?php if ($_POST['promote_level'] == 4):?>selected<?php endif;?>>组员</option>
</select>
-
</div>
<div class="input-list search_item input-list-gamenoticestatus">
<select name="promote_id" style="color:#444" class="select_gallery" id="promote_id">
<option value="">请选择推广员</option>
</select>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list search_item">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('SuperSign/lists','model='.$model['name'] . '&row='.I('row'),false)}">搜索</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list zdata_list">
<div class="">
<table>
<!-- 表头 -->
<thead>
<tr>
<th>支付订单号</th>
<th>超级签授权码</th>
<th>购买时间</th>
<th>玩家账号</th>
<th>游戏名称</th>
<th>所属推广员</th>
<th>实付金额</th>
<th>购买方式</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name="data">
<td colspan="15" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="data" id="data">
<tr>
<td>{$data.order_id}</td>
<td>{$data.ticket}</td>
<td>{$data.pay_time}</td>
<td>{$data.account}</td>
<td>{$data.game_name}</td>
<td>
<if condition="$data.promote_account == '自然注册'">
官方渠道
<else />
{$data.promote_account}
</if>
</td>
<td>{$data.pay_price}</td>
<td></td>
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
</div>
<div class="page">
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>7,'xlsname'=>'游戏订单_游戏充值'),I('get.')))}">导出</a>-->
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Spend/lists">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script>
<volist name = ":I('get.')" id = "vo">
Think.setValue('{$key}', "{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('SuperSign/lists')}');
$(function () {
//搜索功能
$("#search").click(function () {
var sdate = Date.parse($('#time-start').val()) / 1000;
var edate = Date.parse($('#time-end').val()) / 1000;
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天请重新选择日期');
return false;
}
var url = $(this).attr('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;
});
$(".paixu").click(function () {
var that = $(this);
$data_order = that.attr('data-order');
$order_type = '{$userarpu_order}';
if ($order_type == '' || $order_type == '4') {
$(".sortBy").attr('name', 'data_order');
val = '3,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
} else if ($order_type == '3') {
$(".sortBy").attr('name', 'data_order');
val = '4,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
}
});
//回车自动提交
$('.jssearch').find('input').keyup(function (event) {
if (event.keyCode === 13) {
$("#search").click();
}
});
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$("#time-end").datetimepicker({
format:"yyyy-mm-dd",
language: "zh-CN",
showMeridian:true,
minView:2,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$(".budan").click(function () {
url = $(this).attr('href-hhh');
data = $(this).attr('href-data');
$.ajax({
type: 'post',
url: url,
data: {orderNo: data},
success: function (e) {
if (e.status == 1) {
layer.msg(e.msg, {icon: 1});
setTimeout(function () {
location.reload();
}, 1500);
} else {
layer.msg(e.msg, {icon: 2});
}
},
});
});
$(".budan2").click(function () {
url = $(this).attr('href-hhh');
data = $(this).attr('href-data');
$.ajax({
type: 'post',
url: url,
data: {orderNo: data},
success: function (e) {
if (e.status == 1) {
if (e.msg.length > 30) {
window.open(e.msg);
} else {
layer.msg(e.msg, {icon: 1});
setTimeout(function () {
location.reload();
}, 1500);
}
} else {
layer.msg(e.msg, {icon: 2});
}
},
});
});
$(".d_list").find(".drop-down11").hover(function () {
$(this).find(".nav-list").removeClass("hidden");
}, function () {
$(this).find(".nav-list").addClass("hidden");
});
$(".drop-down11 .nav-list li").find("a").each(function () {
var that = $(".drop-down11");
$(this).click(function () {
var text = $(this).text(), val = $(this).attr("value");
that.find(".sort-txt").text(text).attr("data", val);
that.find(".nav-list").addClass("hidden");
that.siblings('.hiddenvalue').val(val);
})
});
$(".d_list").find(".drop-down12").hover(function () {
$(this).find(".nav-list").removeClass("hidden");
}, function () {
$(this).find(".nav-list").addClass("hidden");
});
$(".drop-down12 .nav-list li").find("a").each(function () {
var that = $(".drop-down12");
$(this).click(function () {
var text = $(this).text(), val = $(this).attr("value");
that.find(".sort-txt").text(text).attr("data", val);
that.find(".nav-list").addClass("hidden");
that.siblings('.hiddenvalue').val(val);
})
});
$(".d_list").find(".drop-down13").hover(function () {
$(this).find(".nav-list").removeClass("hidden");
}, function () {
$(this).find(".nav-list").addClass("hidden");
});
$(".drop-down13 .nav-list li").find("a").each(function () {
var that = $(".drop-down13");
$(this).click(function () {
var text = $(this).text(), val = $(this).attr("value");
that.find(".sort-txt").text(text).attr("data", val);
that.find(".nav-list").addClass("hidden");
that.siblings('.hiddenvalue').val(val);
})
});
//下拉内容框
$(".drop-down2").on('click', function (event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$('#i_list_id').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function () {
navlist.addClass('hidden');
});
event.stopPropagation();
});
$('#i_list_id').on('keyup', function (event) {
var val = $.trim($(this).val()).toLowerCase();
$('#i_list_idh').val(val);
});
$("#i_list_li").find("a").each(function () {
$(this).click(function () {
var text = $.trim($(this).text()).toLowerCase();
$("#i_list_id").val(text);
$('#i_list_idh').val(text);
})
});
})
var promote_id = "{:I('promote_id')}";
$("#promote_level").change(function(){
$.ajax({
url:"{:U('Ajax/getPromotersByLevel')}",
type:"get",
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
var game_server = "{:I('server_name')}";
$("#game_type").change(function(){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_name").empty();
$("#server_name").append(str);
$("#server_name").select2();
}
})
});
$("#game_name").change(function(){
$("#game_type").change();
});
$("#game_name").change();
/**
* 初始化select2单选默认带搜索功能。
*/
//初始化页面加载
$(document).ready(function () {
});
</script>
</block>

@ -0,0 +1,116 @@
<extend name="Public/base" />
<block name="body">
<!-- <link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all"> -->
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
<div class="cf main-place top_nav_list navtab_list">
<ul class="tabnav1711 fr jstabnav">
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li></li>
<li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>
</ul>
<h3 class="page_title">{$title}测试账号</h3>
<!-- <p class="description_text">说明:此功是查看推广员的基础信息</p>-->
</div>
<!-- 标签页导航 -->
<div class="tab-wrap">
<div class="tab-content tabcon1711">
<!-- 表单 -->
<if condition="$title eq '编辑'" >
<form id="form" action="{:U('edit_user?model='.$model['id'])}" method="post" class="form-horizontal">
<else />
<form id="form" action="{:U('add_user?model='.$model['id'])}" method="post" class="form-horizontal">
</if>
<!-- 基础文档模型 -->
<div id="tab1" class="tab-pane in tab1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l">测试账号:</td>
<td class="r">
<input type="text" class="txt" name="account" value="{$_REQUEST['account']}" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
<input type="hidden" name="user_id" value="{$_REQUEST['user_id']}">
</td>
</tr>
<td class="l">显示状态:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label >
<input type="radio" value="1" name="status" <if condition="$_REQUEST['show_status'] eq 1">checked="checked"</if>>开启
</label >
<label >
<input type="radio" value="0" name="status" <if condition="$_REQUEST['show_status'] eq 0">checked="checked"</if>>{:L('Lock')}
</label>
</span>
<input type="hidden" name="status" id="status" value="{$data['status']}">
<script>
$(function () {
var status = $('input:radio[name="status"]:checked').val();
$('#status').val(status);
});
$(":radio").click(function () {
var status = $('input:radio[name="status"]:checked').val();
$('#status').val(status);
})
</script>
</td>
</tr>
</tbody>
</table>
</div>
<div class="form-item cf">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
返回
</a>
</div>
</form>
</div>
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Promote/lists/type/1">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Promote/lists')}');
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
Think.setValue("category", {$data.category|default = 0});
Think.setValue("ba_id", {$data.ba_id|default = 0});
$(function(){
// var pro="{:$data['bank_area']['0']}";
// alert (pro);
showTab();
prov="{:substr($data['bank_area'],0,2)}";
city="{:substr($data['bank_area'],2,2)}";
ciarea="{:substr($data['bank_area'],4,2)}";
//initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, prov, city, ciarea);
});
</script>
</block>

@ -0,0 +1,250 @@
<extend name="Public/base"/>
<block name="body">
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<style>
.select2-container--default .select2-selection--single {
color: #000;
resize: none;
border-width: 1px;
border-style: solid;
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
height:28px;border-radius:3px;font-size:12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
line-height:35px;
line-height:28px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
height:26px;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
height:26px;line-height:26px;font-size:12px;
}
.select2-results__option[aria-selected] {font-size:12px;}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">测试白名单</h3>
<p class="description_text">说明:测试白名单内的所有测试账号产生的流水须导入正式环境的月结统计功能内</p>
</div>
<div class="cf top_nav_list">
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list">
<div class="input-list search-title-box">
<label>搜索:</label>
</div>
<div class="input-list">
<input type="text" id="search-input" name="account" class="" value="{:I('account')}"
placeholder="玩家账号"/>
</div>
<input type="hidden" name="" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search"
url="{:U('TestWhiteList/lists','model='.$model['name'] . '&row='.I('row'),false)}">搜索</a>
<a class="sch-btn" style="background: #ffffff;border: #000000 solid 1px;color: #000000;width:120px" href="{:U('TestWhiteList/add')}" >添加测试账号</a>
</div>
</div>
</div>
<!-- 数据列表 -->
<div class="data_list">
<div>
<table>
<!-- 表头 -->
<thead>
<tr>
<th>测试账号</th>
<th>显示状态</th>
<th>添加人</th>
<th>添加时间</th>
<th>操作</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<empty name ="data">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="data" id="data">
<tr>
<td>{$data['account']}</td>
<td><if condition="$data['show_status'] eq 0"> 锁定 <else /> 正常 </if></td>
<td>{$data.add_user}</td>
<td>{$data.create_ime}</td>
<td>
<a href="{:U('TestWhiteList/edit',array('user_id'=>$data['user_id'],'account'=>$data['account'],'status'=>$data['show_status']))}" style="width:100%;">编辑</a>
<if condition="$data['show_status'] eq 1">
<a class="froze-btn" href-hhh="{:U('TestWhiteList/edit_user1',array('user_id'=>$data['user_id'],'status'=>0,'account'=>$data['account']))}" style="width:100%;">锁定</a>
<else />
<a class="froze-btn" href-hhh="{:U('TestWhiteList/edit_user1',array('user_id'=>$data['user_id'],'status'=>1,'account'=>$data['account']))}" style="width:100%;">开启</a>
</if>
</td>
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page|default=''}
</div>
<div class="common_settings">
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
<form class="addShortcutIcon">
<input type="hidden" name="title" value="{$m_title}">
<input type="hidden" name="url" value="Deposit/lists">
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '
<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
';
</php>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script>
<volist name=":I('get.')" id="vo">
Think.setValue('{$key}',"{$vo}");
</volist>
$(".select_gallery").select2();
</script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Deposit/lists')}');
$(function () {
$('.froze-btn').on({
click: function() {
var url = $(this).attr('href-hhh');
console.log(url);
layer.confirm('是否确认修改测试账号状态?', {icon: 3, title:'提示',skin:'textColor'}, function(index){
$.ajax({
url: url,
type: 'post',
dataType: 'json',
success: function(response) {
layer.msg(response.msg, {time: 1000,skin:'msgClolor'}, function() {
window.location.href = window.location.href
})
}
})
})
}
})
//搜索功能
$("#search").click(function () {
var url = $(this).attr('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;
}
var start = $("#time-start").val();
var end = $("#time-end").val();
if (start !='' && end != ''){
if (Date.parse(start) > Date.parse(end)){
layer.msg('开始时间必须小于等于结束时间');
return false;
}
}
window.location.href = url;
});
//回车自动提交
$('.jssearch').find('input').keyup(function (event) {
if (event.keyCode === 13) {
$("#search").click();
}
});
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true
});
$('#datetimepicker').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
minView: 2,
autoclose: true,
pickerPosition: 'bottom-left'
})
$(".drop-down2").on('click', function (event) {
var navlist = $(this).find('.i_list_li');
if (navlist.hasClass('hidden')) {
navlist.removeClass('hidden');
$('#promoteid').focus().val('');
} else {
navlist.addClass('hidden');
}
$(document).one("click", function () {
navlist.addClass('hidden');
});
event.stopPropagation();
});
var a = $('.i_list_li li a');
$('#promoteid').on('keyup', function (event) {
var val = $.trim($(this).val()).toLowerCase();
$('#promoteid').val(val);
$('#promoteidh').val(-1);
});
})
/**
* 初始化select2单选默认带搜索功能。
*/
//初始化页面加载
$(document).ready(function () {
//初始化select2单选
initSelect2WithSearch();
});
function initSelect2WithSearch() {
// $("#sel_order").select2({
// tags: true,
// placeholder: '订单状态',
// allowClear: false, //清空
// minimumResultsForSearch: Infinity, // 永久隐藏搜索框
// });
}
</script>
<style>
.textColor .layui-layer-content{color: #000000;}
.msgClolor .layui-layer-content{color: #ffffff;background:#000; opacity: 0.8;text-align: center}
</style>
</block>
Loading…
Cancel
Save