From 163ad97d602c526fa0c37d16aec6e370e31d9adc Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 24 Mar 2020 15:00:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=99=90=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ToolController.class.php | 15 +++++++++++++++ Application/Admin/View/Tool/editLimitPay.html | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php index 4dec634ea..be5b563cd 100644 --- a/Application/Admin/Controller/ToolController.class.php +++ b/Application/Admin/Controller/ToolController.class.php @@ -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'; diff --git a/Application/Admin/View/Tool/editLimitPay.html b/Application/Admin/View/Tool/editLimitPay.html index 7d4dbca7b..92b6f56f4 100644 --- a/Application/Admin/View/Tool/editLimitPay.html +++ b/Application/Admin/View/Tool/editLimitPay.html @@ -285,7 +285,7 @@