代理显示

This commit is contained in:
“wanyongkang”
2021-02-23 18:01:22 +08:00
parent 3ec73a419d
commit 0170bd583f

View File

@@ -242,15 +242,18 @@ class Agent extends Controller
public function updateAgent()
{
$data = json_decode(file_get_contents("php://input"), true);
$data['password'] = cToMd5($data['password']);
$agent_user_model = new AgentUser;
$update_data = [
'password'=>cToMd5($data['password']),
'phone'=>$data['phone'],
'qq'=>$data['qq'],
'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);