master
elf 3 years ago
parent f84db48ce1
commit 25969448f7

@ -78,7 +78,7 @@
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">定制道具列表</h3>
<h3 class="page_title">定制道具功能设置</h3>
</div>
<div class="cf top_nav_list" style="height: 38px;">
<!-- 高级搜索 -->

@ -503,7 +503,6 @@ class GameRebateService
}
$data = [
'base_game_id' => $params['base_game_id'],
'ref_id' => $params['ref_id'],
'name' => $params['name'],
'value' => $params['value'],
@ -513,6 +512,7 @@ class GameRebateService
if ($id > 0) {
M('rebate_props', 'tab_')->where(['id' => $id])->save($data);
} else {
$data['base_game_id'] = $params['base_game_id'] ?? 0;
$data['create_time'] = time();
M('rebate_props', 'tab_')->add($data);
}
@ -592,6 +592,26 @@ class GameRebateService
throw new \Exception('请选择游戏');
}
if (!is_numeric($defaultTimes)) {
throw new \Exception('默认倍数格式错误');
}
if (!is_numeric($maxTimes)) {
throw new \Exception('倍数上限格式错误');
}
$defaultTimes = intval($defaultTimes);
$maxTimes = intval($maxTimes);
if ($defaultTimes < 0) {
throw new \Exception('默认倍数需大于0');
}
if ($maxTimes < 0) {
throw new \Exception('倍数上限需大于0');
}
$setting = M('rebate_times_setting', 'tab_')->where(['base_game_id' => $baseGameId, 'type' => $type])->find();
// $baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find();
@ -743,7 +763,7 @@ class GameRebateService
'pay_amount' => $dailyPayAmount,
'gift_key' => 'J-0',
'gift_content' => $this->getGiftContentByProps($applyProps),
'props' => json_encode($applyProps),
'props' => json_encode($applyProps, JSON_UNESCAPED_UNICODE),
'times' => $setting['max_times'],
'create_time' => time(),
];

Loading…
Cancel
Save