代理显示
This commit is contained in:
@@ -242,15 +242,18 @@ class Agent extends Controller
|
|||||||
public function updateAgent()
|
public function updateAgent()
|
||||||
{
|
{
|
||||||
$data = json_decode(file_get_contents("php://input"), true);
|
$data = json_decode(file_get_contents("php://input"), true);
|
||||||
$data['password'] = cToMd5($data['password']);
|
|
||||||
$agent_user_model = new AgentUser;
|
$agent_user_model = new AgentUser;
|
||||||
|
|
||||||
$update_data = [
|
$update_data = [
|
||||||
'password'=>cToMd5($data['password']),
|
|
||||||
'phone'=>$data['phone'],
|
'phone'=>$data['phone'],
|
||||||
'qq'=>$data['qq'],
|
'qq'=>$data['qq'],
|
||||||
'realname'=>$data['realname'],
|
'realname'=>$data['realname'],
|
||||||
];
|
];
|
||||||
|
if(!empty($data['password'])){
|
||||||
|
$data['password'] = cToMd5($data['password']);
|
||||||
|
$update_data['password'] = $data['password'];
|
||||||
|
}
|
||||||
|
|
||||||
$agent_user_model->updateOne(['id'=>$data['id']],$update_data);
|
$agent_user_model->updateOne(['id'=>$data['id']],$update_data);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user