账号注销:除手机验证

This commit is contained in:
Jerry Yan 2020-08-22 21:52:24 +08:00
parent fd55825f52
commit 252a83f578

View File

@ -676,7 +676,7 @@ public function forgetPasss(){
//禁止缓存
header('Cache-Control:no-cache,must-revalidate');
header('Pragma:no-cache');
//$code = input("post.verifyCode");
$code = input("post.verifyCode");
$step = input("post.step/d");
switch ($step) {
case 1:#第一步,验证身份
@ -872,13 +872,21 @@ public function forgetPasss(){
$user = $m->getById($userId);
if (empty($user)) exit(jsonReturn('系统异常',0,[]));
$opUser = input('post.op_user');
$opContent = input('post.op_content');
// TODO: 记录操作人员名称
// TODO: 验证规则
Db::startTrans();
$m->where('userId', '=', $userId)->update([
'dataFlag'=>9,
Db::name('user_lock')->insert([
'lockTime'=>0,
'lockReason'=>'账号已注销,操作人:'.$opUser.',注销申请内容:'.$opContent,
'createTime'=>time(),
'adminId'=>0,
'userId'=>$userId,
]);
Db::rollback();
exit(jsonReturn('成功',1,[]));
$m->where('userId', '=', $userId)->update([
'userStatus'=>0,
]);
Db::commit();
exit(jsonReturn('账号注销成功',1,[]));
}
}