fix: layer notice
This commit is contained in:
@@ -15,9 +15,7 @@
|
|||||||
|
|
||||||
`SWIFTADMIN` 是一款基于 webman + Layui 开发的 http 服务框架,提供了一个简单易用的(权限)后台管理系统,
|
`SWIFTADMIN` 是一款基于 webman + Layui 开发的 http 服务框架,提供了一个简单易用的(权限)后台管理系统,
|
||||||
|
|
||||||
拥有极简的封装扩展,特别适合中小企业和个人站长用于开发 web 站点或者 http 接口。支持路由、中间件、自动注入、多应用、
|
拥有极简的封装扩展,特别适合中小企业和个人站长用于开发 web 站点或者 http 接口。支持路由、中间件、自动注入、多应用、 自定义进程、无需更改直接兼容现有 composer 项目组件等诸多特性。具有学习成本低、简单易用、超高性能、超高稳定性等特点。
|
||||||
|
|
||||||
自定义进程、无需更改直接兼容现有 composer 项目组件等诸多特性。具有学习成本低、简单易用、超高性能、超高稳定性等特点。
|
|
||||||
|
|
||||||
### 软件架构
|
### 软件架构
|
||||||
|
|
||||||
|
|||||||
@@ -137,19 +137,17 @@ class Index extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询数据库名
|
// 查询数据库名
|
||||||
$database = @mysqli_select_db($connect, $params['database']);
|
$mysql_table = @mysqli_query($connect, 'SHOW DATABASES');
|
||||||
if (!$database) {
|
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;";
|
$query = "CREATE DATABASE IF NOT EXISTS `" . $params['database'] . "` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;";
|
||||||
if (!@mysqli_query($connect, $query)) {
|
if (!@mysqli_query($connect, $query)) {
|
||||||
return $this->error('数据库创建失败或已存在,请手动修改');
|
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);
|
Cache::set('mysqlInfo', $params);
|
||||||
return json(['code' => 200, 'url' => '/install/index/step3']);
|
return json(['code' => 200, 'url' => '/install/index/step3']);
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
location.href = res.url;
|
location.href = res.url;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg,'error');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
location.href = res.url;
|
location.href = res.url;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg,'error');
|
||||||
}
|
}
|
||||||
},'json');
|
},'json');
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user