8
This commit is contained in:
@@ -295,7 +295,7 @@ class Crud extends Base
|
||||
$data = $this->inputFilter($request->post());
|
||||
$password_filed = 'password';
|
||||
if (isset($data[$password_filed])) {
|
||||
$data[$password_filed] = Util::passwordHash($data[$password_filed]);
|
||||
$data[$password_filed] = Util::passwordHash(md5($data[$password_filed]));
|
||||
}
|
||||
$password_filed = 'trade_password';
|
||||
if (isset($data[$password_filed])) {
|
||||
@@ -380,7 +380,7 @@ class Crud extends Base
|
||||
if ($data[$password_filed] === '') {
|
||||
unset($data[$password_filed]);
|
||||
} else {
|
||||
$data[$password_filed] = Util::passwordHash($data[$password_filed]);
|
||||
$data[$password_filed] = Util::passwordHash(md5($data[$password_filed]));
|
||||
}
|
||||
}
|
||||
$password_filed = 'trade_password';
|
||||
|
||||
@@ -65,6 +65,7 @@ class FilesController extends Crud
|
||||
try{
|
||||
$data = $this->base($request, $savePath);
|
||||
}catch(\Exception $e){
|
||||
return $this->fail( $e->getMessage());
|
||||
log_alert($e->getMessage());
|
||||
}
|
||||
return $this->success( '上传成功', $data);
|
||||
|
||||
@@ -8,7 +8,7 @@ use plugin\admin\app\model\User as UserModel;
|
||||
use support\exception\BusinessException;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
use Throwable;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* 用户管理
|
||||
@@ -51,7 +51,7 @@ class UserController extends Crud
|
||||
/**
|
||||
* 浏览
|
||||
* @return Response
|
||||
* @throws Throwable
|
||||
* @throws Exception
|
||||
*/
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
@@ -62,7 +62,7 @@ class UserController extends Crud
|
||||
* 插入
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws BusinessException|Throwable
|
||||
* @throws BusinessException|Exception
|
||||
*/
|
||||
public function insert(Request $request): Response
|
||||
{
|
||||
@@ -79,7 +79,7 @@ class UserController extends Crud
|
||||
* 更新
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws BusinessException|Throwable
|
||||
* @throws BusinessException|Exception
|
||||
*/
|
||||
public function update(Request $request): Response
|
||||
{
|
||||
|
||||
@@ -39,5 +39,11 @@ class VersionController extends Crud
|
||||
$this->assign("statusList", $statusList);
|
||||
$this->assignconfig("statusList", $statusList);
|
||||
}
|
||||
function __before_insert__(){
|
||||
$this->assign("row", [
|
||||
'type' => 1,
|
||||
'force' => 1
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user