|
@@ -187,10 +187,15 @@ class SystemAdmin extends AuthController
|
|
|
if ($this->request->isPost()) {
|
|
if ($this->request->isPost()) {
|
|
|
$data = Util::postMore([
|
|
$data = Util::postMore([
|
|
|
['new_pwd', ''],
|
|
['new_pwd', ''],
|
|
|
|
|
+ ['account', ''],
|
|
|
['new_pwd_ok', ''],
|
|
['new_pwd_ok', ''],
|
|
|
['pwd', ''],
|
|
['pwd', ''],
|
|
|
'real_name',
|
|
'real_name',
|
|
|
]);
|
|
]);
|
|
|
|
|
+ if (!$data['account']) return Json::fail('账号不能为空');
|
|
|
|
|
+ if ($data['account'] != $adminInfo['account']) {
|
|
|
|
|
+ if (AdminModel::be(['account' => $data['account']])) return Json::fail('账号已存在');
|
|
|
|
|
+ }
|
|
|
if ($data['pwd'] != '') {
|
|
if ($data['pwd'] != '') {
|
|
|
$pwd = md5($data['pwd']);
|
|
$pwd = md5($data['pwd']);
|
|
|
if ($adminInfo['pwd'] != $pwd) return Json::fail('原始密码错误');
|
|
if ($adminInfo['pwd'] != $pwd) return Json::fail('原始密码错误');
|