更新头像添加路径3
This commit is contained in:
@@ -198,13 +198,12 @@ function getPicUrl($url)
|
||||
} else {
|
||||
unset($params['password'], $params['salt']);
|
||||
}
|
||||
|
||||
$params['avatar'] = $this->getPicUrl($params['avatar']);
|
||||
//这里需要针对mobile做唯一验证
|
||||
//这里需要针对mobile做唯一验证1111
|
||||
$adminValidate = \think\Loader::validate('Student');
|
||||
$adminValidate->rule([
|
||||
'mobile' => 'regex:1[3-9]\d{9}|unique:student,mobile,' . $row->id,
|
||||
]);
|
||||
$params['avatar'] = $this->getPicUrl($params['avatar']);
|
||||
$result = $row->validateFailException()->validate('Student.edit')->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user