You've already forked jianlizaojia
自定义service、module
This commit is contained in:
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,3 +1,9 @@
|
||||
[submodule "plugs/think-plugs-staff"]
|
||||
path = plugs/think-plugs-staff
|
||||
url = ssh://git@git.jerryyan.net:29022/q792602257/think-plugs-staff.git
|
||||
[submodule "plugs/think-plugs-recorder"]
|
||||
path = plugs/think-plugs-recorder
|
||||
url = ssh://git@git.jerryyan.net:29022/q792602257/think-plugs-recorder.git
|
||||
[submodule "plugs/think-plugs-notice"]
|
||||
path = plugs/think-plugs-notice
|
||||
url = ssh://git@git.jerryyan.net:29022/q792602257/think-plugs-notice.git
|
||||
|
31
app/xzgl/Service.php
Normal file
31
app/xzgl/Service.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\xzgl;
|
||||
|
||||
use think\admin\Plugin;
|
||||
|
||||
class Service extends Plugin
|
||||
{
|
||||
protected $appName = '行政管理';
|
||||
protected $package = 'xzgl';
|
||||
|
||||
public static function menu(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'name' => '行政管理',
|
||||
'subs' => [
|
||||
['name' => '员工档案', 'icon' => 'layui-icon layui-icon-group', 'url' => 'xzgl/user/index'],
|
||||
['name' => '通知公告', 'icon' => 'layui-icon layui-icon-cols', 'url' => 'xzgl/notice/index'],
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '证书管理',
|
||||
'subs' => [
|
||||
['name' => '证书管理', 'icon' => 'layui-icon layui-icon-auz', 'url' => 'xzgl/staff_cert/index'],
|
||||
['name' => '证书管理', 'icon' => 'layui-icon layui-icon-auz', 'url' => 'xzgl/company_cert/index'],
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
@ -20,15 +20,25 @@
|
||||
"zoujingli/think-install": true
|
||||
}
|
||||
},
|
||||
"repositories": {
|
||||
"think-plug-staff": {
|
||||
"repositories": [
|
||||
{
|
||||
"type": "path",
|
||||
"url": "plugs/think-plugs-staff"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "plugs/think-plugs-recorder"
|
||||
},
|
||||
{
|
||||
"type": "path",
|
||||
"url": "plugs/custom-app-plug"
|
||||
}
|
||||
},
|
||||
],
|
||||
"require": {
|
||||
"php": ">=8.3",
|
||||
"zoujingli/think-plugs-admin": "^1.0",
|
||||
"q792602257/think-plugs-staff": "dev-master"
|
||||
"q792602257/custom-app-plug": "dev-master",
|
||||
"q792602257/think-plugs-staff": "dev-master",
|
||||
"q792602257/think-plugs-recorder": "dev-master"
|
||||
}
|
||||
}
|
26
plugs/custom-app-plug/composer.json
Normal file
26
plugs/custom-app-plug/composer.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "q792602257/custom-app-plug",
|
||||
"description": "ThinkAdmin Plugin: Add Custom Plugs Located in app",
|
||||
"version": "dev-master",
|
||||
"minimum-stability": "dev",
|
||||
"license": "WTFPL",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jerry Yan",
|
||||
"email": "792602257@qq.com"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"config": {
|
||||
"type": "module",
|
||||
"name": "app插件",
|
||||
"platforms": ["h5web"],
|
||||
"description": "app目录下的插件定义"
|
||||
},
|
||||
"think": {
|
||||
"services": [
|
||||
"app\\xzgl\\Service"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user