增加 玩家最低充值金额平台设置

This commit is contained in:
leo 2021-10-28 14:06:28 +08:00
parent 93023f8fde
commit da37c19c3f
7 changed files with 19 additions and 4 deletions

View File

@ -80,7 +80,7 @@ class Base extends Controller
// $this->redirect(APP_PATH . '404.html');
$this->nullSession();
echo "<script>alert('非法ip');window.parent.location='/admin/login/index';</script>";
echo "<script>alert('非法ip ".$this->request->ip()."');window.parent.location='/admin/login/index';</script>";
return;
}

View File

@ -128,6 +128,9 @@ class Groups extends Base
if(!empty($has)){
return json(['code' => -1, 'data' => '', 'msg' => '该平台已经存在']);
}
if ($param['min_recharge_amount'] < 0) {
return json(['code' => -1, 'data' => '', 'msg' => '最低充值金额不能小于 0']);
}
try{
$group = $gdb->where('id', $param['id'])->find();

View File

@ -93,6 +93,14 @@
</div>
</div>
<div class="form-group layui-form-item">
<label class="col-sm-3 control-label">玩家最低充值金额(分):</label>
<div class="input-group col-sm-4">
<span></span>
<input type="text" class="form-control" name="min_recharge_amount" placeholder="玩家最低充值金额" value="{$info['min_recharge_amount']}"/>
</div>
</div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-6">
<button class="btn btn-primary" type="submit">提交</button>

View File

@ -44,6 +44,7 @@
<th data-field="money">充值余额</th>
<th data-field="recharge_gift_type">充值赠送类型</th>
<th data-field="recharge_gift_value">充值赠送值</th>
<th data-field="min_recharge_amount">玩家最低充值金额(分)</th>
<th data-field="status">平台状态</th>
<th data-field="operate">操作</th>
</thead>

View File

@ -115,12 +115,15 @@ class Game extends Base
'recharge_gift_type' => isset($group['recharge_gift_type']) ? $group['recharge_gift_type'] : 0,
'recharge_gift_value' => isset($group['recharge_gift_value']) ? $group['recharge_gift_value'] : 0,
];
// 玩家最低充值金额(分)
$min_recharge_amount = isset($group['recharge_gift_value']) ? $group['recharge_gift_value'] : 0;
$data = [
'code' => 200,
'msg' => '获取成功.',
'data' => $kfList ? $kfList : [],
'recharge_gift' => $recharge_gift,
'min_recharge_amount' => $min_recharge_amount,
];
return json($data);

View File

@ -35,7 +35,7 @@ class Base extends Controller
// $this->redirect(APP_PATH . '404.html');
$this->nullSession();
echo "<script>alert('非法ip');window.parent.location='/service/login/index';</script>";
echo "<script>alert('非法ip ".$this->request->ip()."');window.parent.location='/service/login/index';</script>";
return;
}
@ -161,7 +161,7 @@ class Base extends Controller
{
$ga = new GoogleAuthenticator();
$key = $ga->createSecret($this->googleAuthSecretLength);
$content = $ga->getQrContent($this->request->host(),$key,session('l_user_name').'['.date('Y-m-d H:i:s').']');
$content = $ga->getQrContent($this->request->host(),$key,session('l_user_id').'['.date('Y-m-d H:i:s').']');
if (isset($key)){
return json(['code' => 1, 'key' => $key, 'qrcode_url' => $content, 'msg' => '获取成功']);
}

View File

@ -452,7 +452,7 @@ class ChatLogic extends Base
public function chat()
{
try {
$content = self::$_requestParam['param']['content'];
$content = htmlspecialchars(self::$_requestParam['param']['content']);
$contentType = empty(self::$_requestParam['param']['content_type']) ? "" : self::$_requestParam['param']['content_type'];
$kfType = '';