這個地方還是有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'=>
$result = UserModel::update($param,$condition);