支付限额

master
sunke 5 years ago
parent 817b39c391
commit 163ad97d60

@ -1060,6 +1060,12 @@ class ToolController extends ThinkController {
if (empty($pay_type)) {
return $this->error('限制支付渠道不能为空');
}
if (empty(intval($total_limit))&&empty(intval($user_total_limit))&&empty(intval($user_one_limit))) {
return $this->error('限额不能为空');
}
if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) {
return $this->error('限额金额出错');
}
if (empty($limit_type)) {
return $this->error('限制方式不能为空');
}
@ -1189,6 +1195,12 @@ class ToolController extends ThinkController {
$status = $_POST['status'];
$startTime = '';
$endTime = '';
if (empty(intval($total_limit))&&empty(intval($user_total_limit))&&empty(intval($user_one_limit))) {
return $this->error('限额不能为空');
}
if (!is_numeric($total_limit) || !is_numeric($user_total_limit) || !is_numeric($user_one_limit) || $total_limit < 0 ||$user_total_limit < 0 ||$user_one_limit < 0 ) {
return $this->error('限额金额出错');
}
if (empty($id)) {
return $this->error('编辑信息出错');
}
@ -1241,6 +1253,7 @@ class ToolController extends ThinkController {
case 'daily':
$limit_time_type = 'day';
$confInfo['limit_time_type_remark'] = "";
$confInfo['fix_date'] = '';
break;
case 'week':
$limit_time_type = 'week';
@ -1249,6 +1262,7 @@ class ToolController extends ThinkController {
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['week_remark'];
}
$confInfo['fix_date'] = '';
break;
case 'month':
$limit_time_type = 'month';
@ -1257,6 +1271,7 @@ class ToolController extends ThinkController {
}else {
$confInfo['limit_time_type_remark'] = $_REQUEST['month_remark'];
}
$confInfo['fix_date'] = '';
break;
case 'day':
$limit_time_type = 'fix';

@ -285,7 +285,7 @@
<div class="form-item">
<input type="hidden" name="id" value="{$data.id|default=''}">
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">编 辑</button>
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">保 存</button>
<button class="submit_btn " onclick="javascript:history.back(-1);return false;">返 回</button>
</div>
</form>

Loading…
Cancel
Save