fix: layer notice

This commit is contained in:
Ying
2022-08-20 18:39:44 +08:00
parent e4b3594077
commit 7345c52212
4 changed files with 12 additions and 16 deletions

View File

@@ -15,9 +15,7 @@
`SWIFTADMIN` 是一款基于 webman + Layui 开发的 http 服务框架,提供了一个简单易用的(权限)后台管理系统,
拥有极简的封装扩展,特别适合中小企业和个人站长用于开发 web 站点或者 http 接口。支持路由、中间件、自动注入、多应用、
自定义进程、无需更改直接兼容现有 composer 项目组件等诸多特性。具有学习成本低、简单易用、超高性能、超高稳定性等特点。
拥有极简的封装扩展,特别适合中小企业和个人站长用于开发 web 站点或者 http 接口。支持路由、中间件、自动注入、多应用、 自定义进程、无需更改直接兼容现有 composer 项目组件等诸多特性。具有学习成本低、简单易用、超高性能、超高稳定性等特点。
### 软件架构

View File

@@ -137,19 +137,17 @@ class Index extends BaseController
}
// 查询数据库名
$database = @mysqli_select_db($connect, $params['database']);
if (!$database) {
$mysql_table = @mysqli_query($connect, 'SHOW DATABASES');
while ($row = @mysqli_fetch_assoc($mysql_table)) {
if ($row['Database'] == $params['database']) {
return $this->error('数据表已存在,请勿重复安装');
}
}
$query = "CREATE DATABASE IF NOT EXISTS `" . $params['database'] . "` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;";
if (!@mysqli_query($connect, $query)) {
return $this->error('数据库创建失败或已存在,请手动修改');
}
} else {
$mysql_table = @mysqli_query($connect, 'SHOW TABLES FROM' . ' ' . $params['database']);
$mysql_table = @mysqli_fetch_array($mysql_table);
if (!empty($mysql_table) && is_array($mysql_table)) {
return $this->error('数据表已存在,请勿重复安装');
}
}
Cache::set('mysqlInfo', $params);
return json(['code' => 200, 'url' => '/install/index/step3']);

View File

@@ -170,7 +170,7 @@
location.href = res.url;
}
else {
layer.msg(res.msg);
layer.msg(res.msg,'error');
}
})
})

View File

@@ -147,7 +147,7 @@
location.href = res.url;
}
else {
layer.msg(res.msg);
layer.msg(res.msg,'error');
}
},'json');
return false;