Merge branch 'featrue/fix_bug' into dev

master
jbrazz 5 years ago
commit c1ab4e789c

@ -860,6 +860,15 @@ class PromoteController extends BaseController
$this->ajaxReturn(array('status' => -1, 'msg' => '身份证格式错误'));
}
}
if (mb_strlen($_POST['account']) < 6 || mb_strlen($_POST['account']) > 15) {
$this->error('账号长度为6-15个字符', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
if (mb_strlen($_POST['real_name']) < 2 || mb_strlen($_POST['real_name']) > 4) {
$this->error('姓名长度为2-4个字符', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
$res = $user->promote_add($_POST);
if (is_numeric($res)) {

@ -37,13 +37,13 @@
<tr>
<td class="l"><span class="req">*</span>帐号:</td>
<td class="r">
<input type="text" class="name input-txt txt" name="account" id="account" placeholder="请输入帐号">
<input type="text" class="name input-txt txt" name="account" id="account" maxlength="15" minlength="6" placeholder="请输入帐号">
</td>
</tr>
<tr>
<td class="l"><span class="req">*</span>姓名:</td>
<td class="r">
<input type="text" class="name input-txt txt" name="real_name" id="real_name" placeholder="请输入姓名">
<input type="text" class="name input-txt txt" name="real_name" id="real_name" maxlength="4" minlength="2" placeholder="请输入姓名">
</td>
</tr>
<tr>
@ -141,8 +141,14 @@
if($('#account').val()==""){
return json_data = {'status':0,'msg':'子渠道账号不能为空'}
}
if($.trim($('#account').val()).length < 6){
return json_data = {'status':0,'msg':'子渠道账号不能小于6位字符'}
// if($.trim($('#account').val()).length < 6){
// return json_data = {'status':0,'msg':'子渠道账号不能小于6位字符'}
// }
if($.trim($('#account').val()).length < 6 || $.trim($('#account').val()).length > 15){
return json_data = {'status':0,'msg':'子渠道账号长度为6-15位字符'}
}
if($.trim($('#real_name').val()).length < 2 || $.trim($('#real_name').val()).length > 4){
return json_data = {'status':0,'msg':'子渠道姓名长度为2-4位字符'}
}
if($('#password').val()==""){
return json_data = {'status':0,'msg':'子渠道密码不能为空'}

Loading…
Cancel
Save