master
yulingwei 5 years ago
parent 52e058ba49
commit 68cee2d381

@ -39,13 +39,11 @@ class ToolController extends ThinkController {
$map_['name']=array("in",'wei_xin,wei_xin_app,weixin'); $map_['name']=array("in",'wei_xin,wei_xin_app,weixin');
M('tool','tab_')->where($map_)->setField('status','0'); 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('请输入正确的渠道费率'); $this->error('请输入正确的渠道费率');
} }
if ($config['channel_rate'] > 100) { if (isset($config['channel_rate'])) $config['channel_rate'] = round($config['channel_rate'], 2);
$this->error('渠道费率最大值为100%');
}
$config['channel_rate'] = round($config['channel_rate'], 2);
$flag = M('Tool','tab_')->where($map)->setField($data); $flag = M('Tool','tab_')->where($map)->setField($data);
if($flag !== false){ if($flag !== false){
$config['status']=$_POST['status']; $config['status']=$_POST['status'];

Loading…
Cancel
Save