分离后台和用户中心登录状态

This commit is contained in:
2020-04-27 08:10:23 +08:00
parent ab34ae6458
commit 246c95d956
6 changed files with 38 additions and 23 deletions

View File

@@ -39,7 +39,7 @@ class Index extends Base {
} catch (Exception $e) {
return $this->error($e->getError(), '');
}
}else{
} else {
return $this->fetch();
}
}
@@ -62,10 +62,10 @@ class Index extends Base {
$result = (new Member())->register($this->request);
if (false !== $result) {
return $this->success("注册成功!", url('/user/index/login'));
}else{
} else {
return $this->error("注册失败!");
}
}else{
} else {
return $this->fetch();
}
}
@@ -90,13 +90,13 @@ class Index extends Base {
$result = Member::sendFindPaswd($user);
if (false !== $result) {
return $this->success("已发送找回密码邮件!", url('/user/index/login'));
}else{
} else {
return $this->error("发送邮件失败!");
}
}else{
} else {
return $this->error('无此用户!');
}
}else{
} else {
return $this->fetch();
}
}
@@ -124,13 +124,13 @@ class Index extends Base {
$result = Member::update($data, ['uid' => $user['uid']]);
if (false !== $result) {
return $this->success("已重置!", url('/user/index/login'));
}else{
} else {
return $this->error("发送邮件失败!");
}
}else{
} else {
return $this->error('无此用户!');
}
}else{
} else {
$token = $this->request->param('token');
return $this->fetch();
}