master
wangxinglong 2022-03-21 18:15:24 +08:00
parent 0f2a8f4653
commit 672ca78be0
3 changed files with 8 additions and 17 deletions

View File

@ -43,7 +43,7 @@ class User extends Base
'nick_name' => filterEmoji($this->request->param('nickName', '')),
'avatar_url' => $this->request->param('avatarUrl', ''),
'gender' => $this->request->param('gender/d', 0),
'real_name' => $this->request->param('real_name/s', '',"trim"),
//'real_name' => $this->request->param('real_name/s', '',"trim"),
'mobile' => $this->request->param('mobile/s', ''),
'lat' => $this->request->param('lat/f', 0),
'lng' => $this->request->param('lng/f', 0),
@ -76,9 +76,9 @@ class User extends Base
$nowDate = date('Y-m-d H:i:s');
if (!$account) {
if(empty($params['real_name'])){
return $this->json(4001, '真实姓名不能为空');
}
//if(empty($params['real_name'])){
// return $this->json(4001, '真实姓名不能为空');
//}
if(!is_mobile($params['mobile'])){
return $this->json(4001, '手机号格式错误');
}
@ -92,7 +92,7 @@ class User extends Base
'nick_name' => $params['nick_name'] ?: generateDefaultNickName(),
'avatar_url' => $params['avatar_url'] ?: Account::DEFAULT_AVATAR,
'gender' => $params['gender'],
'real_name' => $params['real_name'],
//'real_name' => $params['real_name'],
'mobile' => $params['mobile'],
'lat' => $params['lat'],
'lng' => $params['lng'],
@ -104,7 +104,7 @@ class User extends Base
'lat' => empty($account->lat)?$params['lat'] :$account->lat,//如果之前的位置信息是空的
'lng' => empty($account->lng)?$params['lng'] :$account->lng,//如果之前的位置信息是空的
'mobile' => (!is_mobile($account->mobile))?$params['mobile']:$account->mobile,//如果之前的电话信息是空的
'real_name' => empty($account->real_name)?$params['real_name']:$account->real_name,//如果之前的电话信息是空的
//'real_name' => empty($account->real_name)?$params['real_name']:$account->real_name,//如果之前的电话信息是空的
];
// 更新资料
@ -284,7 +284,7 @@ class User extends Base
}
return $this->json(0, "success",[
"showMobile"=>is_mobile($account->mobile)?false:true,
"showRealName"=>(!empty($account->real_name))?false:true,
//"showRealName"=>(!empty($account->real_name))?false:true,
"session_key"=>$data["session_key"]
]);
}

View File

@ -17,7 +17,7 @@ class Account extends Validate
'username|用户名' => 'require|min:4',
'id_card|身份证' => 'require',
'real_name|真实姓名' => 'require',
// 'real_name|真实姓名' => 'require',
'bank_number|银行卡号' => 'require',
'bank_name|银行名称' => 'require',
];
@ -27,6 +27,5 @@ class Account extends Validate
'register' => ['username', 'nickname', 'phone', 'password', 'password_confirm', 'code'], //注册
'send_sms' => ['phone', 'type'], //发送短信
'binding' => ['phone', 'code'], //绑定手机号
'real_name' => ['id_card', 'real_name', 'bank_number', 'bank_name'], //实名认证
];
}

View File

@ -39,13 +39,5 @@
</div>
<!-- 列 真实姓名 -->
<script type="text/html" id="row-action">
{{# if (d.staff_name) { }}
{{ d.staff_name }}
{{# } else { }}
{{ d.real_name }}
{{# } }}
</script>
<script src="__MANAGER__/js/dashboard.js?v={:mt_rand()}"></script>