账号注销:除手机验证

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