mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-06 10:02:49 +08:00
给系统代码增加异常抛出
This commit is contained in:
@@ -7,6 +7,7 @@ use app\admin\model\SystemMenu;
|
||||
use app\admin\model\SystemQuick;
|
||||
use app\common\controller\AdminController;
|
||||
use app\common\service\MenuService;
|
||||
use think\facade\App;
|
||||
|
||||
class IndexBase extends AdminController
|
||||
{
|
||||
@@ -64,6 +65,9 @@ class IndexBase extends AdminController
|
||||
->allowField(['head_img', 'phone', 'remark', 'update_time'])
|
||||
->save($post);
|
||||
} catch (\Exception $e) {
|
||||
if (App::isDebug()) {
|
||||
throw $e;
|
||||
}
|
||||
$this->error('保存失败');
|
||||
}
|
||||
$save ? $this->success('保存成功') : $this->error('保存失败');
|
||||
@@ -106,6 +110,9 @@ class IndexBase extends AdminController
|
||||
'password' => password($post['password']),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
if(App::isDebug()){
|
||||
throw $e;
|
||||
}
|
||||
$this->error('保存失败');
|
||||
}
|
||||
if ($save) {
|
||||
|
||||
Reference in New Issue
Block a user