Skip to content

Commit

Permalink
refactor:目录结构调整、类型定义优化
Browse files Browse the repository at this point in the history
  • Loading branch information
build-admin committed Jun 24, 2023
1 parent a65b3e0 commit 5fb0b78
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 225 deletions.
18 changes: 9 additions & 9 deletions app/admin/controller/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace app\admin\controller;

use Throwable;
use ba\module\Server;
use ba\module\Manage;
use ba\module\moduleException;
use ba\Exception;
use app\admin\library\module\Server;
use app\admin\library\module\Manage;
use app\common\controller\Backend;

class Module extends Backend
Expand Down Expand Up @@ -46,7 +46,7 @@ public function install()
$res = [];
try {
$res = Manage::instance($uid)->install($token, $orderId);
} catch (moduleException $e) {
} catch (Exception $e) {
$this->error(__($e->getMessage()), $e->getData(), $e->getCode());
} catch (Throwable $e) {
$this->error(__($e->getMessage()));
Expand All @@ -64,7 +64,7 @@ public function dependentInstallComplete()
}
try {
Manage::instance($uid)->dependentInstallComplete('all');
} catch (moduleException $e) {
} catch (Exception $e) {
$this->error(__($e->getMessage()), $e->getData(), $e->getCode());
} catch (Throwable $e) {
$this->error(__($e->getMessage()));
Expand All @@ -82,7 +82,7 @@ public function changeState()
$info = [];
try {
$info = Manage::instance($uid)->changeState($state);
} catch (moduleException $e) {
} catch (Exception $e) {
$this->error(__($e->getMessage()), $e->getData(), $e->getCode());
} catch (Throwable $e) {
$this->error(__($e->getMessage()));
Expand All @@ -100,7 +100,7 @@ public function uninstall()
}
try {
Manage::instance($uid)->uninstall();
} catch (moduleException $e) {
} catch (Exception $e) {
$this->error(__($e->getMessage()), $e->getData(), $e->getCode());
} catch (Throwable $e) {
$this->error(__($e->getMessage()));
Expand All @@ -118,7 +118,7 @@ public function update()
}
try {
Manage::instance($uid)->update($token, $orderId);
} catch (moduleException $e) {
} catch (Exception $e) {
$this->error(__($e->getMessage()), $e->getData(), $e->getCode());
} catch (Throwable $e) {
$this->error(__($e->getMessage()));
Expand All @@ -135,7 +135,7 @@ public function upload()
$info = [];
try {
$info = Manage::instance()->upload($file);
} catch (moduleException $e) {
} catch (Exception $e) {
$this->error(__($e->getMessage()), $e->getData(), $e->getCode());
} catch (Throwable $e) {
$this->error(__($e->getMessage()));
Expand Down
Loading

0 comments on commit 5fb0b78

Please sign in to comment.