From 772f6c0a2d7c24359139341c93cf8c5f8991aaf0 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 2 Mar 2020 17:48:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E9=99=8D=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/SafeController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index db530113d..5e9d5bede 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -523,7 +523,7 @@ class SafeController extends BaseController{ } $page = intval(I('get.p', 1)); $page = $page ? $page : 1; //默认显示第一页数据arraypage - $rs = M('promote_action_logs','tab_')->where($map)->order('create_time') + $rs = M('promote_action_logs','tab_')->where($map)->order('create_time DESC') ->page($page, $row)->select(); foreach($rs as $key => $v) { $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); From 68cee2d381e06c741b1698e3d8967f9ce86b0258 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Mon, 2 Mar 2020 18:34:46 +0800 Subject: [PATCH 2/2] fix --- Application/Admin/Controller/ToolController.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/ToolController.class.php b/Application/Admin/Controller/ToolController.class.php index 5e41ec38a..39598df6e 100644 --- a/Application/Admin/Controller/ToolController.class.php +++ b/Application/Admin/Controller/ToolController.class.php @@ -39,13 +39,11 @@ class ToolController extends ThinkController { $map_['name']=array("in",'wei_xin,wei_xin_app,weixin'); M('tool','tab_')->where($map_)->setField('status','0'); } - if (!is_numeric($config['channel_rate'])) { + if (isset($config['channel_rate']) && ($config['channel_rate'] > 100 || !is_numeric($config['channel_rate']))) { $this->error('请输入正确的渠道费率'); } - if ($config['channel_rate'] > 100) { - $this->error('渠道费率最大值为100%'); - } - $config['channel_rate'] = round($config['channel_rate'], 2); + if (isset($config['channel_rate'])) $config['channel_rate'] = round($config['channel_rate'], 2); + $flag = M('Tool','tab_')->where($map)->setField($data); if($flag !== false){ $config['status']=$_POST['status'];