mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-05 17:42:49 +08:00
给系统代码增加异常抛出
This commit is contained in:
@@ -7,6 +7,7 @@ use app\common\controller\AdminController;
|
|||||||
use app\common\service\MenuService;
|
use app\common\service\MenuService;
|
||||||
use app\common\service\UploadService;
|
use app\common\service\UploadService;
|
||||||
use think\db\Query;
|
use think\db\Query;
|
||||||
|
use think\facade\App;
|
||||||
use think\facade\Cache;
|
use think\facade\Cache;
|
||||||
|
|
||||||
class AjaxBase extends AdminController
|
class AjaxBase extends AdminController
|
||||||
@@ -66,7 +67,9 @@ class AjaxBase extends AdminController
|
|||||||
|
|
||||||
$result = $upload_service->save($data['file']);
|
$result = $upload_service->save($data['file']);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
if(App::isDebug()){
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
$this->error($e->getMessage());
|
$this->error($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,6 +95,9 @@ class AjaxBase extends AdminController
|
|||||||
|
|
||||||
$result = $upload_service->save($data['file']);
|
$result = $upload_service->save($data['file']);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
if(App::isDebug()){
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
$this->error($e->getMessage());
|
$this->error($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use app\admin\model\SystemMenu;
|
|||||||
use app\admin\model\SystemQuick;
|
use app\admin\model\SystemQuick;
|
||||||
use app\common\controller\AdminController;
|
use app\common\controller\AdminController;
|
||||||
use app\common\service\MenuService;
|
use app\common\service\MenuService;
|
||||||
|
use think\facade\App;
|
||||||
|
|
||||||
class IndexBase extends AdminController
|
class IndexBase extends AdminController
|
||||||
{
|
{
|
||||||
@@ -64,6 +65,9 @@ class IndexBase extends AdminController
|
|||||||
->allowField(['head_img', 'phone', 'remark', 'update_time'])
|
->allowField(['head_img', 'phone', 'remark', 'update_time'])
|
||||||
->save($post);
|
->save($post);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
if (App::isDebug()) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
$this->error('保存失败');
|
$this->error('保存失败');
|
||||||
}
|
}
|
||||||
$save ? $this->success('保存成功') : $this->error('保存失败');
|
$save ? $this->success('保存成功') : $this->error('保存失败');
|
||||||
@@ -106,6 +110,9 @@ class IndexBase extends AdminController
|
|||||||
'password' => password($post['password']),
|
'password' => password($post['password']),
|
||||||
]);
|
]);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
if(App::isDebug()){
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
$this->error('保存失败');
|
$this->error('保存失败');
|
||||||
}
|
}
|
||||||
if ($save) {
|
if ($save) {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use app\admin\service\annotation\NodeAnotation;
|
|||||||
use app\admin\service\TriggerService;
|
use app\admin\service\TriggerService;
|
||||||
use app\common\controller\AdminController;
|
use app\common\controller\AdminController;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
use think\facade\App as FacadeApp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Config.
|
* Class Config.
|
||||||
@@ -69,6 +70,9 @@ class ConfigBase extends AdminController
|
|||||||
TriggerService::updateMenu();
|
TriggerService::updateMenu();
|
||||||
TriggerService::updateSysconfig();
|
TriggerService::updateSysconfig();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
if (FacadeApp::isDebug()) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
$this->error('保存失败');
|
$this->error('保存失败');
|
||||||
}
|
}
|
||||||
$this->success('保存成功');
|
$this->success('保存成功');
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ use think\console\Output;
|
|||||||
|
|
||||||
class VersionBase extends Command
|
class VersionBase extends Command
|
||||||
{
|
{
|
||||||
public const VERSION = 'v2.0.91';
|
public const VERSION = 'v2.0.92';
|
||||||
|
|
||||||
public const LAYUI_VERSION = '2.8.17';
|
public const LAYUI_VERSION = '2.8.17';
|
||||||
|
|
||||||
public const COMMENT = [
|
public const COMMENT = [
|
||||||
'增加引入文件的版本控制更新',
|
'给系统代码增加异常抛出',
|
||||||
'发布新版本',
|
'发布新版本',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user