Commit e9759ab9 authored by hujun's avatar hujun

修改密码提示语

parent 11c3e513
...@@ -320,16 +320,15 @@ class Broker extends Basic ...@@ -320,16 +320,15 @@ class Broker extends Basic
$data['msg'] = ""; $data['msg'] = "";
$data['data'] = []; $data['data'] = [];
if ($this->params['pwd'] || $this->params['old_pwd']) { if (empty($this->params['pwd']) || empty($this->params['old_pwd'])) {
$agents = new AAgents(); return $this->response(101, '新密码或旧密码错误!');
$result = $agents->editPwd($this->agentId, $this->params['pwd'], $this->params['old_pwd']); }
if (!$result) {
$data['code'] = 101; $agents = new AAgents();
$data['msg'] = 'change failed'; $result = $agents->editPwd($this->agentId, $this->params['pwd'], $this->params['old_pwd']);
} if (!$result) {
} else {
$data['code'] = 101; $data['code'] = 101;
$data['msg'] = 'pwd or old_pwd is null'; $data['msg'] = '密码修改失败!';
} }
return $this->response($data['code'], $data['msg'], $data['data']); return $this->response($data['code'], $data['msg'], $data['data']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment