Pro/application/admin/view/player/player-add.html
2026-02-25 01:50:31 +08:00

411 lines
17 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{include file="public/header"}
<style>
textarea, input[type="text"], input[type="password"],
.uneditable-input{border: 1px solid #ccc;background-color: #fff; }
.change_box a{font-size: 14px;padding: 10.5px 10px;}
.change_box .actived{border-right:1px solid #e5e5e5;border-left:1px solid #e5e5e5;border-top:1px solid #e5e5e5; position: relative; color: #3daae9; }
.change_box .actived:after{content: ""; bottom: -2px; background: #fff; width: 100%; height: 5px; position: absolute; left: 0; }
.x-nav{overflow: inherit; }
.x-nav .refresh{margin-right: 20px; }
.control-group{overflow: hidden; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dotted #dddddd; }
.control-label{float: left; padding-top: 3px; width: 160px; text-align: right; font-size: 14px; }
.controls{text-align: left; overflow-x: auto; overflow-y: hidden; margin-left: 180px; }
.controls input{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
.controls select{width: 300px; height: 24px; font-size: 14px; border-radius: 4px; padding-left:6px; }
.controls textarea{width: 400px; height: 90px; border-radius: 4px; } .form-horizontal{margin: 0 10px; }
.bottom-buttom{border-top: 1px solid #e5e5e5; margin-top: 20px; background-color: #f5f5f5; padding: 30px 0; }
.submit{width: 50px; text-align: center; background-color:#3daae9; color: #fff; padding: 5px 10px; font-size: 16px; border-radius: 4px; cursor:pointer; }
</style>
<body>
<div class="x-nav" style="padding: 0px;">
<span class="change_box">
<a href="javascript:;" class="list-one" data-id="1">玩家列表</a>
<a href="javascript:;" class="list-two actived" data-id="2">玩家添加</a>
</span>
<a class="layui-btn layui-btn-small refresh" style="line-height:1.6em;margin-top:3px;float:right"
href="javascript:location.replace(location.href);" title="刷新">
<i class="layui-icon" style="line-height:30px"></i></a>
</div>
<br>
<div class="info_from form-horizontal">
<div class="control-group">
<label class="control-label">上级代理:</label>
<div class="controls">
<select name="parent_agent" id="parent_agent">
<option value="0"></option>
{foreach name="agent_list" item="vo"}
<option value="{$vo.id}">{$vo.username}</option>
{/foreach}
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">账号:</label>
<div class="controls">
<input id="L_username" name="L_username" type="text" value maxlength="50" minlength="3" class="required">
<span class="help-inline">
<font color="red"> * 将会成为您唯一的登入名</font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">昵称:</label>
<div class="controls">
<input id="L_nickname" name="L_nickname" type="text" value maxlength="50" minlength="3" class="required">
<span class="help-inline">
<font color="red"> * </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">密码:</label>
<div class="controls">
<input id="L_pass" name="L_pass" type="password" value maxlength="50" minlength="3" class="required">
<span class="help-inline">
<font color="red"> * 6到16个字符</font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">确认密码:</label>
<div class="controls">
<input id="L_repass" name="L_repass" type="password" value maxlength="50" minlength="3" class="required"><span class="help-inline">
<font color="red"> * 与密码保持一致</font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">手机号码:</label>
<div class="controls">
<input id="L_mobile" name="L_mobile" type="text" value maxlength="50" minlength="3" class="required"><span class="help-inline">
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">邮箱:</label>
<div class="controls">
<input id="L_email" name="L_email" type="text" value maxlength="50" minlength="3" class="required">
</div>
</div>
<div class="control-group">
<label class="control-label">百家乐码率(%):</label>
<div class="controls">
<input id="L_ximalv" name="L_ximalv" type="text" value="0" maxlength="50" minlength="3" class="required"><span class="help-inline">
<font color="red"> * 无上级代理最高不能超过100% </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">龙虎码率(%):</label>
<div class="controls">
<input id="L_ximalv_dt" name="L_ximalv_dt" type="text" value="0" maxlength="50" minlength="3" class="required"><span class="help-inline">
<font color="red"> * 无上级代理最高不能超过100% </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">占成(%):</label>
<div class="controls">
<input id="L_cs" name="L_cs" type="text" value="0" maxlength="50" minlength="3" class="required"><span class="help-inline">
<font color="red"> * 无上级代理最高不能超过100% </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">最低限红:</label>
<div class="controls">
<input id="limit_low" name="limit_low" type="text" value maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 不填写则为0限红将根据桌子限红</font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">最高限红:</label>
<div class="controls">
<input id="limit_high" name="limit_high" type="text" value maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 不填写则为0限红将根据桌子限红</font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">投注方式:</label>
<div class="controls">
<select id="L_bet_type" name="L_bet_type" type="text" maxlength="20" min-length="3" class="required">
<option value="0">请选择投注方式</option>
<option value="1">网络投注</option>
<option value="2">电话投注</option>
<option value="3">所有投注</option>
</select>
<span class="help-inline">
<font color="red"> *</font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押庄赔率:</label>
<div class="controls">
<input id="price_banker" name="price_banker" type="text" value="0.95" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 百家乐 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押闲赔率:</label>
<div class="controls">
<input id="price_player" name="price_player" type="text" value="1" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 百家乐 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押和赔率:</label>
<div class="controls">
<input id="price_tie_baccarat" name="price_tie_baccarat" type="text" value="8" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 百家乐 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押对子赔率:</label>
<div class="controls">
<input id="price_pair" name="price_pair" type="text" value="8" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 百家乐 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押龙赔率:</label>
<div class="controls">
<input id="price_dragon" name="price_dragon" type="text" value="0.97" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 龙虎斗 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押虎赔率:</label>
<div class="controls">
<input id="price_tiger" name="price_tiger" type="text" value="0.97" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 龙虎斗 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押和赔率:</label>
<div class="controls">
<input id="price_tie_dt" name="price_tie_dt" type="text" value="8" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 龙虎斗 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押牛7-牛9赔率:</label>
<div class="controls">
<input id="price_n7_n9" name="price_n7_n9" type="text" value="2" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 牛牛 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押牛牛赔率:</label>
<div class="controls">
<input id="price_nn" name="price_nn" type="text" value="3" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 牛牛 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押五公赔率:</label>
<div class="controls">
<input id="price_5n" name="price_5n" type="text" value="5" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 牛牛 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">押四条赔率:</label>
<div class="controls">
<input id="price_bomb" name="price_bomb" type="text" value="4.85" maxlength="10" class="required"><span class="help-inline">
<font color="red"> * 牛牛 </font>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label">日赢上限:</label>
<div class="controls">
<input id="win_limit" name="win_limit" type="text" value="0" maxlength="10" class="required" onkeyup="value=value.replace(/[^\d]/g,'')"><span class="help-inline">
<font color="red"> * 默认0则为没有限制</font>
</span>
</div>
</div>
<div class="bottom-buttom">
<label class="control-label"></label>
<div class="controls">
<div class='submit'>保存</div>
</div>
</div>
</div>
<script>
// 代理列表和添加代理切换
$('.x-nav .change_box a').click(function(){
// 样式切换
$('.x-nav .change_box a').removeClass('actived');
$(this).addClass('actived');
// 页面切换
var id = $(this).attr('data-id');
if(id == "1") location.href = '/player/index';
if(id == "2") location.href = '/player/player_add';
});
//监听提交
$('.submit').click( function(){
// 获取和拼装添加代理的数据
var limit_checkout = new Array();
var query = new Object();
query.parent_agent_id = $('#parent_agent').val();
query.username = $('#L_username').val();
query.nickname = $('#L_nickname').val();
query.pass = $('#L_pass').val();
query.repass = $('#L_repass').val();
query.mobile = $('#L_mobile').val();
query.email = $('#L_email').val();
query.ximalv = $('#L_ximalv').val();
query.ximalv_dt = $('#L_ximalv_dt').val();
query.cs = $('#L_cs').val();
query.bet_type = $('#L_bet_type').val();
query.limit_low = $('#limit_low').val();
query.limit_high = $('#limit_high').val();
query.price_banker = $('#price_banker').val();
query.price_player = $('#price_player').val();
query.price_tie_baccarat = $('#price_tie_baccarat').val();
query.price_pair = $('#price_pair').val();
query.price_dragon = $('#price_dragon').val();
query.price_tiger = $('#price_tiger').val();
query.price_tie_dt = $('#price_tie_dt').val();
query.price_n7_n9 = $('#price_n7_n9').val();
query.price_nn = $('#price_nn').val();
query.price_5n = $('#price_5n').val();
query.price_bomb = $('#price_bomb').val();
query.win_limit = $('#win_limit').val();
// 验证数据
if(query.username.length == 0){
layer.alert("请填写账号!");
return false;
}
if(query.nickname.length == 0){
layer.alert("请填写昵称!");
return false;
}
if(query.pass.length <= 0){
layer.alert("请填写密码!");
return false;
}
if(query.pass.length > 0 && query.pass.length < 6){
layer.alert("密码长度为6到16个字符!");
return false;
}
if(query.pass != query.repass){
layer.alert("两次密码不一致!");
return false;
}
if(query.ximalv >= 100){
layer.alert("洗码率最高不能超过100%!");
return false;
}
if(query.ximalv_dt >= 100){
layer.alert("洗码率最高不能超过100%!");
return false;
}
if(query.cs > 100){
layer.alert("占成最高不能超过100%!");
return false;
}
if(query.bet_type <= 0){
layer.alert("请选择投注方式");
return false;
}
if(query.price_banker <= 0){
layer.alert("押庄赔率必须大于0");
return false;
}
if(query.price_player <= 0){
layer.alert("押闲赔率必须大于0");
return false;
}
if(query.price_tie_baccarat <= 0){
layer.alert("押和百家乐赔率必须大于0");
return false;
}
if(query.price_pair <= 0){
layer.alert("押对子赔率必须大于0");
return false;
}
if(query.price_dragon <= 0){
layer.alert("押龙赔率必须大于0");
return false;
}
if(query.price_tiger <= 0){
layer.alert("押虎赔率必须大于0");
return false;
}
if(query.price_tie_dt <= 0){
layer.alert("押和龙虎斗赔率必须大于0");
return false;
}
if(query.price_n7_n9 <= 0){
layer.alert("押牛7-牛9赔率必须大于0");
return false;
}
if(query.price_nn <= 0){
layer.alert("押牛牛赔率必须大于0");
return false;
}
if(query.price_5n <= 0){
layer.alert("押五公赔率必须大于0");
return false;
}
if(query.price_bomb <= 0){
layer.alert("押四条赔率必须大于0");
return false;
}
if(query.win_limit.length <= 0){
layer.alert("日赢上限不能为空");
return false;
}
// 发送数据到后台添加会员
var result = ajax('/player/do_player_add',query);
if(result.code == 1){
layer.alert(result.msg, {icon: 6}, function () {
location.href = "/player/index";
});
}else{
layer.msg(result.msg,{icon:2});
}
return false;
});
// AJAX函数封装
function ajax(url,query){
var returnData = 0;
$.ajax({
url:url,
data:query,
type:'POST',
dataType:'JSON',
async:false,
success:function(data){
returnData = data;
}
});
return returnData;
}
</script>
</body>
</html>