安装bug修改
This commit is contained in:
parent
f1eba56ff5
commit
33baa7726a
@ -41,10 +41,10 @@ class Role extends BaseController
|
||||
{
|
||||
$param = get_params();
|
||||
if (request()->isAjax()) {
|
||||
$menuData = isset($param['menu']) ? $param['menu'] : 0;
|
||||
$ruleData = isset($param['rule']) ? $param['rule'] : 0;
|
||||
$param['menus'] = implode(',',$menuData);
|
||||
$param['rules'] = implode(',',$ruleData);
|
||||
$menuData = isset($param['menu']) ? $param['menu'] : 0;
|
||||
$ruleData = isset($param['rule']) ? $param['rule'] : 0;
|
||||
$param['menus'] = implode(',', $menuData);
|
||||
$param['rules'] = implode(',', $ruleData);
|
||||
if (!empty($param['id']) && $param['id'] > 0) {
|
||||
try {
|
||||
validate(GroupCheck::class)->scene('edit')->check($param);
|
||||
@ -72,19 +72,17 @@ class Role extends BaseController
|
||||
clear_cache('adminMenu');
|
||||
clear_cache('adminRules');
|
||||
return to_assign();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$id = isset($param['id']) ? $param['id'] : 0;
|
||||
$menu = get_admin_menu();
|
||||
$rule = get_admin_rule();
|
||||
if($id > 0) {
|
||||
if ($id > 0) {
|
||||
$group = get_admin_group_info($id);
|
||||
$role_menu = create_tree_list(0, $menu, $group['menus']);
|
||||
$role_rule = create_tree_list(0, $rule, $group['rules']);
|
||||
$role = Db::name('AdminGroup')->where(['id' => $id])->find();
|
||||
View::assign('role', $role);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$role_menu = create_tree_list(0, $menu, []);
|
||||
$role_rule = create_tree_list(0, $rule, []);
|
||||
}
|
||||
|
14
app/home/middleware.php
Normal file
14
app/home/middleware.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2021 勾股工作室
|
||||
* @license https://opensource.org/licenses/GPL-2.0
|
||||
* @link https://www.gougucms.com
|
||||
*/
|
||||
|
||||
// 这是系统自动生成的middleware定义文件
|
||||
return [
|
||||
//开启session中间件
|
||||
//'think\middleware\SessionInit',
|
||||
//验证勾股OA是否完成安装
|
||||
\app\home\middleware\Install::class,
|
||||
];
|
@ -7,17 +7,16 @@
|
||||
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\middleware;
|
||||
namespace app\home\middleware;
|
||||
|
||||
class Install
|
||||
{
|
||||
public function handle($request, \Closure $next)
|
||||
{
|
||||
if (!is_installed()) {
|
||||
if(strpos($request['s'],'install/') == false){
|
||||
return $request->isAjax() ? to_assign(1, '请先完成系统安装引导') : redirect((string) url('/install/index'));
|
||||
}
|
||||
return $request->isAjax() ? to_assign(1, '请先完成系统安装引导') : redirect((string) url('/install/index'));
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
@ -408,6 +408,29 @@ INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time
|
||||
INSERT INTO `oa_config`(`id`, `title`, `name`, `content`, `status`, `create_time`, `update_time`) VALUES (4, '其他配置', 'other', 'a:3:{s:2:\"id\";s:1:\"5\";s:6:\"author\";s:15:\"勾股工作室\";s:7:\"version\";s:13:\"v1.2021.07.28\";}', 1, 1613725791, 1635953640);
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_check
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `oa_check`;
|
||||
CREATE TABLE `oa_check` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核人ID',
|
||||
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '审核类型 1报销审核人 2报销打款确认人 3发票审核人 4发票开票人',
|
||||
`remark` varchar(1000) NULL DEFAULT '' COMMENT '备注',
|
||||
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态:-1删除 0禁用 1启用',
|
||||
`create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
|
||||
`update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COMMENT = '审核人配置';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of oa_check
|
||||
-- ----------------------------
|
||||
INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (1, 1, 1, '初始化设置', 1, 1558681814, 0);
|
||||
INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (2, 1, 2, '初始化设置', 1, 1558681814, 0);
|
||||
INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (3, 1, 3, '初始化设置', 1, 1558681814, 0);
|
||||
INSERT INTO `oa_check`(`id`, `uid`, `type`, `remark`, `status`, `create_time`, `update_time`) VALUES (4, 1, 4, '初始化设置', 1, 1558681814, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for oa_department
|
||||
-- ----------------------------
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>勾股CMS安装</title>
|
||||
<title>勾股OA安装</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
@ -47,7 +47,7 @@
|
||||
2、您一旦安装使用勾股CMS系统,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。
|
||||
</p>
|
||||
<div style="margin:10px auto;width: 90px;">
|
||||
<a href="/install/index/step2" class="layui-btn layui-bg-blue">接受协议</a>
|
||||
<a href="/index.php?s=install/index/step2" class="layui-btn layui-bg-blue">接受协议</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>勾股CMS安装</title>
|
||||
<title>勾股OA安装</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
@ -202,7 +202,7 @@
|
||||
if ($('.yes').length != 8) {
|
||||
layer.tips('您的配置或权限不符合要求', this);
|
||||
} else {
|
||||
location.href = "/install/index/step3";
|
||||
location.href = "/index.php?s=install/index/step3";
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>勾股CMS安装</title>
|
||||
<title>勾股OA安装</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
@ -158,7 +158,7 @@
|
||||
}, 30 + Math.random() * 100);
|
||||
|
||||
$.ajax({
|
||||
url: "/install/index/install",
|
||||
url: "/index.php?s=/install/index/install",
|
||||
type: "post",
|
||||
data: data.field,
|
||||
beforeSend: function () {
|
||||
|
@ -10,8 +10,6 @@ return [
|
||||
// \think\middleware\CheckRequestCache::class,
|
||||
// 多语言加载
|
||||
// \think\middleware\LoadLangPack::class,
|
||||
//验证勾股cms是否完成安装
|
||||
\app\middleware\Install::class,
|
||||
// Session初始化
|
||||
'think\middleware\SessionInit',
|
||||
];
|
||||
|
@ -14,14 +14,13 @@ return [
|
||||
'default_app' => 'home',
|
||||
// 默认时区
|
||||
'default_timezone' => 'Asia/Shanghai',
|
||||
// 自动多应用模式
|
||||
'auto_multi_app' => true,
|
||||
|
||||
// 应用映射(自动多应用模式有效)
|
||||
'app_map' => [],
|
||||
// 域名绑定(自动多应用模式有效)
|
||||
'domain_bind' => [],
|
||||
// 禁止URL访问的应用列表(自动多应用模式有效)
|
||||
'deny_app_list' => ['common'],
|
||||
'app_map' => [],
|
||||
// 域名绑定(自动多应用模式有效)
|
||||
'domain_bind' => [],
|
||||
// 禁止URL访问的应用列表(自动多应用模式有效)
|
||||
'deny_app_list' => [],
|
||||
|
||||
// 异常页面的模板文件
|
||||
'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
|
||||
|
Loading…
x
Reference in New Issue
Block a user