1.修复矿建鉴权报错
2.优化登录跳转接口 3.优化登录跳转接口 4.修复CURD生成代码模块表不加前缀访问返回404问题 5.系统级报错***优化报错Fatal error: Type of app\common\library\token\TokenExpirationException::$message
This commit is contained in:
@@ -231,8 +231,17 @@ class InstallData extends AbstractMigration
|
||||
|
||||
public function menuRule(): void
|
||||
{
|
||||
if (!$this->hasTable('menu_rule')) return;
|
||||
$table = $this->table('menu_rule');
|
||||
// Install 迁移在已存在 admin_rule(旧版表名)时会跳过创建 menu_rule,此处需与之一致
|
||||
$ruleTable = null;
|
||||
if ($this->hasTable('menu_rule')) {
|
||||
$ruleTable = 'menu_rule';
|
||||
} elseif ($this->hasTable('admin_rule')) {
|
||||
$ruleTable = 'admin_rule';
|
||||
}
|
||||
if ($ruleTable === null) {
|
||||
return;
|
||||
}
|
||||
$table = $this->table($ruleTable);
|
||||
$rows = [
|
||||
[
|
||||
'id' => '1',
|
||||
@@ -1155,7 +1164,7 @@ class InstallData extends AbstractMigration
|
||||
'createtime' => $this->nowTime,
|
||||
],
|
||||
];
|
||||
$exist = Db::name('menu_rule')->where('id', 1)->value('id');
|
||||
$exist = Db::name($ruleTable)->where('id', 1)->value('id');
|
||||
if (!$exist) {
|
||||
$table->insert($rows)->saveData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user