这个地方还是有bug 不是空数据提交时候才有问题
$param = $request->param();
$pwd = (UserModel::get(['id'=>$param['id']]))['password'];
//去掉空数据
foreach ($param as $k=>$v)
{
if(!empty($v))
{
$param[$k]=$v;
}
}
if($pwd == $param['password'])
{
$param = $request->except('password');
}
$condition =['id'=>$param['id']];
$result = UserModel::update($param,$condition);