feat: 牛牛单独限红 - 新增limit_low_nn/limit_high_nn字段,代理端添加/编辑代理和会员支持牛牛限红设置,语言包三语支持
This commit is contained in:
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Db;
|
||||
use think\Request;
|
||||
|
||||
/**
|
||||
* 快捷回复管理控制器
|
||||
* Class ChatQuickReply
|
||||
* @package app\admin\controller
|
||||
*/
|
||||
class ChatQuickReply extends Common
|
||||
{
|
||||
/**
|
||||
* 快捷回复列表
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$get = Request::instance()->get();
|
||||
$this->assign('get', $get);
|
||||
|
||||
$category = Request::instance()->get('category');
|
||||
$status = Request::instance()->get('status');
|
||||
|
||||
$where = [];
|
||||
if ($category) {
|
||||
$where['category'] = $category;
|
||||
}
|
||||
if ($status !== null && $status !== '') {
|
||||
$where['status'] = (int)$status;
|
||||
}
|
||||
|
||||
$list = Db::name('chat_quick_reply')
|
||||
->where($where)
|
||||
->order('sort asc, id desc')
|
||||
->paginate(15, false, ['query' => $get]);
|
||||
|
||||
// 获取分类列表
|
||||
$categories = Db::name('chat_quick_reply')
|
||||
->whereNotNull('category')
|
||||
->where('category', '<>', '')
|
||||
->group('category')
|
||||
->column('category');
|
||||
|
||||
$this->assign('list', $list);
|
||||
$this->assign('categories', $categories);
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加快捷回复
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (Request::instance()->isPost()) {
|
||||
$data = Request::instance()->post();
|
||||
|
||||
// 验证
|
||||
if (empty($data['title'])) {
|
||||
$this->error('标题不能为空');
|
||||
}
|
||||
if (empty($data['content'])) {
|
||||
$this->error('内容不能为空');
|
||||
}
|
||||
|
||||
$insertData = [
|
||||
'category' => $data['category'] ?? null,
|
||||
'title' => $data['title'],
|
||||
'content' => $data['content'],
|
||||
'sort' => (int)($data['sort'] ?? 0),
|
||||
'status' => (int)($data['status'] ?? 1),
|
||||
'create_time' => time(),
|
||||
'update_time' => time(),
|
||||
];
|
||||
|
||||
$result = Db::name('chat_quick_reply')->insert($insertData);
|
||||
|
||||
if ($result) {
|
||||
insertAdminLog('添加快捷回复', '标题: ' . $data['title']);
|
||||
$this->success('添加成功', '/chat_quick_reply/index');
|
||||
} else {
|
||||
$this->error('添加失败');
|
||||
}
|
||||
}
|
||||
|
||||
// 获取分类列表
|
||||
$categories = Db::name('chat_quick_reply')
|
||||
->whereNotNull('category')
|
||||
->where('category', '<>', '')
|
||||
->group('category')
|
||||
->column('category');
|
||||
|
||||
$this->assign('categories', $categories);
|
||||
$this->assign('info', []);
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑快捷回复
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$id = Request::instance()->param('id');
|
||||
|
||||
if (Request::instance()->isPost()) {
|
||||
$data = Request::instance()->post();
|
||||
|
||||
// 验证
|
||||
if (empty($data['title'])) {
|
||||
$this->error('标题不能为空');
|
||||
}
|
||||
if (empty($data['content'])) {
|
||||
$this->error('内容不能为空');
|
||||
}
|
||||
|
||||
$updateData = [
|
||||
'category' => $data['category'] ?? null,
|
||||
'title' => $data['title'],
|
||||
'content' => $data['content'],
|
||||
'sort' => (int)($data['sort'] ?? 0),
|
||||
'status' => (int)($data['status'] ?? 1),
|
||||
'update_time' => time(),
|
||||
];
|
||||
|
||||
$result = Db::name('chat_quick_reply')->where('id', $id)->update($updateData);
|
||||
|
||||
if ($result !== false) {
|
||||
insertAdminLog('编辑快捷回复', 'ID: ' . $id);
|
||||
$this->success('修改成功', '/chat_quick_reply/index');
|
||||
} else {
|
||||
$this->error('修改失败');
|
||||
}
|
||||
}
|
||||
|
||||
$info = Db::name('chat_quick_reply')->where('id', $id)->find();
|
||||
if (!$info) {
|
||||
$this->error('记录不存在');
|
||||
}
|
||||
|
||||
// 获取分类列表
|
||||
$categories = Db::name('chat_quick_reply')
|
||||
->whereNotNull('category')
|
||||
->where('category', '<>', '')
|
||||
->group('category')
|
||||
->column('category');
|
||||
|
||||
$this->assign('info', $info);
|
||||
$this->assign('categories', $categories);
|
||||
|
||||
return $this->fetch('add');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除快捷回复
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$id = Request::instance()->param('id');
|
||||
|
||||
if (!$id) {
|
||||
$this->error('参数错误');
|
||||
}
|
||||
|
||||
$info = Db::name('chat_quick_reply')->where('id', $id)->find();
|
||||
if (!$info) {
|
||||
$this->error('记录不存在');
|
||||
}
|
||||
|
||||
$result = Db::name('chat_quick_reply')->where('id', $id)->delete();
|
||||
|
||||
if ($result) {
|
||||
insertAdminLog('删除快捷回复', 'ID: ' . $id . ', 标题: ' . $info['title']);
|
||||
$this->success('删除成功');
|
||||
} else {
|
||||
$this->error('删除失败');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$id = Request::instance()->post('id');
|
||||
$status = Request::instance()->post('status');
|
||||
|
||||
if (!$id) {
|
||||
return json(['code' => 1, 'msg' => '参数错误']);
|
||||
}
|
||||
|
||||
$result = Db::name('chat_quick_reply')->where('id', $id)->update([
|
||||
'status' => (int)$status,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
||||
if ($result !== false) {
|
||||
return json(['code' => 0, 'msg' => '操作成功']);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => '操作失败']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改排序
|
||||
*/
|
||||
public function sort()
|
||||
{
|
||||
$id = Request::instance()->post('id');
|
||||
$sort = Request::instance()->post('sort');
|
||||
|
||||
if (!$id) {
|
||||
return json(['code' => 1, 'msg' => '参数错误']);
|
||||
}
|
||||
|
||||
$result = Db::name('chat_quick_reply')->where('id', $id)->update([
|
||||
'sort' => (int)$sort,
|
||||
'update_time' => time(),
|
||||
]);
|
||||
|
||||
if ($result !== false) {
|
||||
return json(['code' => 0, 'msg' => '操作成功']);
|
||||
} else {
|
||||
return json(['code' => 1, 'msg' => '操作失败']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,8 @@ class Common extends Controller{
|
||||
'Info',
|
||||
'Log',
|
||||
'Login',
|
||||
'Chat',
|
||||
'ChatQuickReply',
|
||||
);
|
||||
if($user_info['role'] == 1){
|
||||
if(!in_array($curContrller, $jiankongController)){
|
||||
@@ -40,6 +42,8 @@ class Common extends Controller{
|
||||
'Index',
|
||||
'Agent',
|
||||
'Login',
|
||||
'Chat',
|
||||
'ChatQuickReply',
|
||||
);
|
||||
if($user_info['role'] == 2){
|
||||
if(!in_array($curContrller, $dlController)){
|
||||
|
||||
@@ -59,7 +59,15 @@ class Login extends Controller{
|
||||
}
|
||||
$last_login_info = Db::name('admin')->where(array('id' => $admin_info['id']))->field(['last_login_time','last_login_ip'])->find();
|
||||
Session::set('last_login_info',$last_login_info);
|
||||
Db::name('admin')->where(array('id' => $admin_info['id']))->update(array('last_login_time' => time(), 'last_login_ip' => getIP()));
|
||||
|
||||
// 生成login_token用于WebSocket连接验证
|
||||
$login_token = md5($admin_info['id'] . time() . uniqid());
|
||||
Db::name('admin')->where(array('id' => $admin_info['id']))->update(array(
|
||||
'last_login_time' => time(),
|
||||
'last_login_ip' => getIP(),
|
||||
'login_token' => $login_token
|
||||
));
|
||||
|
||||
$user_info = Db::name('admin')->where('id',$admin_info['id'])->find();
|
||||
Session::set('user_info',$user_info);
|
||||
insertAdminLog('登录');
|
||||
|
||||
@@ -36,17 +36,17 @@ class Report extends Common{
|
||||
}
|
||||
$agent_list = Db::name('user')->where($where)->select();
|
||||
|
||||
// 时间条件
|
||||
// 时间条件(默认:今天07:00:00 ~ 明天06:59:59)
|
||||
if($startDate){
|
||||
$startTime = strtotime($startDate);
|
||||
}else{
|
||||
$startTime = strtotime(date('Y-m-d'));
|
||||
$startTime = strtotime(date('Y-m-d') . ' 07:00:00');
|
||||
$get['startDate'] = date('Y-m-d H:i:s',$startTime);
|
||||
}
|
||||
if($endDate){
|
||||
$endTime = strtotime($endDate);
|
||||
}else{
|
||||
$endTime = time();
|
||||
$endTime = strtotime(date('Y-m-d', strtotime('+1 day')) . ' 06:59:59');
|
||||
$get['endDate'] = date('Y-m-d H:i:s',$endTime);
|
||||
}
|
||||
$this->assign('get',$get);
|
||||
|
||||
Vendored
BIN
Binary file not shown.
@@ -95,16 +95,30 @@
|
||||
layui.use('laydate', function () {
|
||||
var laydate = layui.laydate;
|
||||
|
||||
// 计算默认时间:今天07:00:00 ~ 明天06:59:59
|
||||
var now = new Date();
|
||||
var y = now.getFullYear();
|
||||
var m = ('0' + (now.getMonth() + 1)).slice(-2);
|
||||
var d = ('0' + now.getDate()).slice(-2);
|
||||
var tomorrow = new Date(now.getTime() + 86400000);
|
||||
var ty = tomorrow.getFullYear();
|
||||
var tm = ('0' + (tomorrow.getMonth() + 1)).slice(-2);
|
||||
var td = ('0' + tomorrow.getDate()).slice(-2);
|
||||
var defaultStart = y + '-' + m + '-' + d + ' 07:00:00';
|
||||
var defaultEnd = ty + '-' + tm + '-' + td + ' 06:59:59';
|
||||
|
||||
// 开始时间
|
||||
laydate.render({
|
||||
elem: '#start',
|
||||
type: 'datetime'
|
||||
type: 'datetime',
|
||||
value: defaultStart
|
||||
});
|
||||
|
||||
// 结束时间
|
||||
laydate.render({
|
||||
elem: '#end',
|
||||
type: 'datetime'
|
||||
type: 'datetime',
|
||||
value: defaultEnd
|
||||
});
|
||||
});
|
||||
function get_profit(){
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
{include file="public/header" /}
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">会话信息</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" lay-skin="nob">
|
||||
<tr>
|
||||
<td width="120"><strong>会话ID:</strong></td>
|
||||
<td>{$session.id}</td>
|
||||
<td width="120"><strong>用户名:</strong></td>
|
||||
<td>{$session.username}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>用户余额:</strong></td>
|
||||
<td>{$session.money}</td>
|
||||
<td><strong>客服:</strong></td>
|
||||
<td>{$session.admin_username|default='未分配'}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>来源:</strong></td>
|
||||
<td>
|
||||
{switch name="session.source"}
|
||||
{case value="1"}PC{/case}
|
||||
{case value="2"}Game{/case}
|
||||
{case value="3"}Portal{/case}
|
||||
{/switch}
|
||||
</td>
|
||||
<td><strong>状态:</strong></td>
|
||||
<td>
|
||||
{switch name="session.status"}
|
||||
{case value="0"}待分配{/case}
|
||||
{case value="1"}进行中{/case}
|
||||
{case value="2"}已结束{/case}
|
||||
{/switch}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>开始时间:</strong></td>
|
||||
<td>{$session.create_time|date='Y-m-d H:i:s',###}</td>
|
||||
<td><strong>结束时间:</strong></td>
|
||||
<td>{if condition="$session.end_time"}{$session.end_time|date='Y-m-d H:i:s',###}{else/}-{/if}</td>
|
||||
</tr>
|
||||
{if condition="$session.rating"}
|
||||
<tr>
|
||||
<td><strong>评分:</strong></td>
|
||||
<td colspan="3">
|
||||
<span style="color: #FFB800;">{$session.rating}星</span>
|
||||
{if condition="$session.rating_content"}
|
||||
<br><span style="color: #666;">{$session.rating_content}</span>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card" style="margin-top: 20px;">
|
||||
<div class="layui-card-header">聊天记录</div>
|
||||
<div class="layui-card-body" style="height: 400px; overflow-y: auto; background: #f8f8f8;">
|
||||
{volist name="messages" id="msg"}
|
||||
<div style="margin-bottom: 15px; {eq name='msg.sender_type' value='2'}text-align: right;{/eq}">
|
||||
<div style="display: inline-block; max-width: 60%; text-align: left;">
|
||||
<div style="font-size: 12px; color: #999; margin-bottom: 3px;">
|
||||
{eq name="msg.sender_type" value="1"}
|
||||
用户
|
||||
{else/}
|
||||
客服
|
||||
{/eq}
|
||||
· {$msg.create_time|date='Y-m-d H:i:s',###}
|
||||
</div>
|
||||
<div style="padding: 10px; background: {eq name='msg.sender_type' value='1'}#fff{else/}#1E9FFF{/eq};
|
||||
color: {eq name='msg.sender_type' value='1'}#333{else/}#fff{/eq};
|
||||
border-radius: 5px; word-break: break-all;">
|
||||
{eq name="msg.msg_type" value="2"}
|
||||
<img src="{$msg.content}" style="max-width: 300px;">
|
||||
{else/}
|
||||
{$msg.content}
|
||||
{/eq}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,117 @@
|
||||
{include file="public/header" /}
|
||||
<body>
|
||||
<div class="x-nav">
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="">首页</a>
|
||||
<a><cite>聊天记录查询</cite></a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small" 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>
|
||||
<div class="x-body">
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-col-md12 x-so" method="get">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="username" value="{$get.username|default=''}"
|
||||
placeholder="用户名" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="admin_id">
|
||||
<option value="">全部客服</option>
|
||||
{volist name="admins" id="admin"}
|
||||
<option value="{$admin.id}" {if condition="isset($get['admin_id']) && $get['admin_id'] == $admin['id']"}selected{/if}>
|
||||
{$admin.nickname|default=$admin.username}
|
||||
</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="startDate" id="startDate" value="{$get.startDate|default=''}"
|
||||
placeholder="开始日期" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="endDate" id="endDate" value="{$get.endDate|default=''}"
|
||||
placeholder="结束日期" class="layui-input">
|
||||
</div>
|
||||
<button class="layui-btn" type="submit"><i class="layui-icon"></i></button>
|
||||
<button class="layui-btn layui-btn-warm" type="submit" name="export" value="1">
|
||||
<i class="layui-icon"></i>导出
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>会话ID</th>
|
||||
<th>用户名</th>
|
||||
<th>客服</th>
|
||||
<th>来源</th>
|
||||
<th>状态</th>
|
||||
<th>评分</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.username}</td>
|
||||
<td>{$vo.admin_username|default='未分配'}</td>
|
||||
<td>
|
||||
{switch name="vo.source"}
|
||||
{case value="1"}PC{/case}
|
||||
{case value="2"}Game{/case}
|
||||
{case value="3"}Portal{/case}
|
||||
{/switch}
|
||||
</td>
|
||||
<td>
|
||||
{switch name="vo.status"}
|
||||
{case value="0"}<span class="layui-badge layui-bg-gray">待分配</span>{/case}
|
||||
{case value="1"}<span class="layui-badge layui-bg-blue">进行中</span>{/case}
|
||||
{case value="2"}<span class="layui-badge">已结束</span>{/case}
|
||||
{/switch}
|
||||
</td>
|
||||
<td>
|
||||
{if condition="$vo.rating"}
|
||||
<span style="color: #FFB800;">{$vo.rating}星</span>
|
||||
{else/}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
|
||||
<td>{if condition="$vo.end_time"}{$vo.end_time|date='Y-m-d H:i:s',###}{else/}-{/if}</td>
|
||||
<td class="td-manage">
|
||||
<a title="查看详情" onclick="x_admin_show('会话详情','/chat/detail?session_id={$vo.id}',900,600)" href="javascript:;">
|
||||
<i class="layui-icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">
|
||||
{$list->render()}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['laydate', 'form'], function(){
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
|
||||
laydate.render({
|
||||
elem: '#startDate',
|
||||
type: 'date'
|
||||
});
|
||||
|
||||
laydate.render({
|
||||
elem: '#endDate',
|
||||
type: 'date'
|
||||
});
|
||||
|
||||
form.render();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
{include file="public/header" /}
|
||||
<body>
|
||||
<div class="x-body">
|
||||
<form class="layui-form" method="post">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="category" value="{$info.category|default=''}"
|
||||
placeholder="可选,如:常见问题、充值相关等" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="x-red">*</span>标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required"
|
||||
value="{$info.title|default=''}" placeholder="请输入标题" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label"><span class="x-red">*</span>内容</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea name="content" required lay-verify="required"
|
||||
placeholder="请输入回复内容" class="layui-textarea">{$info.content|default=''}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" name="sort" value="{$info.sort|default='0'}"
|
||||
placeholder="数字越小越靠前" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="启用"
|
||||
{if condition="!isset($info['status']) || $info['status'] == 1"}checked{/if}>
|
||||
<input type="radio" name="status" value="0" title="禁用"
|
||||
{if condition="isset($info['status']) && $info['status'] == 0"}checked{/if}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<button class="layui-btn" lay-submit lay-filter="add">提交</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
form.on('submit(add)', function(data){
|
||||
$.post('', data.field, function(res){
|
||||
if(res.code == 0 || res.code == 1){
|
||||
layer.alert(res.msg || '操作成功', {icon: 1}, function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
parent.location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.alert(res.msg, {icon: 2});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,134 @@
|
||||
{include file="public/header" /}
|
||||
<body>
|
||||
<div class="x-nav">
|
||||
<span class="layui-breadcrumb">
|
||||
<a href="">首页</a>
|
||||
<a><cite>快捷回复管理</cite></a>
|
||||
</span>
|
||||
<a class="layui-btn layui-btn-small" 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>
|
||||
<div class="x-body">
|
||||
<div class="layui-row">
|
||||
<form class="layui-form layui-col-md12 x-so" method="get">
|
||||
<div class="layui-input-inline">
|
||||
<select name="category">
|
||||
<option value="">全部分类</option>
|
||||
{volist name="categories" id="cat"}
|
||||
<option value="{$cat}" {if condition="isset($get['category']) && $get['category'] == $cat"}selected{/if}>{$cat}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="status">
|
||||
<option value="">全部状态</option>
|
||||
<option value="1" {if condition="isset($get['status']) && $get['status'] == '1'"}selected{/if}>启用</option>
|
||||
<option value="0" {if condition="isset($get['status']) && $get['status'] == '0'"}selected{/if}>禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="layui-btn" type="submit"><i class="layui-icon"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
<xblock>
|
||||
<button class="layui-btn" onclick="x_admin_show('添加快捷回复','/chat_quick_reply/add',600,400)">
|
||||
<i class="layui-icon"></i>添加
|
||||
</button>
|
||||
</xblock>
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>分类</th>
|
||||
<th>标题</th>
|
||||
<th>内容</th>
|
||||
<th>排序</th>
|
||||
<th>状态</th>
|
||||
<th>创建时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.category|default='无'}</td>
|
||||
<td>{$vo.title}</td>
|
||||
<td style="max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;" title="{$vo.content}">{$vo.content}</td>
|
||||
<td>
|
||||
<input type="text" class="layui-input" value="{$vo.sort}"
|
||||
onchange="updateSort({$vo.id}, this.value)"
|
||||
style="width: 60px; display: inline-block;">
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用"
|
||||
{eq name="vo.status" value="1"}checked{/eq}
|
||||
onchange="updateStatus({$vo.id}, this.checked ? 1 : 0)">
|
||||
</td>
|
||||
<td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
|
||||
<td class="td-manage">
|
||||
<a title="编辑" onclick="x_admin_show('编辑','/chat_quick_reply/edit?id={$vo.id}',600,400)" href="javascript:;">
|
||||
<i class="layui-icon"></i>
|
||||
</a>
|
||||
<a title="删除" onclick="member_del(this,'{$vo.id}')" href="javascript:;">
|
||||
<i class="layui-icon"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">
|
||||
{$list->render()}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['form', 'layer'], function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
form.render();
|
||||
});
|
||||
|
||||
// 删除
|
||||
function member_del(obj, id){
|
||||
layer.confirm('确认要删除吗?', function(index){
|
||||
$.ajax({
|
||||
url: '/chat_quick_reply/del',
|
||||
type: 'POST',
|
||||
data: {id: id},
|
||||
success: function(res){
|
||||
if(res.code == 0){
|
||||
$(obj).parents("tr").remove();
|
||||
layer.msg('删除成功', {icon: 1, time: 1000});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, time: 1000});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 更新状态
|
||||
function updateStatus(id, status){
|
||||
$.post('/chat_quick_reply/status', {id: id, status: status}, function(res){
|
||||
if(res.code == 0){
|
||||
layer.msg('操作成功', {icon: 1, time: 1000});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, time: 1000});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 更新排序
|
||||
function updateSort(id, sort){
|
||||
$.post('/chat_quick_reply/sort', {id: id, sort: sort}, function(res){
|
||||
if(res.code == 0){
|
||||
layer.msg('操作成功', {icon: 1, time: 1000});
|
||||
} else {
|
||||
layer.msg(res.msg, {icon: 2, time: 1000});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -122,6 +122,17 @@
|
||||
<li><a _href="/Tip/optimum"><i class="iconfont"></i><cite>今日最佳记录</cite></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;">
|
||||
<cite class="main-nav">客服管理</cite>
|
||||
<i class="iconfont nav_right"></i>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li><a _href="/chat/index"><i class="iconfont"></i><cite>客服工作台</cite></a></li>
|
||||
<li><a _href="/chat/record"><i class="iconfont"></i><cite>聊天记录查询</cite></a></li>
|
||||
<li><a _href="/chat_quick_reply/index"><i class="iconfont"></i><cite>快捷回复管理</cite></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
<div id="configure_list" style="display: none;">
|
||||
<li class="open">
|
||||
|
||||
Vendored
BIN
Binary file not shown.
@@ -253,6 +253,8 @@ class Agent Extends Common{
|
||||
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
|
||||
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
|
||||
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
|
||||
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
|
||||
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
|
||||
$agent_ximalv = round(Request::instance()->post('agent_ximalv'),2);
|
||||
$agent_ximalv_dt = round(Request::instance()->post('agent_ximalv_dt'),2);
|
||||
$agent_ximalv_nn = round(Request::instance()->post('agent_ximalv_nn'),2);
|
||||
@@ -327,6 +329,15 @@ class Agent Extends Common{
|
||||
if($limit_low_pair > $limit_high_pair && $limit_low_pair > 0 && $limit_high_pair > 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_pair_limit_bigger_than_max_tie_limit']]));
|
||||
}
|
||||
if($limit_low_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
|
||||
}
|
||||
if($limit_high_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
|
||||
}
|
||||
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
|
||||
}
|
||||
if($limit_low < $agentParent['limit_low'] || $limit_low > $agentParent['limit_high'] || $limit_high < $agentParent['limit_low'] || $limit_high > $agentParent['limit_high']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['limit_cannot_bigger'].' '.$agentParent['limit_low'].'-'.$agentParent['limit_high']]));
|
||||
}
|
||||
@@ -336,6 +347,11 @@ class Agent Extends Common{
|
||||
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair']]));
|
||||
}
|
||||
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
|
||||
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
|
||||
}
|
||||
}
|
||||
if($agent_ximalv < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_limit_0']]));
|
||||
}
|
||||
@@ -395,6 +411,8 @@ class Agent Extends Common{
|
||||
$user_data['limit_high_tie'] = $limit_high_tie;
|
||||
$user_data['limit_low_pair'] = $limit_low_pair;
|
||||
$user_data['limit_high_pair'] = $limit_high_pair;
|
||||
$user_data['limit_low_nn'] = $limit_low_nn;
|
||||
$user_data['limit_high_nn'] = $limit_high_nn;
|
||||
$user_data['bet_type'] = $bet_type;
|
||||
$user_data['reg_time'] = time();
|
||||
$ip = '0.0.0.0';
|
||||
@@ -533,6 +551,8 @@ class Agent Extends Common{
|
||||
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
|
||||
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
|
||||
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
|
||||
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
|
||||
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
|
||||
$agent_ximalv = round(Request::instance()->post('agent_ximalv'),2);
|
||||
$agent_ximalv_dt = round(Request::instance()->post('agent_ximalv_dt'),2);
|
||||
$agent_ximalv_nn = round(Request::instance()->post('agent_ximalv_nn'),2);
|
||||
@@ -594,6 +614,20 @@ class Agent Extends Common{
|
||||
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair'].'范围']));
|
||||
}
|
||||
if($limit_low_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
|
||||
}
|
||||
if($limit_high_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
|
||||
}
|
||||
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
|
||||
}
|
||||
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
|
||||
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
|
||||
}
|
||||
}
|
||||
if($agent_ximalv > $agentParent['agent_ximalv']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_cannot_bigger_agent'].' '.$agentParent['agent_ximalv'].'!']));
|
||||
}
|
||||
@@ -662,6 +696,8 @@ class Agent Extends Common{
|
||||
$user_data['limit_high_tie'] = $limit_high_tie;
|
||||
$user_data['limit_low_pair'] = $limit_low_pair;
|
||||
$user_data['limit_high_pair'] = $limit_high_pair;
|
||||
$user_data['limit_low_nn'] = $limit_low_nn;
|
||||
$user_data['limit_high_nn'] = $limit_high_nn;
|
||||
$user_data['agent_ximalv'] = $agent_ximalv;
|
||||
$user_data['agent_ximalv_dt'] = $agent_ximalv_dt;
|
||||
$user_data['agent_ximalv_nn'] = $agent_ximalv_nn;
|
||||
|
||||
@@ -281,6 +281,8 @@ class Player Extends Common{
|
||||
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
|
||||
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
|
||||
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
|
||||
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
|
||||
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
|
||||
$win_limit = round(Request::instance()->post('win_limit'),2);
|
||||
$agent_commission = round(Request::instance()->post('agent_commission'),2);
|
||||
$agent_commission_dt = round(Request::instance()->post('agent_commission_dt'),2);
|
||||
@@ -385,6 +387,20 @@ class Player Extends Common{
|
||||
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair']]));
|
||||
}
|
||||
if($limit_low_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
|
||||
}
|
||||
if($limit_high_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
|
||||
}
|
||||
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
|
||||
}
|
||||
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
|
||||
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
|
||||
}
|
||||
}
|
||||
if($agent_ximalv > $agentParent['agent_ximalv']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_cannot_bigger_agent'].$agentParent['agent_ximalv'].'!']));
|
||||
}
|
||||
@@ -427,6 +443,8 @@ class Player Extends Common{
|
||||
$user_data['limit_high_tie'] = $limit_high_tie;
|
||||
$user_data['limit_low_pair'] = $limit_low_pair;
|
||||
$user_data['limit_high_pair'] = $limit_high_pair;
|
||||
$user_data['limit_low_nn'] = $limit_low_nn;
|
||||
$user_data['limit_high_nn'] = $limit_high_nn;
|
||||
$user_data['price_banker'] = $agentParent['price_banker'];
|
||||
$user_data['price_player'] = $agentParent['price_player'];
|
||||
$user_data['price_tie_baccarat'] = $agentParent['price_tie_baccarat'];
|
||||
@@ -605,6 +623,8 @@ class Player Extends Common{
|
||||
$limit_high_tie = round(Request::instance()->post('limit_high_tie'),2);
|
||||
$limit_low_pair = round(Request::instance()->post('limit_low_pair'),2);
|
||||
$limit_high_pair = round(Request::instance()->post('limit_high_pair'),2);
|
||||
$limit_low_nn = round(Request::instance()->post('limit_low_nn'),2);
|
||||
$limit_high_nn = round(Request::instance()->post('limit_high_nn'),2);
|
||||
$agent_ximalv = round(Request::instance()->post('agent_ximalv'),2);
|
||||
$agent_ximalv_dt = round(Request::instance()->post('agent_ximalv_dt'),2);
|
||||
$agent_ximalv_nn = round(Request::instance()->post('agent_ximalv_nn'),2);
|
||||
@@ -681,7 +701,21 @@ class Player Extends Common{
|
||||
if($limit_low_pair < $agentParent['limit_low_pair'] || $limit_low_pair > $agentParent['limit_high_pair'] || $limit_high_pair < $agentParent['limit_low_pair'] || $limit_high_pair > $agentParent['limit_high_pair']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['pair_limit_cannot_bigger'].' '.$agentParent['limit_low_pair'].'-'.$agentParent['limit_high_pair']]));
|
||||
}
|
||||
|
||||
if($limit_low_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_0']]));
|
||||
}
|
||||
if($limit_high_nn < 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['max_nn_limit_0']]));
|
||||
}
|
||||
if($limit_low_nn > $limit_high_nn && $limit_low_nn > 0 && $limit_high_nn > 0){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['min_nn_limit_bigger_than_max']]));
|
||||
}
|
||||
if($limit_low_nn > 0 && $limit_high_nn > 0 && $agentParent['limit_low_nn'] > 0 && $agentParent['limit_high_nn'] > 0){
|
||||
if($limit_low_nn < $agentParent['limit_low_nn'] || $limit_low_nn > $agentParent['limit_high_nn'] || $limit_high_nn < $agentParent['limit_low_nn'] || $limit_high_nn > $agentParent['limit_high_nn']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['nn_limit_cannot_bigger'].' '.$agentParent['limit_low_nn'].'-'.$agentParent['limit_high_nn']]));
|
||||
}
|
||||
}
|
||||
|
||||
if($agent_ximalv > $agentParent['agent_ximalv']){
|
||||
die(json_encode(['code'=>0,'msg'=>$lang['baccarat_cannot_bigger_agent'].$agentParent['agent_ximalv'].'!']));
|
||||
}
|
||||
@@ -719,6 +753,8 @@ class Player Extends Common{
|
||||
$user_data['limit_high_tie'] = $limit_high_tie;
|
||||
$user_data['limit_low_pair'] = $limit_low_pair;
|
||||
$user_data['limit_high_pair'] = $limit_high_pair;
|
||||
$user_data['limit_low_nn'] = $limit_low_nn;
|
||||
$user_data['limit_high_nn'] = $limit_high_nn;
|
||||
$user_data['agent_ximalv'] = $agent_ximalv;
|
||||
$user_data['agent_ximalv_dt'] = $agent_ximalv_dt;
|
||||
$user_data['agent_ximalv_nn'] = $agent_ximalv_nn;
|
||||
|
||||
@@ -35,17 +35,17 @@ class Report Extends Common{
|
||||
$game_id = intval(Request::instance()->get('game_id'));
|
||||
$export = intval(Request::instance()->get('export'));
|
||||
|
||||
// 转换日期时间
|
||||
// 转换日期时间(默认:今天07:00:00 ~ 明天06:59:59)
|
||||
if ($startDate) {
|
||||
$startTime = strtotime($startDate);
|
||||
} else {
|
||||
$startTime = strtotime(date('Y-m-d'));
|
||||
$startTime = strtotime(date('Y-m-d') . ' 07:00:00');
|
||||
$get['startDate'] = date('Y-m-d H:i:s', $startTime);
|
||||
}
|
||||
if ($endDate) {
|
||||
$endTime = strtotime($endDate);
|
||||
} else {
|
||||
$endTime = time();
|
||||
$endTime = strtotime(date('Y-m-d', strtotime('+1 day')) . ' 06:59:59');
|
||||
$get['endDate'] = date('Y-m-d H:i:s', $endTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,14 @@ return [
|
||||
'limit_cannot_bigger' => 'Limit cannot exceed',
|
||||
'tie_limit_cannot_bigger' => 'Tie limit cannot exceed',
|
||||
'pair_limit_cannot_bigger' => 'Pair limit cannot exceed',
|
||||
'min_nn_limit' => 'Min bull limit',
|
||||
'max_nn_limit' => 'Max bull limit',
|
||||
'empty_min_nn_limit' => 'Please enter the min bull limit',
|
||||
'empty_max_nn_limit' => 'Please enter the max bull limit',
|
||||
'min_nn_limit_0' => 'Min bull limit cannot be less than 0',
|
||||
'max_nn_limit_0' => 'Max bull limit cannot be less than 0',
|
||||
'min_nn_limit_bigger_than_max' => 'Min bull limit cannot exceed max bull limit',
|
||||
'nn_limit_cannot_bigger' => 'Bull limit cannot exceed',
|
||||
'baccarat_limit_0' => 'Baccarat code rate cannot be lower than 0',
|
||||
'baccarat_cannot_bigger_agent' => 'The Baccarat code rate cannot exceed the Baccarat code rate of the affiliated agent',
|
||||
'dt_limit_0' => 'The Dragon tiger code rate cannot be lower than 0',
|
||||
|
||||
@@ -185,6 +185,14 @@ return [
|
||||
'limit_cannot_bigger' => '限红不能超出',
|
||||
'tie_limit_cannot_bigger' => '和限红不能超出',
|
||||
'pair_limit_cannot_bigger' => '对子限红不能超出',
|
||||
'min_nn_limit' => '最小牛牛限红',
|
||||
'max_nn_limit' => '最大牛牛限红',
|
||||
'empty_min_nn_limit' => '请输入最小牛牛限红',
|
||||
'empty_max_nn_limit' => '请输入最大牛牛限红',
|
||||
'min_nn_limit_0' => '最小牛牛限红不能低于0',
|
||||
'max_nn_limit_0' => '最大牛牛限红不能低于0',
|
||||
'min_nn_limit_bigger_than_max' => '最小牛牛限红不能超过最大牛牛限红',
|
||||
'nn_limit_cannot_bigger' => '牛牛限红不能超出',
|
||||
'baccarat_limit_0' => '百家乐码率不能低于0',
|
||||
'baccarat_cannot_bigger_agent' => '百家乐码率不能超过所属代理的百家乐码率',
|
||||
'dt_limit_0' => '龙虎码率不能低于0',
|
||||
|
||||
@@ -185,6 +185,14 @@ return [
|
||||
'limit_cannot_bigger' => '限紅不能超出',
|
||||
'tie_limit_cannot_bigger' => '和限紅不能超出',
|
||||
'pair_limit_cannot_bigger' => '對子限紅不能超出',
|
||||
'min_nn_limit' => '最小牛牛限紅',
|
||||
'max_nn_limit' => '最大牛牛限紅',
|
||||
'empty_min_nn_limit' => '請輸入最小牛牛限紅',
|
||||
'empty_max_nn_limit' => '請輸入最大牛牛限紅',
|
||||
'min_nn_limit_0' => '最小牛牛限紅不能低於0',
|
||||
'max_nn_limit_0' => '最大牛牛限紅不能低於0',
|
||||
'min_nn_limit_bigger_than_max' => '最小牛牛限紅不能超過最大牛牛限紅',
|
||||
'nn_limit_cannot_bigger' => '牛牛限紅不能超出',
|
||||
'baccarat_limit_0' => '百家樂碼率不能低於0',
|
||||
'baccarat_cannot_bigger_agent' => '百家樂碼率不能超過所屬代理的百家樂碼率',
|
||||
'dt_limit_0' => '龍虎碼率不能低於0',
|
||||
|
||||
Vendored
BIN
Binary file not shown.
@@ -129,6 +129,16 @@
|
||||
<input type="text" id="limit_high_pair" autocomplete="off" class="layui-input" value="{$agentParent.limit_high_pair}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="limit_low_nn" class="layui-form-label">{$lang['min_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_low_nn" autocomplete="off" class="layui-input" value="{$agentParent.limit_low_nn}">
|
||||
</div>
|
||||
<label for="limit_high_nn" class="layui-form-label">{$lang['max_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_high_nn" autocomplete="off" class="layui-input" value="{$agentParent.limit_high_nn}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 信用线展示码率 -->
|
||||
<?php if($user_info['agent_type'] == 2) : ?>
|
||||
@@ -242,6 +252,8 @@
|
||||
query.limit_high_tie = $('#limit_high_tie').val();
|
||||
query.limit_low_pair = $('#limit_low_pair').val();
|
||||
query.limit_high_pair = $('#limit_high_pair').val();
|
||||
query.limit_low_nn = $('#limit_low_nn').val();
|
||||
query.limit_high_nn = $('#limit_high_nn').val();
|
||||
query.type_xima = $('#xima_type').val();
|
||||
query.agent_ximalv = $('#agent_ximalv').val() || 0;
|
||||
query.agent_ximalv_dt = $('#agent_ximalv_dt').val() || 0;
|
||||
@@ -320,6 +332,18 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_low_nn.length == 0 || query.limit_low_nn == undefined){
|
||||
layer.alert(lang.empty_min_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_high_nn.length == 0 || query.limit_high_nn == undefined){
|
||||
layer.alert(lang.empty_max_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.type_xima == ''){
|
||||
layer.alert(lang.empty_wash_type,{
|
||||
title:lang.message,
|
||||
|
||||
@@ -81,6 +81,16 @@
|
||||
<input type="text" id="limit_high_pair" autocomplete="off" value="{$user.limit_high_pair}" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="limit_low_nn" class="layui-form-label">{$lang['min_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_low_nn" autocomplete="off" value="{$user.limit_low_nn}" class="layui-input">
|
||||
</div>
|
||||
<label for="limit_high_nn" class="layui-form-label">{$lang['max_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_high_nn" autocomplete="off" value="{$user.limit_high_nn}" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 信用线展示码率 -->
|
||||
<?php if($user['agent_type'] == 2) : ?>
|
||||
<div class="layui-form-item">
|
||||
@@ -152,6 +162,8 @@
|
||||
query.limit_high_tie = $('#limit_high_tie').val();
|
||||
query.limit_low_pair = $('#limit_low_pair').val();
|
||||
query.limit_high_pair = $('#limit_high_pair').val();
|
||||
query.limit_low_nn = $('#limit_low_nn').val();
|
||||
query.limit_high_nn = $('#limit_high_nn').val();
|
||||
query.agent_ximalv = $('#agent_ximalv').val() || 0;
|
||||
query.agent_ximalv_dt = $('#agent_ximalv_dt').val() || 0;
|
||||
query.agent_ximalv_nn = $('#agent_ximalv_nn').val() || 0;
|
||||
@@ -209,6 +221,20 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_low_nn.length == 0 || query.limit_low_nn == undefined){
|
||||
layer.alert(lang.empty_min_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_high_nn.length == 0 || query.limit_high_nn == undefined){
|
||||
layer.alert(lang.empty_max_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(query.agent_ximalv.length == 0 || query.agent_ximalv == undefined){
|
||||
ayer.alert(lang.empty_baccacat_rate,{
|
||||
title:lang.message,
|
||||
|
||||
@@ -547,6 +547,16 @@
|
||||
<input type="text" id="limit_high_pair" autocomplete="off" class="layui-input" value="{$agentParent.limit_high_pair}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="limit_low_nn" class="layui-form-label">{$lang['min_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_low_nn" autocomplete="off" class="layui-input" value="{$agentParent.limit_low_nn}">
|
||||
</div>
|
||||
<label for="limit_high_nn" class="layui-form-label">{$lang['max_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_high_nn" autocomplete="off" class="layui-input" value="{$agentParent.limit_high_nn}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="win_limit" class="layui-form-label">{$lang['daily_win_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
@@ -695,6 +705,8 @@
|
||||
query.limit_high_tie = $('#limit_high_tie').val();
|
||||
query.limit_low_pair = $('#limit_low_pair').val();
|
||||
query.limit_high_pair = $('#limit_high_pair').val();
|
||||
query.limit_low_nn = $('#limit_low_nn').val();
|
||||
query.limit_high_nn = $('#limit_high_nn').val();
|
||||
query.win_limit = $('#win_limit').val();
|
||||
query.agent_commission = $('#agent_commission').val();
|
||||
query.agent_commission_dt = $('#agent_commission_dt').val();
|
||||
@@ -787,6 +799,18 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_low_nn.length == 0 || query.limit_low_nn == undefined){
|
||||
layer.alert(lang.empty_min_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_high_nn.length == 0 || query.limit_high_nn == undefined){
|
||||
layer.alert(lang.empty_max_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.win_limit.length == 0 || query.win_limit == undefined){
|
||||
layer.alert(lang.empty_day_win_limit,{
|
||||
title:lang.message,
|
||||
|
||||
@@ -134,6 +134,18 @@
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux limit_high_pair"></div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="limit_low_nn" class="layui-form-label">{$lang['min_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_low_nn" autocomplete="off" class="layui-input" value="{$user.limit_low_nn}">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux limit_low_nn"></div>
|
||||
<label for="limit_high_nn" class="layui-form-label">{$lang['max_nn_limit']}</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="limit_high_nn" autocomplete="off" class="layui-input" value="{$user.limit_high_nn}">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux limit_high_nn"></div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label for="price_banker" class="layui-form-label">{$lang['banker_odds']}</label>
|
||||
<div class="layui-input-inline">
|
||||
@@ -616,6 +628,8 @@
|
||||
<input type="hidden" id="hidden_limit_high_tie" value="{$agent_parent.limit_high_tie}">
|
||||
<input type="hidden" id="hidden_limit_low_pair" value="{$agent_parent.limit_low_pair}">
|
||||
<input type="hidden" id="hidden_limit_high_pair" value="{$agent_parent.limit_high_pair}">
|
||||
<input type="hidden" id="hidden_limit_low_nn" value="{$agent_parent.limit_low_nn}">
|
||||
<input type="hidden" id="hidden_limit_high_nn" value="{$agent_parent.limit_high_nn}">
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
@@ -643,6 +657,8 @@
|
||||
query.limit_high_tie = $('#limit_high_tie').val();
|
||||
query.limit_low_pair = $('#limit_low_pair').val();
|
||||
query.limit_high_pair = $('#limit_high_pair').val();
|
||||
query.limit_low_nn = $('#limit_low_nn').val();
|
||||
query.limit_high_nn = $('#limit_high_nn').val();
|
||||
query.agent_ximalv = $('#agent_ximalv').val() || 0;
|
||||
query.agent_ximalv_dt = $('#agent_ximalv_dt').val() || 0;
|
||||
query.agent_ximalv_nn = $('#agent_ximalv_nn').val() || 0;
|
||||
@@ -730,6 +746,18 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_low_nn.length == 0 || query.limit_low_nn == undefined){
|
||||
layer.alert(lang.empty_min_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.limit_high_nn.length == 0 || query.limit_high_nn == undefined){
|
||||
layer.alert(lang.empty_max_nn_limit,{
|
||||
title:lang.message,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if(query.agent_ximalv.length == 0 || query.agent_ximalv == undefined){
|
||||
layer.alert(lang.empty_baccacat_rate,{
|
||||
title:lang.message,
|
||||
|
||||
@@ -180,17 +180,31 @@
|
||||
}else{
|
||||
dateLang = 'cn';
|
||||
}
|
||||
// 计算默认时间:今天07:00:00 ~ 明天06:59:59
|
||||
var now = new Date();
|
||||
var y = now.getFullYear();
|
||||
var m = ('0' + (now.getMonth() + 1)).slice(-2);
|
||||
var d = ('0' + now.getDate()).slice(-2);
|
||||
var tomorrow = new Date(now.getTime() + 86400000);
|
||||
var ty = tomorrow.getFullYear();
|
||||
var tm = ('0' + (tomorrow.getMonth() + 1)).slice(-2);
|
||||
var td = ('0' + tomorrow.getDate()).slice(-2);
|
||||
var defaultStart = y + '-' + m + '-' + d + ' 07:00:00';
|
||||
var defaultEnd = ty + '-' + tm + '-' + td + ' 06:59:59';
|
||||
|
||||
//执行一个laydate实例
|
||||
laydate.render({
|
||||
elem: '#start' //指定元素
|
||||
elem: '#start'
|
||||
,type:'datetime',
|
||||
lang: dateLang
|
||||
lang: dateLang,
|
||||
value: defaultStart
|
||||
});
|
||||
//执行一个laydate实例
|
||||
laydate.render({
|
||||
elem: '#end' //指定元素
|
||||
elem: '#end'
|
||||
,type:'datetime',
|
||||
lang: dateLang
|
||||
lang: dateLang,
|
||||
value: defaultEnd
|
||||
});
|
||||
});
|
||||
|
||||
@@ -292,11 +306,11 @@
|
||||
break;
|
||||
}
|
||||
if(format == 1){
|
||||
startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00';
|
||||
endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59';
|
||||
startDate = startYear + '-' + startMonth + '-' + startDay + ' 07:00:00';
|
||||
endDate = endYear + '-' + endMonth + '-' + endDay + ' 06:59:59';
|
||||
}else{
|
||||
startDate = startDay + ' 00:00:00';
|
||||
endDate = endDay + ' 23:59:59';
|
||||
startDate = startDay + ' 07:00:00';
|
||||
endDate = endDay + ' 06:59:59';
|
||||
}
|
||||
|
||||
query.startDate = startDate;
|
||||
|
||||
@@ -58,3 +58,8 @@ define('LOCAL_PHONE_WS', 'ws://192.168.6.2:8088');
|
||||
//JK
|
||||
define('LOCAL_TRACKER_SERVER', 'og-ws.abc.com');
|
||||
define('LOCAL_TRACKER_PROTOCOL', 'https');
|
||||
|
||||
// 注册相关常量
|
||||
define('REGISTER_DEFAULT_AREA_ID', 1); // 默认注册区域ID (1=大陆, 2=台湾)
|
||||
define('REGISTER_XIMALV_GAP', 0.1); // 洗码率差值
|
||||
define('REGISTER_REBATE_GAP', 0.1); // 返点差值
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user