Compare commits
68 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9f25b76dd | ||
|
|
7603cdfa7e | ||
|
|
2e0cc85966 | ||
|
|
5814fed0da | ||
|
|
40f7ee82cd | ||
|
|
936cb56c7f | ||
|
|
2d1940522c | ||
|
|
264cf56ae4 | ||
|
|
57ea9a3f47 | ||
|
|
31c06cff69 | ||
|
|
4c8d21fccf | ||
|
|
817582bed5 | ||
|
|
3a0c0c1624 | ||
|
|
30c7615e53 | ||
|
|
9d58da3cc3 | ||
|
|
1f5ca39226 | ||
|
|
82f17301a7 | ||
|
|
4ef7879ae3 | ||
|
|
0c9b369e2e | ||
|
|
e981852422 | ||
|
|
1d258621c8 | ||
|
|
9534f2c2fe | ||
|
|
9fb8dd022a | ||
|
|
fc264630ec | ||
|
|
3d19c8d337 | ||
|
|
4baa4e185d | ||
|
|
88bc6441e5 | ||
|
|
0efb70b3b7 | ||
|
|
c22be8ac76 | ||
|
|
ebce7f3b0e | ||
|
|
f8b6d847d5 | ||
|
|
55a9b13e69 | ||
|
|
5d58248cf4 | ||
|
|
bbd0320a35 | ||
|
|
d62a67aafe | ||
|
|
c6cc9d4164 | ||
|
|
add8c5144c | ||
|
|
62f591045e | ||
|
|
7470790657 | ||
|
|
11fa69afaf | ||
|
|
8983705ce4 | ||
|
|
95ccd4071b | ||
|
|
09f3ea7e54 | ||
|
|
9cadb27c9e | ||
|
|
2772034a93 | ||
|
|
08ea79033c | ||
|
|
e7f09d9c68 | ||
|
|
e2effb762c | ||
|
|
0e18825808 | ||
|
|
c031b09422 | ||
|
|
231fd48e2f | ||
|
|
53772badd4 | ||
|
|
3e329a4ea3 | ||
|
|
f015a90b89 | ||
|
|
75c668b966 | ||
|
|
f3e5a041d1 | ||
|
|
34354837d5 | ||
|
|
3b219cfe7f | ||
|
|
ed99fe79fd | ||
|
|
846b8ffafc | ||
|
|
47ef5d9f10 | ||
|
|
70ec12f406 | ||
|
|
e15b56ecc9 | ||
|
|
af275e1c6a | ||
|
|
20d4038159 | ||
|
|
475a1ef84d | ||
|
|
9307e724a9 | ||
|
|
6616e96724 |
@@ -1,5 +1,8 @@
|
|||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
|
|
||||||
|
# 后台系统日志开关
|
||||||
|
APP_ADMIN_SYSTEM_LOG=true
|
||||||
|
|
||||||
DEFAULT_TIMEZONE=Asia/Shanghai
|
DEFAULT_TIMEZONE=Asia/Shanghai
|
||||||
|
|
||||||
DB_TYPE=mysql
|
DB_TYPE=mysql
|
||||||
|
|||||||
38
README.md
38
README.md
@@ -1,27 +1,31 @@
|
|||||||
<div align="center" dir="auto">
|
<div align="center" dir="auto">
|
||||||
<img alt="log" src="/public/static/common/images/logo-8.png" />
|
<img alt="log" src="/public/static/common/images/logo-8.png" />
|
||||||
|
|
||||||
<span><img src="https://img.shields.io/badge/php-%3E=8.0.0-brightgreen.svg?style=for-the-badge&logo=php&colorB=ff69b4" alt="php"></span>
|
<p>
|
||||||
<span><img src="https://img.shields.io/badge/mysql-%3E=5.7-brightgreen.svg?style=for-the-badge&logo=mysql&colorB=blue" alt="MySQL"></span>
|
<img src="https://img.shields.io/badge/php-%3E=8.1.0-brightgreen.svg?style=for-the-badge&logo=php&colorB=ff69b4" alt="php">
|
||||||
<span><img src="https://img.shields.io/badge/thinkphp-%3E=8.0.0-brightgreen.svg?style=for-the-badge&logo=thinkphp" alt="ThinkPHP"></span>
|
<img src="https://img.shields.io/badge/mysql-%3E=5.7-brightgreen.svg?style=for-the-badge&logo=mysql&colorB=blue" alt="MySQL">
|
||||||
<span><img src="https://img.shields.io/badge/layui-%3E=2.9.0-brightgreen.svg?style=for-the-badge&logo=layui&colorB=orange" alt="layui"></span>
|
<img src="https://img.shields.io/badge/thinkphp-%3E=8.0.0-brightgreen.svg?style=for-the-badge&logo=thinkphp" alt="ThinkPHP">
|
||||||
<span><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge&logo=license&colorB=purple" alt="License"></span>
|
<img src="https://img.shields.io/badge/layui-%3E=2.9.0-brightgreen.svg?style=for-the-badge&logo=layui&colorB=orange" alt="layui">
|
||||||
|
<img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge&logo=license&colorB=purple" alt="License">
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## `EasyAdmin8`所有版本 (当前项目为`ThinkPHP`版本)
|
## `EasyAdmin8`所有版本 (当前项目为`ThinkPHP`版本)
|
||||||
|
|
||||||
| | Github | Gitee |
|
| | Github | Gitee |
|
||||||
|----------|:--------------------------------------------------------------------:|:-----------------------------------------------------------------:|
|
|----------|:----------------------------------------------------------------------:|:---------------------------------------------------------------------:|
|
||||||
| ThinkPHP | [EasyAdmin8](https://github.com/wolf-leo/EasyAdmin8) | [EasyAdmin8](https://gitee.com/wolf18/EasyAdmin8) |
|
| ThinkPHP | [EasyAdmin8](https://github.com/EasyAdmin8/EasyAdmin8) | [EasyAdmin8](https://gitee.com/EasyAdmin8/EasyAdmin8) |
|
||||||
| Laravel | [EasyAdmin8-Laravel](https://github.com/wolf-leo/EasyAdmin8-Laravel) | [EasyAdmin8-Laravel](https://gitee.com/wolf18/EasyAdmin8-Laravel) |
|
| Laravel | [EasyAdmin8-Laravel](https://github.com/EasyAdmin8/EasyAdmin8-Laravel) | [EasyAdmin8-Laravel](https://gitee.com/EasyAdmin8/EasyAdmin8-Laravel) |
|
||||||
| webman | [EasyAdmin8-webman](https://github.com/wolf-leo/EasyAdmin8-webman) | [EasyAdmin8-webman](https://gitee.com/wolf18/EasyAdmin8-webman) |
|
| webman | [EasyAdmin8-webman](https://github.com/EasyAdmin8/EasyAdmin8-webman) | [EasyAdmin8-webman](https://gitee.com/EasyAdmin8/EasyAdmin8-webman) |
|
||||||
|
|
||||||
## 项目介绍
|
## 项目介绍
|
||||||
|
|
||||||
> `EasyAdmin8` 在 [`EasyAdmin`](https://gitee.com/zhongshaofa/easyadmin) 的基础上更新 ThinkPHP 框架到 8.0 ,PHP 最低版本要求不低于 8.0
|
> `EasyAdmin8` 在 [`EasyAdmin`](https://gitee.com/zhongshaofa/easyadmin) 的基础上更新 ThinkPHP 框架到 8.0+ ,PHP 最低版本要求不低于 8.1
|
||||||
|
>
|
||||||
|
> 2025年起 `PHP` 版本要求提升到 `8.1+`, 如果需要 `8.0` 到分支 `v8.0` 中下载
|
||||||
>
|
>
|
||||||
> ThinkPHP v8.0 和 Layui v2.9.x 的快速开发的后台管理系统。
|
> ThinkPHP v8.0+ 和 Layui v2.9.x 的快速开发的后台管理系统。
|
||||||
>
|
>
|
||||||
> 项目地址:[http://easyadmin8.top](http://easyadmin8.top)
|
> 项目地址:[http://easyadmin8.top](http://easyadmin8.top)
|
||||||
>
|
>
|
||||||
@@ -50,13 +54,13 @@ if [ -f /usr/bin/curl ];then curl -sSO https://easyadmin8.top/auto-install-EasyA
|
|||||||
```
|
```
|
||||||
1.下载安装包
|
1.下载安装包
|
||||||
|
|
||||||
git clone https://github.com/wolf-leo/EasyAdmin8
|
git clone https://github.com/EasyAdmin8/EasyAdmin8
|
||||||
|
|
||||||
或者
|
或者
|
||||||
|
|
||||||
git clone https://gitee.com/wolf18/EasyAdmin8
|
git clone https://gitee.com/EasyAdmin8/EasyAdmin8
|
||||||
|
|
||||||
2.安装依赖包(确保 PHP 版本 >= 8.0)
|
2.安装依赖包(确保 PHP 版本 >= 8.1)
|
||||||
|
|
||||||
在根目录下 composer install ,如果有报错信息可以使用命令 composer install --ignore-platform-reqs
|
在根目录下 composer install ,如果有报错信息可以使用命令 composer install --ignore-platform-reqs
|
||||||
|
|
||||||
@@ -75,7 +79,7 @@ if [ -f /usr/bin/curl ];then curl -sSO https://easyadmin8.top/auto-install-EasyA
|
|||||||
|
|
||||||
## CURD命令大全
|
## CURD命令大全
|
||||||
|
|
||||||
> 参考 [CURD命令大全](CURD.md)
|
> 参考 [CURD命令大全](https://edocs.easyadmin8.top/curd/command.html)
|
||||||
|
|
||||||
## 常见问题
|
## 常见问题
|
||||||
|
|
||||||
@@ -97,7 +101,7 @@ if [ -f /usr/bin/curl ];then curl -sSO https://easyadmin8.top/auto-install-EasyA
|
|||||||
|
|
||||||
## 相关文档
|
## 相关文档
|
||||||
|
|
||||||
* [ThinkPHP 8.0](https://doc.thinkphp.cn/v8_0)
|
* [ThinkPHP 8.1](https://doc.thinkphp.cn)
|
||||||
|
|
||||||
* [EasyAdmin](http://easyadmin.99php.cn/docs)
|
* [EasyAdmin](http://easyadmin.99php.cn/docs)
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,9 @@ class Index extends AdminController
|
|||||||
$mysqlVersion = Db::query("select version() as version")[0]['version'] ?? '未知';
|
$mysqlVersion = Db::query("select version() as version")[0]['version'] ?? '未知';
|
||||||
$phpVersion = phpversion();
|
$phpVersion = phpversion();
|
||||||
$versions = compact('tpVersion', 'mysqlVersion', 'phpVersion');
|
$versions = compact('tpVersion', 'mysqlVersion', 'phpVersion');
|
||||||
$quicks = SystemQuick::field('id,title,icon,href')
|
$quick_list = SystemQuick::field('id,title,icon,href')
|
||||||
->where(['status' => 1])
|
->where(['status' => 1])->order('sort', 'desc')->limit(50)->select()->toArray();
|
||||||
->order('sort', 'desc')
|
$quicks = array_chunk($quick_list, 8);
|
||||||
->limit(8)
|
|
||||||
->select();
|
|
||||||
$this->assign(compact('quicks', 'versions'));
|
$this->assign(compact('quicks', 'versions'));
|
||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
@@ -55,7 +53,7 @@ class Index extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function editAdmin(Request $request): string
|
public function editAdmin(Request $request): string
|
||||||
{
|
{
|
||||||
$id = $this->adminUid;
|
$id = $this->adminUid;
|
||||||
$row = (new SystemAdmin())
|
$row = (new SystemAdmin())
|
||||||
->withoutField('password')
|
->withoutField('password')
|
||||||
->find($id);
|
->find($id);
|
||||||
@@ -66,15 +64,20 @@ class Index extends AdminController
|
|||||||
$rule = [];
|
$rule = [];
|
||||||
$this->validate($post, $rule);
|
$this->validate($post, $rule);
|
||||||
try {
|
try {
|
||||||
$save = $row
|
$login_type = $post['login_type'] ?? 1;
|
||||||
->allowField(['head_img', 'phone', 'remark', 'update_time'])
|
if ($login_type == 2) {
|
||||||
->save($post);
|
$ga_secret = (new SystemAdmin())->where('id', $id)->value('ga_secret');
|
||||||
}catch (Exception $e) {
|
if (empty($ga_secret)) $this->error('请先绑定谷歌验证器');
|
||||||
|
}
|
||||||
|
$save = $row->allowField(['head_img', 'phone', 'remark', 'update_time', 'login_type'])->save($post);
|
||||||
|
}catch (\PDOException $e) {
|
||||||
$this->error('保存失败');
|
$this->error('保存失败');
|
||||||
}
|
}
|
||||||
$save ? $this->success('保存成功') : $this->error('保存失败');
|
$save ? $this->success('保存成功') : $this->error('保存失败');
|
||||||
}
|
}
|
||||||
$this->assign('row', $row);
|
$this->assign('row', $row);
|
||||||
|
$notes = (new SystemAdmin())->notes;
|
||||||
|
$this->assign('notes', $notes);
|
||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,13 +85,10 @@ class Index extends AdminController
|
|||||||
* 修改密码
|
* 修改密码
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @return string
|
* @return string
|
||||||
* @throws DataNotFoundException
|
|
||||||
* @throws DbException
|
|
||||||
* @throws ModelNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function editPassword(Request $request): string
|
public function editPassword(Request $request): string
|
||||||
{
|
{
|
||||||
$id = $this->adminUid;
|
$id = $this->adminUid;
|
||||||
$row = (new SystemAdmin())
|
$row = (new SystemAdmin())
|
||||||
->withoutField('password')
|
->withoutField('password')
|
||||||
->find($id);
|
->find($id);
|
||||||
@@ -124,4 +124,37 @@ class Index extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置谷歌验证码
|
||||||
|
* @param Request $request
|
||||||
|
* @return string
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public function set2fa(Request $request): string
|
||||||
|
{
|
||||||
|
$id = $this->adminUid;
|
||||||
|
$row = (new SystemAdmin())->withoutField('password')->find($id);
|
||||||
|
if (!$row) $this->error('用户信息不存在');
|
||||||
|
// You can see: https://gitee.com/wolf-code/authenticator
|
||||||
|
$ga = new \Wolfcode\Authenticator\google\PHPGangstaGoogleAuthenticator();
|
||||||
|
if (!$request->isAjax()) {
|
||||||
|
$old_secret = $row->ga_secret;
|
||||||
|
$secret = $ga->createSecret(32);
|
||||||
|
$ga_title = $this->isDemo ? 'EasyAdmin8演示环境' : '可自定义修改显示标题';
|
||||||
|
$dataUri = $ga->getQRCode($ga_title, $secret);
|
||||||
|
$this->assign(compact('row', 'dataUri', 'old_secret', 'secret'));
|
||||||
|
return $this->fetch();
|
||||||
|
}
|
||||||
|
$this->isDemo && $this->error('演示环境下不允许修改');
|
||||||
|
$post = $request->post();
|
||||||
|
$ga_secret = $post['ga_secret'] ?? '';
|
||||||
|
$ga_code = $post['ga_code'] ?? '';
|
||||||
|
if (empty($ga_code)) $this->error('请输入验证码');
|
||||||
|
if (!$ga->verifyCode($ga_secret, $ga_code)) $this->error('验证码错误');
|
||||||
|
$row->ga_secret = $ga_secret;
|
||||||
|
$row->login_type = 2;
|
||||||
|
$row->save();
|
||||||
|
$this->success('操作成功');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ class Login extends AdminController
|
|||||||
if ($admin->status == 0) {
|
if ($admin->status == 0) {
|
||||||
$this->error('账号已被禁用');
|
$this->error('账号已被禁用');
|
||||||
}
|
}
|
||||||
|
if ($admin->login_type == 2) {
|
||||||
|
if (empty($post['ga_code'])) $this->error('请输入谷歌验证码', ['is_ga_code' => true]);
|
||||||
|
$ga = new \Wolfcode\Authenticator\google\PHPGangstaGoogleAuthenticator();
|
||||||
|
if (!$ga->verifyCode($admin->ga_secret, $post['ga_code'])) $this->error('谷歌验证码错误');;
|
||||||
|
}
|
||||||
$admin->login_num += 1;
|
$admin->login_num += 1;
|
||||||
$admin->save();
|
$admin->save();
|
||||||
$admin = $admin->toArray();
|
$admin = $admin->toArray();
|
||||||
|
|||||||
@@ -8,11 +8,7 @@ use app\admin\service\annotation\ControllerAnnotation;
|
|||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '商品分类管理')]
|
||||||
* Class Admin
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
* @ControllerAnnotation(title="商品分类管理")
|
|
||||||
*/
|
|
||||||
class Cate extends AdminController
|
class Cate extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -4,22 +4,21 @@ namespace app\admin\controller\mall;
|
|||||||
|
|
||||||
use app\admin\model\MallCate;
|
use app\admin\model\MallCate;
|
||||||
use app\admin\model\MallGoods;
|
use app\admin\model\MallGoods;
|
||||||
|
use app\admin\service\annotation\MiddlewareAnnotation;
|
||||||
use app\common\controller\AdminController;
|
use app\common\controller\AdminController;
|
||||||
use app\admin\service\annotation\ControllerAnnotation;
|
use app\admin\service\annotation\ControllerAnnotation;
|
||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\db\exception\DbException;
|
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '商城商品管理')]
|
||||||
* Class Goods
|
|
||||||
* @package app\admin\controller\mall
|
|
||||||
* @ControllerAnnotation(title="商城商品管理")
|
|
||||||
*/
|
|
||||||
class Goods extends AdminController
|
class Goods extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#[NodeAnnotation(ignore: ['export'])] // 过滤不需要生成的权限节点 默认 CURD 中会自动生成部分节点 可以在此处过滤
|
||||||
|
protected array $ignoreNode;
|
||||||
|
|
||||||
public function __construct(App $app)
|
public function __construct(App $app)
|
||||||
{
|
{
|
||||||
parent::__construct($app);
|
parent::__construct($app);
|
||||||
@@ -27,10 +26,7 @@ class Goods extends AdminController
|
|||||||
$this->assign('cate', (new MallCate())->column('title', 'id'));
|
$this->assign('cate', (new MallCate())->column('title', 'id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
* @throws DbException
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
@@ -49,9 +45,7 @@ class Goods extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '入库', auth: true)]
|
||||||
* @NodeAnnotation(title="入库")
|
|
||||||
*/
|
|
||||||
public function stock(Request $request, $id): string
|
public function stock(Request $request, $id): string
|
||||||
{
|
{
|
||||||
$row = $this->model->find($id);
|
$row = $this->model->find($id);
|
||||||
@@ -73,4 +67,9 @@ class Goods extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)]
|
||||||
|
public function no_check_login(Request $request): string
|
||||||
|
{
|
||||||
|
return '这里演示方法不需要经过登录验证';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -10,14 +10,9 @@ use app\admin\service\annotation\ControllerAnnotation;
|
|||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\db\exception\DbException;
|
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '管理员管理')]
|
||||||
* Class Admin
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
* @ControllerAnnotation(title="管理员管理")
|
|
||||||
*/
|
|
||||||
class Admin extends AdminController
|
class Admin extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -33,10 +28,7 @@ class Admin extends AdminController
|
|||||||
$this->assign('auth_list', $this->model->getAuthList());
|
$this->assign('auth_list', $this->model->getAuthList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
* @throws DbException
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
@@ -64,9 +56,7 @@ class Admin extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '添加', auth: true)]
|
||||||
* @NodeAnnotation(title="添加")
|
|
||||||
*/
|
|
||||||
public function add(Request $request): string
|
public function add(Request $request): string
|
||||||
{
|
{
|
||||||
if ($request->isPost()) {
|
if ($request->isPost()) {
|
||||||
@@ -87,9 +77,7 @@ class Admin extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '编辑', auth: true)]
|
||||||
* @NodeAnnotation(title="编辑")
|
|
||||||
*/
|
|
||||||
public function edit(Request $request, $id = 0): string
|
public function edit(Request $request, $id = 0): string
|
||||||
{
|
{
|
||||||
$row = $this->model->find($id);
|
$row = $this->model->find($id);
|
||||||
@@ -116,9 +104,7 @@ class Admin extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '设置密码', auth: true)]
|
||||||
* @NodeAnnotation(title="编辑")
|
|
||||||
*/
|
|
||||||
public function password(Request $request, $id): string
|
public function password(Request $request, $id): string
|
||||||
{
|
{
|
||||||
$row = $this->model->find($id);
|
$row = $this->model->find($id);
|
||||||
@@ -147,12 +133,11 @@ class Admin extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '删除', auth: true)]
|
||||||
* @NodeAnnotation(title="删除")
|
public function delete(Request $request): void
|
||||||
*/
|
|
||||||
public function delete($id): void
|
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
$id = $request->param('id');
|
||||||
$row = $this->model->whereIn('id', $id)->select();
|
$row = $this->model->whereIn('id', $id)->select();
|
||||||
$row->isEmpty() && $this->error('数据不存在');
|
$row->isEmpty() && $this->error('数据不存在');
|
||||||
$id == AdminConstant::SUPER_ADMIN_ID && $this->error('超级管理员不允许修改');
|
$id == AdminConstant::SUPER_ADMIN_ID && $this->error('超级管理员不允许修改');
|
||||||
@@ -169,9 +154,7 @@ class Admin extends AdminController
|
|||||||
$save ? $this->success('删除成功') : $this->error('删除失败');
|
$save ? $this->success('删除成功') : $this->error('删除失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '属性修改', auth: true)]
|
||||||
* @NodeAnnotation(title="属性修改")
|
|
||||||
*/
|
|
||||||
public function modify(Request $request): void
|
public function modify(Request $request): void
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
|||||||
@@ -11,11 +11,7 @@ use app\admin\service\annotation\NodeAnnotation;
|
|||||||
use app\Request;
|
use app\Request;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '角色权限管理', auth: true)]
|
||||||
* @ControllerAnnotation(title="角色权限管理")
|
|
||||||
* Class Auth
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
*/
|
|
||||||
class Auth extends AdminController
|
class Auth extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -30,9 +26,7 @@ class Auth extends AdminController
|
|||||||
$this->model = new SystemAuth();
|
$this->model = new SystemAuth();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '授权', auth: true)]
|
||||||
* @NodeAnnotation(title="授权")
|
|
||||||
*/
|
|
||||||
public function authorize(Request $request, $id): string
|
public function authorize(Request $request, $id): string
|
||||||
{
|
{
|
||||||
$row = $this->model->find($id);
|
$row = $this->model->find($id);
|
||||||
@@ -45,9 +39,7 @@ class Auth extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '授权保存', auth: true)]
|
||||||
* @NodeAnnotation(title="授权保存")
|
|
||||||
*/
|
|
||||||
public function saveAuthorize(Request $request): void
|
public function saveAuthorize(Request $request): void
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
|||||||
@@ -9,14 +9,9 @@ use app\admin\service\annotation\ControllerAnnotation;
|
|||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\facade\Cache;
|
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '系统配置管理')]
|
||||||
* Class Config
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
* @ControllerAnnotation(title="系统配置管理")
|
|
||||||
*/
|
|
||||||
class Config extends AdminController
|
class Config extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -28,17 +23,13 @@ class Config extends AdminController
|
|||||||
$this->assign('editor_types', config('admin.editor_types'));
|
$this->assign('editor_types', config('admin.editor_types'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '保存', auth: true)]
|
||||||
* @NodeAnnotation(title="保存")
|
|
||||||
*/
|
|
||||||
public function save(Request $request): void
|
public function save(Request $request): void
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace app\admin\controller\system;
|
namespace app\admin\controller\system;
|
||||||
|
|
||||||
use app\admin\service\curd\BuildCurd;
|
use app\admin\service\curd\BuildCurd;
|
||||||
use app\admin\service\curd\exceptions\TableException;
|
|
||||||
use app\common\controller\AdminController;
|
use app\common\controller\AdminController;
|
||||||
use app\admin\service\annotation\ControllerAnnotation;
|
use app\admin\service\annotation\ControllerAnnotation;
|
||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
@@ -15,24 +14,16 @@ use think\facade\Db;
|
|||||||
use think\helper\Str;
|
use think\helper\Str;
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: 'CURD可视化管理')]
|
||||||
* @ControllerAnnotation(title="CURD可视化管理")
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
*/
|
|
||||||
class CurdGenerate extends AdminController
|
class CurdGenerate extends AdminController
|
||||||
{
|
{
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '操作', auth: true)]
|
||||||
* @NodeAnnotation(title="操作")
|
|
||||||
* @throws TableException
|
|
||||||
*/
|
|
||||||
public function save(Request $request, string $type = ''): ?Json
|
public function save(Request $request, string $type = ''): ?Json
|
||||||
{
|
{
|
||||||
if (!$request->isAjax()) $this->error();
|
if (!$request->isAjax()) $this->error();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace app\admin\controller\system;
|
namespace app\admin\controller\system;
|
||||||
|
|
||||||
use app\admin\model\SystemLog;
|
use app\admin\model\SystemLog;
|
||||||
|
use app\admin\service\annotation\MiddlewareAnnotation;
|
||||||
use app\admin\service\tool\CommonTool;
|
use app\admin\service\tool\CommonTool;
|
||||||
use app\common\controller\AdminController;
|
use app\common\controller\AdminController;
|
||||||
use app\admin\service\annotation\ControllerAnnotation;
|
use app\admin\service\annotation\ControllerAnnotation;
|
||||||
@@ -15,24 +16,16 @@ use think\db\exception\PDOException;
|
|||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '操作日志管理')]
|
||||||
* @ControllerAnnotation(title="操作日志管理")
|
|
||||||
* Class Auth
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
*/
|
|
||||||
class Log extends AdminController
|
class Log extends AdminController
|
||||||
{
|
{
|
||||||
protected array $ignoreLog = ['record'];
|
|
||||||
|
|
||||||
public function __construct(App $app)
|
public function __construct(App $app)
|
||||||
{
|
{
|
||||||
parent::__construct($app);
|
parent::__construct($app);
|
||||||
$this->model = new SystemLog();
|
$this->model = new SystemLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
@@ -60,9 +53,7 @@ class Log extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '导出', auth: true)]
|
||||||
* @NodeAnnotation(title="导出")
|
|
||||||
*/
|
|
||||||
public function export(): bool
|
public function export(): bool
|
||||||
{
|
{
|
||||||
if (env('EASYADMIN.IS_DEMO', false)) {
|
if (env('EASYADMIN.IS_DEMO', false)) {
|
||||||
@@ -96,9 +87,8 @@ class Log extends AdminController
|
|||||||
return Excel::exportData($list, $header, $fileName, 'xlsx');
|
return Excel::exportData($list, $header, $fileName, 'xlsx');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOG)]
|
||||||
* @NodeAnnotation(title="框架日志")
|
#[NodeAnnotation(title: '框架日志', auth: true, ignore: NodeAnnotation::IGNORE_NODE)]
|
||||||
*/
|
|
||||||
public function record(): Json|string
|
public function record(): Json|string
|
||||||
{
|
{
|
||||||
return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewer())->fetch();
|
return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewer())->fetch();
|
||||||
|
|||||||
@@ -11,14 +11,9 @@ use app\admin\service\annotation\NodeAnnotation;
|
|||||||
use app\common\controller\AdminController;
|
use app\common\controller\AdminController;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\db\exception\DbException;
|
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '菜单管理')]
|
||||||
* Class Menu
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
* @ControllerAnnotation(title="菜单管理",auth=true)
|
|
||||||
*/
|
|
||||||
class Menu extends AdminController
|
class Menu extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -33,10 +28,7 @@ class Menu extends AdminController
|
|||||||
$this->model = new SystemMenu();
|
$this->model = new SystemMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
* @throws DbException
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
@@ -56,9 +48,7 @@ class Menu extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '添加', auth: true)]
|
||||||
* @NodeAnnotation(title="添加")
|
|
||||||
*/
|
|
||||||
public function add(Request $request): string
|
public function add(Request $request): string
|
||||||
{
|
{
|
||||||
$id = $request->param('id');
|
$id = $request->param('id');
|
||||||
@@ -92,9 +82,7 @@ class Menu extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '编辑', auth: true)]
|
||||||
* @NodeAnnotation(title="编辑")
|
|
||||||
*/
|
|
||||||
public function edit(Request $request, $id = 0): string
|
public function edit(Request $request, $id = 0): string
|
||||||
{
|
{
|
||||||
$row = $this->model->find($id);
|
$row = $this->model->find($id);
|
||||||
@@ -129,12 +117,11 @@ class Menu extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '删除', auth: true)]
|
||||||
* @NodeAnnotation(title="删除")
|
public function delete(Request $request): void
|
||||||
*/
|
|
||||||
public function delete($id): void
|
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
$id = $request->param('id');
|
||||||
$row = $this->model->whereIn('id', $id)->select();
|
$row = $this->model->whereIn('id', $id)->select();
|
||||||
empty($row) && $this->error('数据不存在');
|
empty($row) && $this->error('数据不存在');
|
||||||
try {
|
try {
|
||||||
@@ -150,9 +137,7 @@ class Menu extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '属性修改', auth: true)]
|
||||||
* @NodeAnnotation(title="属性修改")
|
|
||||||
*/
|
|
||||||
public function modify(Request $request): void
|
public function modify(Request $request): void
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
@@ -189,9 +174,7 @@ class Menu extends AdminController
|
|||||||
$this->success('保存成功');
|
$this->success('保存成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '添加菜单提示', auth: true)]
|
||||||
* @NodeAnnotation(title="添加菜单提示")
|
|
||||||
*/
|
|
||||||
public function getMenuTips(): Json
|
public function getMenuTips(): Json
|
||||||
{
|
{
|
||||||
$node = input('get.keywords');
|
$node = input('get.keywords');
|
||||||
|
|||||||
@@ -10,14 +10,9 @@ use app\admin\service\annotation\NodeAnnotation;
|
|||||||
use app\admin\service\NodeService;
|
use app\admin\service\NodeService;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\db\exception\DbException;
|
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '系统节点管理')]
|
||||||
* @ControllerAnnotation(title="系统节点管理")
|
|
||||||
* Class Node
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
*/
|
|
||||||
class Node extends AdminController
|
class Node extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -27,10 +22,7 @@ class Node extends AdminController
|
|||||||
$this->model = new SystemNode();
|
$this->model = new SystemNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
* @throws DbException
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
@@ -52,9 +44,7 @@ class Node extends AdminController
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '系统节点更新', auth: true)]
|
||||||
* @NodeAnnotation(title="系统节点更新")
|
|
||||||
*/
|
|
||||||
public function refreshNode($force = 0): void
|
public function refreshNode($force = 0): void
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -94,9 +84,7 @@ class Node extends AdminController
|
|||||||
$this->success('节点更新成功');
|
$this->success('节点更新成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '清除失效节点', auth: true)]
|
||||||
* @NodeAnnotation(title="清除失效节点")
|
|
||||||
*/
|
|
||||||
public function clearNode(): void
|
public function clearNode(): void
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ use app\admin\service\annotation\ControllerAnnotation;
|
|||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '快捷入口管理')]
|
||||||
* @ControllerAnnotation(title="快捷入口管理")
|
|
||||||
* Class Quick
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
*/
|
|
||||||
class Quick extends AdminController
|
class Quick extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ use app\admin\service\annotation\ControllerAnnotation;
|
|||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '上传文件管理')]
|
||||||
* @ControllerAnnotation(title="上传文件管理")
|
|
||||||
* @package app\admin\controller\system
|
|
||||||
*/
|
|
||||||
class Uploadfile extends AdminController
|
class Uploadfile extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use app\Request;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use ReflectionClass;
|
use ReflectionClass;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
|
use app\admin\service\annotation\MiddlewareAnnotation;
|
||||||
|
|
||||||
class CheckLogin
|
class CheckLogin
|
||||||
{
|
{
|
||||||
@@ -31,6 +32,13 @@ class CheckLogin
|
|||||||
if (in_array($action, $noNeedCheck)) {
|
if (in_array($action, $noNeedCheck)) {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
$reflectionMethod = new \ReflectionMethod($controllerClass, $action);
|
||||||
|
$attributes = $reflectionMethod->getAttributes(MiddlewareAnnotation::class);
|
||||||
|
foreach ($attributes as $attribute) {
|
||||||
|
$annotation = $attribute->newInstance();
|
||||||
|
$_ignore = (array)$annotation->ignore;
|
||||||
|
if (in_array('LOGIN', (array)$_ignore)) return $next($request);
|
||||||
|
}
|
||||||
if (empty($adminUserInfo)) {
|
if (empty($adminUserInfo)) {
|
||||||
return redirect(__url('login/index'));
|
return redirect(__url('login/index'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,12 @@
|
|||||||
namespace app\admin\middleware;
|
namespace app\admin\middleware;
|
||||||
|
|
||||||
use app\admin\service\annotation\ControllerAnnotation;
|
use app\admin\service\annotation\ControllerAnnotation;
|
||||||
|
use app\admin\service\annotation\MiddlewareAnnotation;
|
||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use app\admin\service\SystemLogService;
|
use app\admin\service\SystemLogService;
|
||||||
use app\common\traits\JumpTrait;
|
use app\common\traits\JumpTrait;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use ReflectionClass;
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Doctrine\Common\Annotations\AnnotationReader;
|
|
||||||
use Doctrine\Common\Annotations\DocParser;
|
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
|
|
||||||
class SystemLog
|
class SystemLog
|
||||||
@@ -34,7 +32,8 @@ class SystemLog
|
|||||||
public function handle(Request $request, Closure $next)
|
public function handle(Request $request, Closure $next)
|
||||||
{
|
{
|
||||||
$response = $next($request);
|
$response = $next($request);
|
||||||
$params = $request->param();
|
if (!env('APP_ADMIN_SYSTEM_LOG', true)) return $response;
|
||||||
|
$params = $request->param();
|
||||||
if (isset($params['s'])) unset($params['s']);
|
if (isset($params['s'])) unset($params['s']);
|
||||||
foreach ($params as $key => $val) {
|
foreach ($params as $key => $val) {
|
||||||
in_array($key, $this->sensitiveParams) && $params[$key] = "***********";
|
in_array($key, $this->sensitiveParams) && $params[$key] = "***********";
|
||||||
@@ -48,15 +47,6 @@ class SystemLog
|
|||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
if (in_array($method, ['post', 'put', 'delete'])) {
|
if (in_array($method, ['post', 'put', 'delete'])) {
|
||||||
|
|
||||||
$controller = $request->controller();
|
|
||||||
if (str_contains($controller, '.')) $controller = str_replace('.', '\\', $controller);
|
|
||||||
$action = $request->action();
|
|
||||||
$controllerClass = 'app\\admin\\controller\\' . $controller;
|
|
||||||
$classObj = new ReflectionClass($controllerClass);
|
|
||||||
$properties = $classObj->getDefaultProperties();
|
|
||||||
$ignoreLog = $properties['ignoreLog'] ?? [];
|
|
||||||
if (in_array($action, $ignoreLog)) return $response;
|
|
||||||
|
|
||||||
$title = '';
|
$title = '';
|
||||||
try {
|
try {
|
||||||
$pathInfo = $request->pathinfo();
|
$pathInfo = $request->pathinfo();
|
||||||
@@ -65,16 +55,27 @@ class SystemLog
|
|||||||
$pathInfoExp = explode('.', $pathInfoExp[0] ?? '');
|
$pathInfoExp = explode('.', $pathInfoExp[0] ?? '');
|
||||||
$_name = $pathInfoExp[0] ?? '';
|
$_name = $pathInfoExp[0] ?? '';
|
||||||
$_controller = ucfirst($pathInfoExp[1] ?? '');
|
$_controller = ucfirst($pathInfoExp[1] ?? '');
|
||||||
if ($_name && $_controller && $_action) {
|
$className = $_controller ? "app\admin\controller\\{$_name}\\{$_controller}" : "app\admin\controller\\{$_name}";
|
||||||
$className = "app\admin\controller\\{$_name}\\{$_controller}";
|
if ($_name && $_action) {
|
||||||
$reflectionClass = new \ReflectionClass($className);
|
$reflectionMethod = new \ReflectionMethod($className, $_action);
|
||||||
$parser = new DocParser();
|
$attributes = $reflectionMethod->getAttributes(MiddlewareAnnotation::class);
|
||||||
$parser->setIgnoreNotImportedAnnotations(true);
|
foreach ($attributes as $attribute) {
|
||||||
$reader = new AnnotationReader($parser);
|
$annotation = $attribute->newInstance();
|
||||||
$controllerAnnotation = $reader->getClassAnnotation($reflectionClass, ControllerAnnotation::class);
|
$_ignore = (array)$annotation->ignore;
|
||||||
$reflectionAction = $reflectionClass->getMethod($_action);
|
if (in_array('log', array_map('strtolower', $_ignore))) return $response;
|
||||||
$nodeAnnotation = $reader->getMethodAnnotation($reflectionAction, NodeAnnotation::class);
|
}
|
||||||
$title = $controllerAnnotation->title . ' - ' . $nodeAnnotation->title;
|
$controllerTitle = $nodeTitle = '';
|
||||||
|
$controllerAttributes = (new \ReflectionClass($className))->getAttributes(ControllerAnnotation::class);
|
||||||
|
$actionAttributes = $reflectionMethod->getAttributes(NodeAnnotation::class);
|
||||||
|
foreach ($controllerAttributes as $controllerAttribute) {
|
||||||
|
$controllerAnnotation = $controllerAttribute->newInstance();
|
||||||
|
$controllerTitle = $controllerAnnotation->title ?? '';
|
||||||
|
}
|
||||||
|
foreach ($actionAttributes as $actionAttribute) {
|
||||||
|
$actionAnnotation = $actionAttribute->newInstance();
|
||||||
|
$nodeTitle = $actionAnnotation->title ?? '';
|
||||||
|
}
|
||||||
|
$title = $controllerTitle . ' - ' . $nodeTitle;
|
||||||
}
|
}
|
||||||
}catch (\Throwable $exception) {
|
}catch (\Throwable $exception) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,13 @@ class SystemAdmin extends TimeModel
|
|||||||
|
|
||||||
protected $deleteTime = 'delete_time';
|
protected $deleteTime = 'delete_time';
|
||||||
|
|
||||||
|
public array $notes = [
|
||||||
|
'login_type' => [
|
||||||
|
1 => '密码登录',
|
||||||
|
2 => '密码 + 谷歌验证码登录'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
public function getAuthList()
|
public function getAuthList()
|
||||||
{
|
{
|
||||||
$list = (new SystemAuth())
|
$list = (new SystemAuth())
|
||||||
|
|||||||
@@ -44,14 +44,13 @@ class SystemLogService
|
|||||||
$this->tablePrefix = Config::get('database.connections.mysql.prefix');
|
$this->tablePrefix = Config::get('database.connections.mysql.prefix');
|
||||||
$this->tableSuffix = date('Ym', time());
|
$this->tableSuffix = date('Ym', time());
|
||||||
$this->tableName = "{$this->tablePrefix}system_log_{$this->tableSuffix}";
|
$this->tableName = "{$this->tablePrefix}system_log_{$this->tableSuffix}";
|
||||||
return $this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取实例对象
|
* 获取实例对象
|
||||||
* @return SystemLogService|object
|
* @return SystemLogService
|
||||||
*/
|
*/
|
||||||
public static function instance()
|
public static function instance(): SystemLogService
|
||||||
{
|
{
|
||||||
if (is_null(self::$instance)) {
|
if (is_null(self::$instance)) {
|
||||||
self::$instance = new static();
|
self::$instance = new static();
|
||||||
@@ -85,15 +84,16 @@ class SystemLogService
|
|||||||
*/
|
*/
|
||||||
public function detectTable(): bool
|
public function detectTable(): bool
|
||||||
{
|
{
|
||||||
|
$_key = "system_log_{$this->tableName}_table";
|
||||||
// 手动删除日志表时候 记得清除缓存
|
// 手动删除日志表时候 记得清除缓存
|
||||||
$isset = Cache::get("systemLog{$this->tableName}Table");
|
$isset = Cache::get($_key);
|
||||||
if ($isset) return true;
|
if ($isset) return true;
|
||||||
$check = Db::query("show tables like '{$this->tableName}'");
|
$check = Db::query("show tables like '{$this->tableName}'");
|
||||||
if (empty($check)) {
|
if (empty($check)) {
|
||||||
$sql = $this->getCreateSql();
|
$sql = $this->getCreateSql();
|
||||||
Db::execute($sql);
|
Db::execute($sql);
|
||||||
}
|
}
|
||||||
Cache::set("system_log_{$this->tableName}_table", !empty($check));
|
Cache::set($_key, !empty($check));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace app\admin\service;
|
|||||||
|
|
||||||
use app\admin\model\SystemUploadfile;
|
use app\admin\model\SystemUploadfile;
|
||||||
use OSS\Core\OssException;
|
use OSS\Core\OssException;
|
||||||
|
use OSS\Credentials\EnvironmentVariableCredentialsProvider;
|
||||||
use OSS\OssClient;
|
use OSS\OssClient;
|
||||||
use think\facade\Env;
|
use think\facade\Env;
|
||||||
use think\file\UploadedFile;
|
use think\file\UploadedFile;
|
||||||
@@ -112,10 +113,21 @@ class UploadService
|
|||||||
$accessKeySecret = $config['oss_access_key_secret'];
|
$accessKeySecret = $config['oss_access_key_secret'];
|
||||||
$endpoint = $config['oss_endpoint'];
|
$endpoint = $config['oss_endpoint'];
|
||||||
$bucket = $config['oss_bucket'];
|
$bucket = $config['oss_bucket'];
|
||||||
|
// 升级 aliyuncs/oss-sdk-php 到 v2.7.2 以上, 使用签名 v4 版本
|
||||||
|
putenv('OSS_ACCESS_KEY_ID=' . $accessKeyId);
|
||||||
|
putenv('OSS_ACCESS_KEY_SECRET=' . $accessKeySecret);
|
||||||
|
$region = str_replace(['http://oss-', 'https://oss-', 'oss-'], '', explode('.aliyuncs.com', $endpoint)[0] ?? '');
|
||||||
|
$provider = new EnvironmentVariableCredentialsProvider();
|
||||||
|
$args = [
|
||||||
|
"provider" => $provider,
|
||||||
|
"endpoint" => $endpoint,
|
||||||
|
"signatureVersion" => OssClient::OSS_SIGNATURE_VERSION_V4,
|
||||||
|
"region" => $region
|
||||||
|
];
|
||||||
if ($file->isValid()) {
|
if ($file->isValid()) {
|
||||||
$object = $this->setFilePath($file, Env::get('EASYADMIN.OSS_STATIC_PREFIX', 'easyadmin8') . '/');
|
$object = $this->setFilePath($file, Env::get('EASYADMIN.OSS_STATIC_PREFIX', 'easyadmin8') . '/');
|
||||||
try {
|
try {
|
||||||
$ossClient = new OssClient($accessKeyId, $accessKeySecret, $endpoint);
|
$ossClient = new OssClient($args);
|
||||||
$_rs = $ossClient->putObject($bucket, $object, file_get_contents($file->getRealPath()));
|
$_rs = $ossClient->putObject($bucket, $object, file_get_contents($file->getRealPath()));
|
||||||
$oss_request_url = $_rs['oss-request-url'] ?? '';
|
$oss_request_url = $_rs['oss-request-url'] ?? '';
|
||||||
if (empty($oss_request_url)) return ['code' => 0, 'data' => '上传至OSS失败'];
|
if (empty($oss_request_url)) return ['code' => 0, 'data' => '上传至OSS失败'];
|
||||||
@@ -164,7 +176,7 @@ class UploadService
|
|||||||
if (empty($location)) return ['code' => 0, 'data' => '上传至COS失败'];
|
if (empty($location)) return ['code' => 0, 'data' => '上传至COS失败'];
|
||||||
$location = 'https://' . $location;
|
$location = 'https://' . $location;
|
||||||
$this->setSaveData($file);
|
$this->setSaveData($file);
|
||||||
} catch (Exception $e) {
|
}catch (Exception $e) {
|
||||||
return ['code' => 0, 'data' => $e->getMessage()];
|
return ['code' => 0, 'data' => $e->getMessage()];
|
||||||
}
|
}
|
||||||
$data = ['url' => $location];
|
$data = ['url' => $location];
|
||||||
|
|||||||
@@ -2,38 +2,20 @@
|
|||||||
|
|
||||||
namespace app\admin\service\annotation;
|
namespace app\admin\service\annotation;
|
||||||
|
|
||||||
use Doctrine\Common\Annotations\Annotation\Attributes;
|
use Attribute;
|
||||||
use Doctrine\Common\Annotations\Annotation\Required;
|
|
||||||
use Doctrine\Common\Annotations\Annotation\Target;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ControllerAnnotation
|
* controller 节点注解类
|
||||||
*
|
|
||||||
* @Annotation
|
|
||||||
* @Target("CLASS")
|
|
||||||
* @Attributes({
|
|
||||||
* @Attribute("title", type="string"),
|
|
||||||
* })
|
|
||||||
*
|
|
||||||
* @since 2.0
|
|
||||||
*/
|
*/
|
||||||
|
#[Attribute]
|
||||||
final class ControllerAnnotation
|
final class ControllerAnnotation
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Route group prefix for the controller
|
* @param string $title
|
||||||
*
|
* @param bool $auth 是否需要权限
|
||||||
* @Required()
|
* @param string|array $ignore
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
*/
|
||||||
public $title = '';
|
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
|
||||||
|
{
|
||||||
/**
|
}
|
||||||
* 是否开启权限控制
|
|
||||||
* @Enum({true,false})
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
public $auth = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
19
app/admin/service/annotation/MiddlewareAnnotation.php
Normal file
19
app/admin/service/annotation/MiddlewareAnnotation.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\service\annotation;
|
||||||
|
|
||||||
|
use Attribute;
|
||||||
|
|
||||||
|
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD)]
|
||||||
|
final class MiddlewareAnnotation
|
||||||
|
{
|
||||||
|
/** 过滤日志 */
|
||||||
|
const IGNORE_LOG = 'LOG';
|
||||||
|
|
||||||
|
/** 免登录 */
|
||||||
|
const IGNORE_LOGIN = 'LOGIN';
|
||||||
|
|
||||||
|
public function __construct(public string $type = '', public string|array $ignore = '')
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,32 +2,24 @@
|
|||||||
|
|
||||||
namespace app\admin\service\annotation;
|
namespace app\admin\service\annotation;
|
||||||
|
|
||||||
use Doctrine\Common\Annotations\Annotation\Attributes;
|
use Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建节点注解类
|
* action 节点注解类
|
||||||
*
|
|
||||||
* @Annotation
|
|
||||||
* @Target({"METHOD","CLASS"})
|
|
||||||
* @Attributes({
|
|
||||||
* @Attribute("time", type = "int")
|
|
||||||
* })
|
|
||||||
*/
|
*/
|
||||||
|
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD| Attribute::TARGET_PROPERTY)]
|
||||||
final class NodeAnnotation
|
final class NodeAnnotation
|
||||||
{
|
{
|
||||||
|
/** 过滤节点 */
|
||||||
|
const IGNORE_NODE = 'NODE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 节点名称
|
* @param string $title
|
||||||
* @Required()
|
* @param bool $auth 是否需要权限
|
||||||
* @var string
|
* @param string|array $ignore
|
||||||
*/
|
*/
|
||||||
public string $title;
|
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
|
||||||
|
{
|
||||||
/**
|
}
|
||||||
* 是否开启权限控制
|
|
||||||
* @Enum({true,false})
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
public bool $auth = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -67,15 +67,23 @@ class Node
|
|||||||
|
|
||||||
// 遍历读取所有方法的注释的参数信息
|
// 遍历读取所有方法的注释的参数信息
|
||||||
foreach ($methods as $method) {
|
foreach ($methods as $method) {
|
||||||
// 读取NodeAnnotation的注解
|
|
||||||
$nodeAnnotation = $reader->getMethodAnnotation($method, NodeAnnotation::class);
|
// 忽略掉不需要的节点
|
||||||
if (!empty($nodeAnnotation)) {
|
$property = $reflectionClass->getProperty('ignoreNode');
|
||||||
$actionTitle = !empty($nodeAnnotation->title) ? $nodeAnnotation->title : null;
|
$propertyAttributes = $property->getAttributes(NodeAnnotation::class);
|
||||||
$actionAuth = !empty($nodeAnnotation->auth) ? $nodeAnnotation->auth : false;
|
if (!empty($propertyAttributes[0])) {
|
||||||
|
$propertyAttribute = $propertyAttributes[0]->newInstance();
|
||||||
|
if (in_array($method->name, $propertyAttribute->ignore)) continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = $reflectionClass->getMethod($method->name)->getAttributes(NodeAnnotation::class);
|
||||||
|
foreach ($attributes as $attribute) {
|
||||||
|
$annotation = $attribute->newInstance();
|
||||||
|
if (!empty($annotation->ignore)) if (strtolower($annotation->ignore) == 'node') continue;
|
||||||
$actionList[] = [
|
$actionList[] = [
|
||||||
'node' => $controllerFormat . '/' . $method->name,
|
'node' => $controllerFormat . '/' . $method->name,
|
||||||
'title' => $actionTitle,
|
'title' => $annotation->title ?? null,
|
||||||
'is_auth' => $actionAuth,
|
'is_auth' => $annotation->auth ?? false,
|
||||||
'type' => 2,
|
'type' => 2,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -83,16 +91,17 @@ class Node
|
|||||||
// 方法非空才读取控制器注解
|
// 方法非空才读取控制器注解
|
||||||
if (!empty($actionList)) {
|
if (!empty($actionList)) {
|
||||||
// 读取Controller的注解
|
// 读取Controller的注解
|
||||||
$controllerAnnotation = $reader->getClassAnnotation($reflectionClass, ControllerAnnotation::class);
|
$attributes = $reflectionClass->getAttributes(ControllerAnnotation::class);
|
||||||
$controllerTitle = !empty($controllerAnnotation->title) ? $controllerAnnotation->title : null;
|
foreach ($attributes as $attribute) {
|
||||||
$controllerAuth = !empty($controllerAnnotation->auth) ? $controllerAnnotation->auth : false;
|
$controllerAnnotation = $attribute->newInstance();
|
||||||
$nodeList[] = [
|
$nodeList[] = [
|
||||||
'node' => $controllerFormat,
|
'node' => $controllerFormat,
|
||||||
'title' => $controllerTitle,
|
'title' => $controllerAnnotation->title ?? null,
|
||||||
'is_auth' => $controllerAuth,
|
'is_auth' => $controllerAnnotation->auth ?? false,
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
];
|
];
|
||||||
$nodeList = array_merge($nodeList, $actionList);
|
}
|
||||||
|
$nodeList = array_merge($nodeList, $actionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ class BuildCurd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->tableComment = $this->table;
|
$this->tableComment = $this->table;
|
||||||
}catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new TableException($e->getMessage());
|
throw new TableException($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,11 +308,11 @@ class BuildCurd
|
|||||||
$nodeArray = explode('_', $this->table);
|
$nodeArray = explode('_', $this->table);
|
||||||
if (count($nodeArray) == 1) {
|
if (count($nodeArray) == 1) {
|
||||||
$this->controllerFilename = ucfirst($nodeArray[0]);
|
$this->controllerFilename = ucfirst($nodeArray[0]);
|
||||||
}else {
|
} else {
|
||||||
foreach ($nodeArray as $k => $v) {
|
foreach ($nodeArray as $k => $v) {
|
||||||
if ($k == 0) {
|
if ($k == 0) {
|
||||||
$this->controllerFilename = "{$v}{$this->DS}";
|
$this->controllerFilename = "{$v}{$this->DS}";
|
||||||
}else {
|
} else {
|
||||||
$this->controllerFilename .= ucfirst($v);
|
$this->controllerFilename .= ucfirst($v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -392,11 +392,11 @@ class BuildCurd
|
|||||||
if (!empty($bindSelectField)) {
|
if (!empty($bindSelectField)) {
|
||||||
$relationArray = explode('\\', $modelFilename);
|
$relationArray = explode('\\', $modelFilename);
|
||||||
$this->tableColumns[$foreignKey]['bindSelectField'] = $bindSelectField;
|
$this->tableColumns[$foreignKey]['bindSelectField'] = $bindSelectField;
|
||||||
$this->tableColumns[$foreignKey]['bindRelation'] = end($relationArray);
|
$this->tableColumns[$foreignKey]['bindRelation'] = lcfirst(end($relationArray)) . ucfirst($bindSelectField);
|
||||||
}
|
}
|
||||||
$this->relationArray[$relationTable] = $relation;
|
$this->relationArray[$relationTable] = $relation;
|
||||||
$this->selectFields[] = $foreignKey;
|
$this->selectFields[] = $foreignKey;
|
||||||
}catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new TableException($e->getMessage());
|
throw new TableException($e->getMessage());
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
@@ -652,7 +652,6 @@ class BuildCurd
|
|||||||
if (in_array($key, ['describe', 'content', 'details'])) {
|
if (in_array($key, ['describe', 'content', 'details'])) {
|
||||||
$this->editorFields[] = $key;
|
$this->editorFields[] = $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -706,7 +705,7 @@ class BuildCurd
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
!empty($formatDefine) && $colum['define'] = $formatDefine;
|
!empty($formatDefine) && $colum['define'] = $formatDefine;
|
||||||
}else {
|
} else {
|
||||||
$colum['define'] = $define;
|
$colum['define'] = $define;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -730,7 +729,8 @@ class BuildCurd
|
|||||||
$this->getTemplate("controller{$this->DS}select"),
|
$this->getTemplate("controller{$this->DS}select"),
|
||||||
[
|
[
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
return $selectCode;
|
return $selectCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -754,7 +754,8 @@ class BuildCurd
|
|||||||
[
|
[
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
return $selectCode;
|
return $selectCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,7 +776,8 @@ class BuildCurd
|
|||||||
'name' => "notes['$field']",
|
'name' => "notes['$field']",
|
||||||
'relation' => $relation,
|
'relation' => $relation,
|
||||||
'values' => $field,
|
'values' => $field,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
return $selectCode;
|
return $selectCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -794,7 +796,8 @@ class BuildCurd
|
|||||||
[
|
[
|
||||||
'name' => "notes['$field']",
|
'name' => "notes['$field']",
|
||||||
'select' => $select,
|
'select' => $select,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -813,7 +816,8 @@ class BuildCurd
|
|||||||
'field' => $field,
|
'field' => $field,
|
||||||
'name' => "notes['$field']",
|
'name' => "notes['$field']",
|
||||||
'select' => $select,
|
'select' => $select,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -832,7 +836,8 @@ class BuildCurd
|
|||||||
'field' => $field,
|
'field' => $field,
|
||||||
'name' => "notes['$field']",
|
'name' => "notes['$field']",
|
||||||
'select' => $select,
|
'select' => $select,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -945,7 +950,6 @@ class BuildCurd
|
|||||||
$this->tableColumns[$field]['formType'] = 'select';
|
$this->tableColumns[$field]['formType'] = 'select';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关联表
|
// 关联表
|
||||||
@@ -1018,7 +1022,6 @@ class BuildCurd
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1027,20 +1030,25 @@ class BuildCurd
|
|||||||
*/
|
*/
|
||||||
protected function renderController(): static
|
protected function renderController(): static
|
||||||
{
|
{
|
||||||
$controllerFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}controller{$this->DS}{$this->controllerFilename}.php";
|
$controllerFile = "{$this->rootDir}app{$this->DS}admin{$this->DS}controller{$this->DS}{$this->controllerFilename}.php";
|
||||||
|
$constructRelation = '';
|
||||||
if (empty($this->relationArray)) {
|
if (empty($this->relationArray)) {
|
||||||
$controllerIndexMethod = '';
|
$controllerIndexMethod = '';
|
||||||
}else {
|
} else {
|
||||||
$relationCode = '';
|
$relationCode = '';
|
||||||
foreach ($this->relationArray as $key => $val) {
|
foreach ($this->relationArray as $key => $val) {
|
||||||
$relation = CommonTool::lineToHump($key);
|
$relation = CommonTool::lineToHump($key);
|
||||||
$relationCode = "->withJoin('{$relation}', 'LEFT')\r";
|
$relationCode = "->withJoin('{$relation}', 'LEFT')\r";
|
||||||
|
if (!empty($val['bindSelectField']) && !empty($val['primaryKey'])) {
|
||||||
|
$constructRelation = '$notes["' . lcfirst($val['modelFilename']) . ucfirst($val['bindSelectField']) . '"] = \app\admin\model\\' . $val['modelFilename'] . '::column("' . $val['bindSelectField'] . '", "' . $val['primaryKey'] . '");';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$controllerIndexMethod = CommonTool::replaceTemplate(
|
$controllerIndexMethod = CommonTool::replaceTemplate(
|
||||||
$this->getTemplate("controller{$this->DS}indexMethod"),
|
$this->getTemplate("controller{$this->DS}indexMethod"),
|
||||||
[
|
[
|
||||||
'relationIndexMethod' => $relationCode,
|
'relationIndexMethod' => $relationCode,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$selectList = '';
|
$selectList = '';
|
||||||
// foreach ($this->relationArray as $relation) {
|
// foreach ($this->relationArray as $relation) {
|
||||||
@@ -1066,7 +1074,9 @@ class BuildCurd
|
|||||||
'modelFilename' => "\app\admin\model\\{$modelFilenameExtend}",
|
'modelFilename' => "\app\admin\model\\{$modelFilenameExtend}",
|
||||||
'indexMethod' => $controllerIndexMethod,
|
'indexMethod' => $controllerIndexMethod,
|
||||||
'selectList' => $selectList,
|
'selectList' => $selectList,
|
||||||
]);
|
'constructRelation' => $constructRelation,
|
||||||
|
]
|
||||||
|
);
|
||||||
$this->fileList[$controllerFile] = $controllerValue;
|
$this->fileList[$controllerFile] = $controllerValue;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -1082,16 +1092,16 @@ class BuildCurd
|
|||||||
$relationList = '';
|
$relationList = '';
|
||||||
if (!empty($this->relationArray)) {
|
if (!empty($this->relationArray)) {
|
||||||
foreach ($this->relationArray as $key => $val) {
|
foreach ($this->relationArray as $key => $val) {
|
||||||
$relation = CommonTool::lineToHump($key);
|
$relation = CommonTool::lineToHump($key);
|
||||||
$relationCode = CommonTool::replaceTemplate(
|
// $relationCode = CommonTool::replaceTemplate(
|
||||||
$this->getTemplate("model{$this->DS}relation"),
|
// $this->getTemplate("model{$this->DS}relation"),
|
||||||
[
|
// [
|
||||||
'relationMethod' => $relation,
|
// 'relationMethod' => $relation,
|
||||||
'relationModel' => "\app\admin\model\\{$val['modelFilename']}",
|
// 'relationModel' => "\app\admin\model\\{$val['modelFilename']}",
|
||||||
'foreignKey' => $val['foreignKey'],
|
// 'foreignKey' => $val['foreignKey'],
|
||||||
'primaryKey' => $val['primaryKey'],
|
// 'primaryKey' => $val['primaryKey'],
|
||||||
]);
|
// ]);
|
||||||
$relationList .= $relationCode;
|
// $relationList .= $relationCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1124,7 +1134,9 @@ class BuildCurd
|
|||||||
'relationList' => $relationList,
|
'relationList' => $relationList,
|
||||||
// 'selectList' => $selectList,
|
// 'selectList' => $selectList,
|
||||||
'selectArrays' => CommonTool::replaceArrayString(var_export($selectArrays, true)),
|
'selectArrays' => CommonTool::replaceArrayString(var_export($selectArrays, true)),
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->fileList[$modelFile] = $modelValue;
|
$this->fileList[$modelFile] = $modelValue;
|
||||||
|
|
||||||
@@ -1153,11 +1165,14 @@ class BuildCurd
|
|||||||
[
|
[
|
||||||
'modelName' => $val['modelName'],
|
'modelName' => $val['modelName'],
|
||||||
'modelNamespace' => "app\admin\model{$extendNamespace}",
|
'modelNamespace' => "app\admin\model{$extendNamespace}",
|
||||||
|
'prefix_table' => $this->tablePrefix == config('database.connections.mysql.prefix') ? "" : $this->tablePrefix . $this->table,
|
||||||
'table' => $key,
|
'table' => $key,
|
||||||
'deleteTime' => $val['delete'] ? '"delete_time"' : 'false',
|
'deleteTime' => $val['delete'] ? '"delete_time"' : 'false',
|
||||||
'relationList' => '',
|
'relationList' => '',
|
||||||
'selectList' => '',
|
'selectList' => '',
|
||||||
]);
|
'selectArrays' => "[]",
|
||||||
|
]
|
||||||
|
);
|
||||||
$this->fileList[$relationModelFile] = $relationModelValue;
|
$this->fileList[$relationModelFile] = $relationModelValue;
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
@@ -1176,7 +1191,8 @@ class BuildCurd
|
|||||||
[
|
[
|
||||||
'controllerUrl' => $this->controllerUrl,
|
'controllerUrl' => $this->controllerUrl,
|
||||||
'notesScript' => $this->formatNotesScript(),
|
'notesScript' => $this->formatNotesScript(),
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
$this->fileList[$viewIndexFile] = $viewIndexValue;
|
$this->fileList[$viewIndexFile] = $viewIndexValue;
|
||||||
|
|
||||||
// 添加页面
|
// 添加页面
|
||||||
@@ -1194,42 +1210,44 @@ class BuildCurd
|
|||||||
// 根据formType去获取具体模板
|
// 根据formType去获取具体模板
|
||||||
if ($val['formType'] == 'image') {
|
if ($val['formType'] == 'image') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}image";
|
$templateFile = "view{$this->DS}module{$this->DS}image";
|
||||||
}elseif ($val['formType'] == 'images') {
|
} elseif ($val['formType'] == 'images') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}images";
|
$templateFile = "view{$this->DS}module{$this->DS}images";
|
||||||
$define = $val['define'] ?? '|';
|
$define = $val['define'] ?? '|';
|
||||||
}elseif ($val['formType'] == 'file') {
|
} elseif ($val['formType'] == 'file') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}file";
|
$templateFile = "view{$this->DS}module{$this->DS}file";
|
||||||
}elseif ($val['formType'] == 'files') {
|
} elseif ($val['formType'] == 'files') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}files";
|
$templateFile = "view{$this->DS}module{$this->DS}files";
|
||||||
$define = $val['define'] ?? '|';
|
$define = $val['define'] ?? '|';
|
||||||
}elseif ($val['formType'] == 'editor') {
|
} elseif ($val['formType'] == 'editor') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}editor";
|
$templateFile = "view{$this->DS}module{$this->DS}editor";
|
||||||
$val['default'] = '""';
|
$val['default'] = '""';
|
||||||
}elseif ($val['formType'] == 'date') {
|
} elseif ($val['formType'] == 'date') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}date";
|
$templateFile = "view{$this->DS}module{$this->DS}date";
|
||||||
$define = 'date';
|
$define = 'date';
|
||||||
}elseif ($val['formType'] == 'datetime') {
|
} elseif ($val['formType'] == 'datetime') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}date";
|
$templateFile = "view{$this->DS}module{$this->DS}date";
|
||||||
$define = 'datetime';
|
$define = 'datetime';
|
||||||
}elseif ($val['formType'] == 'radio') {
|
} elseif ($val['formType'] == 'radio') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}radio";
|
$templateFile = "view{$this->DS}module{$this->DS}radio";
|
||||||
if (!empty($val['define'])) {
|
if (!empty($val['define'])) {
|
||||||
$define = $this->buildRadioView($field, '{in name="k" value="' . $val['default'] . '"}checked=""{/in}');
|
$define = $this->buildRadioView($field, '{in name="k" value="' . $val['default'] . '"}checked=""{/in}');
|
||||||
}
|
}
|
||||||
}elseif ($val['formType'] == 'checkbox') {
|
} elseif ($val['formType'] == 'checkbox') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}checkbox";
|
$templateFile = "view{$this->DS}module{$this->DS}checkbox";
|
||||||
if (!empty($val['define'])) {
|
if (!empty($val['define'])) {
|
||||||
$define = $this->buildCheckboxView($field, '{in name="k" value="' . $val['default'] . '"}checked=""{/in}');
|
$define = $this->buildCheckboxView($field, '{in name="k" value="' . $val['default'] . '"}checked=""{/in}');
|
||||||
}
|
}
|
||||||
}elseif ($val['formType'] == 'select') {
|
} elseif ($val['formType'] == 'select') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}select";
|
$templateFile = "view{$this->DS}module{$this->DS}select";
|
||||||
if (isset($val['bindRelation'])) {
|
if (isset($val['bindRelation'])) {
|
||||||
$define = $this->buildOptionView($val['bindRelation']);
|
$define = $this->buildOptionView($val['bindRelation']);
|
||||||
}elseif (!empty($val['define'])) {
|
} elseif (!empty($val['define'])) {
|
||||||
$define = $this->buildOptionView($field);
|
$define = $this->buildOptionView($field);
|
||||||
}
|
}
|
||||||
}elseif ($field == 'remark' || $val['formType'] == 'textarea') {
|
} elseif ($field == 'remark' || $val['formType'] == 'textarea') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}textarea";
|
$templateFile = "view{$this->DS}module{$this->DS}textarea";
|
||||||
|
} elseif ($field == 'sort') {
|
||||||
|
$templateFile = "view{$this->DS}module{$this->DS}sort";
|
||||||
}
|
}
|
||||||
$addFormList .= CommonTool::replaceTemplate(
|
$addFormList .= CommonTool::replaceTemplate(
|
||||||
$this->getTemplate($templateFile),
|
$this->getTemplate($templateFile),
|
||||||
@@ -1239,13 +1257,15 @@ class BuildCurd
|
|||||||
'required' => $this->buildRequiredHtml($val['required']),
|
'required' => $this->buildRequiredHtml($val['required']),
|
||||||
'value' => $val['default'],
|
'value' => $val['default'],
|
||||||
'define' => $define,
|
'define' => $define,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$viewAddValue = CommonTool::replaceTemplate(
|
$viewAddValue = CommonTool::replaceTemplate(
|
||||||
$this->getTemplate("view{$this->DS}form"),
|
$this->getTemplate("view{$this->DS}form"),
|
||||||
[
|
[
|
||||||
'formList' => $addFormList,
|
'formList' => $addFormList,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
$this->fileList[$viewAddFile] = $viewAddValue;
|
$this->fileList[$viewAddFile] = $viewAddValue;
|
||||||
|
|
||||||
|
|
||||||
@@ -1266,43 +1286,44 @@ class BuildCurd
|
|||||||
// 根据formType去获取具体模板
|
// 根据formType去获取具体模板
|
||||||
if ($val['formType'] == 'image') {
|
if ($val['formType'] == 'image') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}image";
|
$templateFile = "view{$this->DS}module{$this->DS}image";
|
||||||
}elseif ($val['formType'] == 'images') {
|
} elseif ($val['formType'] == 'images') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}images";
|
$templateFile = "view{$this->DS}module{$this->DS}images";
|
||||||
}elseif ($val['formType'] == 'file') {
|
} elseif ($val['formType'] == 'file') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}file";
|
$templateFile = "view{$this->DS}module{$this->DS}file";
|
||||||
}elseif ($val['formType'] == 'files') {
|
} elseif ($val['formType'] == 'files') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}files";
|
$templateFile = "view{$this->DS}module{$this->DS}files";
|
||||||
}elseif ($val['formType'] == 'editor') {
|
} elseif ($val['formType'] == 'editor') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}editor";
|
$templateFile = "view{$this->DS}module{$this->DS}editor";
|
||||||
$value = '$row["' . $field . '"]';
|
$value = '$row["' . $field . '"]';
|
||||||
}elseif ($val['formType'] == 'date') {
|
} elseif ($val['formType'] == 'date') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}date";
|
$templateFile = "view{$this->DS}module{$this->DS}date";
|
||||||
$define = 'date';
|
$define = 'date';
|
||||||
}elseif ($val['formType'] == 'datetime') {
|
} elseif ($val['formType'] == 'datetime') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}date";
|
$templateFile = "view{$this->DS}module{$this->DS}date";
|
||||||
$define = 'datetime';
|
$define = 'datetime';
|
||||||
}elseif ($val['formType'] == 'radio') {
|
} elseif ($val['formType'] == 'radio') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}radio";
|
$templateFile = "view{$this->DS}module{$this->DS}radio";
|
||||||
if (!empty($val['define'])) {
|
if (!empty($val['define'])) {
|
||||||
$define = $this->buildRadioView($field, '{in name="k" value="$row.' . $field . '"}checked=""{/in}');
|
$define = $this->buildRadioView($field, '{in name="k" value="$row.' . $field . '"}checked=""{/in}');
|
||||||
}
|
}
|
||||||
}elseif ($val['formType'] == 'checkbox') {
|
} elseif ($val['formType'] == 'checkbox') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}checkbox";
|
$templateFile = "view{$this->DS}module{$this->DS}checkbox";
|
||||||
if (!empty($val['define'])) {
|
if (!empty($val['define'])) {
|
||||||
$define = $this->buildCheckboxView($field, '{in name="k" value="$row.' . $field . '"}checked=""{/in}');
|
$define = $this->buildCheckboxView($field, '{in name="k" value="$row.' . $field . '"}checked=""{/in}');
|
||||||
}
|
}
|
||||||
}elseif ($val['formType'] == 'select') {
|
} elseif ($val['formType'] == 'select') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}select";
|
$templateFile = "view{$this->DS}module{$this->DS}select";
|
||||||
if (isset($val['bindRelation'])) {
|
if (isset($val['bindRelation'])) {
|
||||||
$define = $this->buildOptionView($val['bindRelation'], '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
|
$define = $this->buildOptionView($val['bindRelation'], '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
|
||||||
}elseif (!empty($val['define'])) {
|
} elseif (!empty($val['define'])) {
|
||||||
$define = $this->buildOptionView($field, '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
|
$define = $this->buildOptionView($field, '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
|
||||||
}
|
}
|
||||||
}elseif ($field == 'remark' || $val['formType'] == 'textarea') {
|
} elseif ($field == 'remark' || $val['formType'] == 'textarea') {
|
||||||
$templateFile = "view{$this->DS}module{$this->DS}textarea";
|
$templateFile = "view{$this->DS}module{$this->DS}textarea";
|
||||||
$value = '{$row.' . $field . '|raw|default=\'\'}';
|
$value = '{$row.' . $field . '|raw|default=\'\'}';
|
||||||
|
} elseif ($field == 'sort') {
|
||||||
|
$templateFile = "view{$this->DS}module{$this->DS}sort";
|
||||||
}
|
}
|
||||||
|
|
||||||
$editFormList .= CommonTool::replaceTemplate(
|
$editFormList .= CommonTool::replaceTemplate(
|
||||||
$this->getTemplate($templateFile),
|
$this->getTemplate($templateFile),
|
||||||
[
|
[
|
||||||
@@ -1311,13 +1332,15 @@ class BuildCurd
|
|||||||
'required' => $this->buildRequiredHtml($val['required']),
|
'required' => $this->buildRequiredHtml($val['required']),
|
||||||
'value' => $value,
|
'value' => $value,
|
||||||
'define' => $define,
|
'define' => $define,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$viewEditValue = CommonTool::replaceTemplate(
|
$viewEditValue = CommonTool::replaceTemplate(
|
||||||
$this->getTemplate("view{$this->DS}form"),
|
$this->getTemplate("view{$this->DS}form"),
|
||||||
[
|
[
|
||||||
'formList' => $editFormList,
|
'formList' => $editFormList,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
$this->fileList[$viewEditFile] = $viewEditValue;
|
$this->fileList[$viewEditFile] = $viewEditValue;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -1338,31 +1361,31 @@ class BuildCurd
|
|||||||
|
|
||||||
if ($val['formType'] == 'image') {
|
if ($val['formType'] == 'image') {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.image}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.image}";
|
||||||
}elseif ($val['formType'] == 'images') {
|
} elseif ($val['formType'] == 'images') {
|
||||||
continue;
|
continue;
|
||||||
}elseif ($val['formType'] == 'file') {
|
} elseif ($val['formType'] == 'file') {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.url}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.url}";
|
||||||
}elseif ($val['formType'] == 'files') {
|
} elseif ($val['formType'] == 'files') {
|
||||||
continue;
|
continue;
|
||||||
}elseif ($val['formType'] == 'editor') {
|
} elseif ($val['formType'] == 'editor') {
|
||||||
continue;
|
continue;
|
||||||
}elseif (in_array($field, $this->switchFields)) {
|
} elseif (in_array($field, $this->switchFields)) {
|
||||||
if (!empty($val['define'])) {
|
if (!empty($val['define'])) {
|
||||||
$templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}', templet: ea.table.switch}";
|
$templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}', templet: ea.table.switch}";
|
||||||
}else {
|
} else {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.switch}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.switch}";
|
||||||
}
|
}
|
||||||
}elseif (in_array($val['formType'], ['select', 'checkbox', 'radio', 'switch'])) {
|
} elseif (in_array($val['formType'], ['select', 'checkbox', 'radio', 'switch'])) {
|
||||||
if (!empty($val['define'])) {
|
if (!empty($val['define'])) {
|
||||||
$templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}'}";
|
$templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}'}";
|
||||||
}else {
|
} else {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}'}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}'}";
|
||||||
}
|
}
|
||||||
}elseif ($field == 'remark') {
|
} elseif ($field == 'remark') {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.text}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.text}";
|
||||||
}elseif (in_array($field, $this->sortFields)) {
|
} elseif (in_array($field, $this->sortFields)) {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}', edit: 'text'}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}', edit: 'text'}";
|
||||||
}else {
|
} else {
|
||||||
$templateValue = "{field: '{$field}', title: '{$val['comment']}'}";
|
$templateValue = "{field: '{$field}', title: '{$val['comment']}'}";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1375,23 +1398,23 @@ class BuildCurd
|
|||||||
foreach ($tableVal['tableColumns'] as $field => $val) {
|
foreach ($tableVal['tableColumns'] as $field => $val) {
|
||||||
if ($val['formType'] == 'image') {
|
if ($val['formType'] == 'image') {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.image}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.image}";
|
||||||
}elseif ($val['formType'] == 'images') {
|
} elseif ($val['formType'] == 'images') {
|
||||||
continue;
|
continue;
|
||||||
}elseif ($val['formType'] == 'file') {
|
} elseif ($val['formType'] == 'file') {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.url}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.url}";
|
||||||
}elseif ($val['formType'] == 'files') {
|
} elseif ($val['formType'] == 'files') {
|
||||||
continue;
|
continue;
|
||||||
}elseif ($val['formType'] == 'editor') {
|
} elseif ($val['formType'] == 'editor') {
|
||||||
continue;
|
continue;
|
||||||
}elseif ($val['formType'] == 'select') {
|
} elseif ($val['formType'] == 'select') {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}";
|
||||||
}elseif ($field == 'remark') {
|
} elseif ($field == 'remark') {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.text}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.text}";
|
||||||
}elseif (in_array($field, $this->switchFields)) {
|
} elseif (in_array($field, $this->switchFields)) {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.switch}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.switch}";
|
||||||
}elseif (in_array($field, $this->sortFields)) {
|
} elseif (in_array($field, $this->sortFields)) {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', edit: 'text'}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', edit: 'text'}";
|
||||||
}else {
|
} else {
|
||||||
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}";
|
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1406,7 +1429,8 @@ class BuildCurd
|
|||||||
[
|
[
|
||||||
'controllerUrl' => $this->controllerUrl,
|
'controllerUrl' => $this->controllerUrl,
|
||||||
'indexCols' => $indexCols,
|
'indexCols' => $indexCols,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
$this->fileList[$jsFile] = $jsValue;
|
$this->fileList[$jsFile] = $jsValue;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -1531,4 +1555,4 @@ class BuildCurd
|
|||||||
{
|
{
|
||||||
return ' let notes = JSON.parse(\'{$notes|json_encode=256|raw}\');';
|
return ' let notes = JSON.parse(\'{$notes|json_encode=256|raw}\');';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
namespace EasyAdmin\curd\exceptions;
|
namespace app\admin\service\curd\exceptions;
|
||||||
|
|
||||||
class CurdException extends \Exception
|
class CurdException extends \Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
namespace EasyAdmin\curd\exceptions;
|
namespace app\admin\service\curd\exceptions;
|
||||||
|
|
||||||
class FileException extends \Exception
|
class FileException extends \Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
namespace app\admin\service\curd\exceptions;
|
namespace app\admin\service\curd\exceptions;
|
||||||
|
|
||||||
class TableException extends \Exception
|
class TableException extends \Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7,9 +7,7 @@ use app\admin\service\annotation\ControllerAnnotation;
|
|||||||
use app\admin\service\annotation\NodeAnnotation;
|
use app\admin\service\annotation\NodeAnnotation;
|
||||||
use think\App;
|
use think\App;
|
||||||
|
|
||||||
/**
|
#[ControllerAnnotation(title: '{{controllerAnnotation}}')]
|
||||||
* @ControllerAnnotation(title="{{controllerAnnotation}}")
|
|
||||||
*/
|
|
||||||
class {{controllerName}} extends AdminController
|
class {{controllerName}} extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -20,6 +18,7 @@ class {{controllerName}} extends AdminController
|
|||||||
parent::__construct($app);
|
parent::__construct($app);
|
||||||
$this->model = new {{modelFilename}}();
|
$this->model = new {{modelFilename}}();
|
||||||
$this->notes = $notes = $this->model->notes;
|
$this->notes = $notes = $this->model->notes;
|
||||||
|
{{constructRelation}}
|
||||||
$this->assign(compact('notes'));
|
$this->assign(compact('notes'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
/**
|
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
if ($this->request->isAjax()) {
|
|
||||||
if (input('selectFields')) {
|
|
||||||
return $this->selectList();
|
|
||||||
}
|
|
||||||
list($page, $limit, $where) = $this->buildTableParams();
|
|
||||||
$count = $this->model{{relationIndexMethod}}->where($where)->count();
|
|
||||||
$list = $this->model{{relationIndexMethod}}->where($where)->page($page, $limit)->order($this->sort)->select()->toArray();
|
|
||||||
$data = [
|
|
||||||
'code' => 0,
|
|
||||||
'msg' => '',
|
|
||||||
'count' => $count,
|
|
||||||
'data' => $list,
|
|
||||||
];
|
|
||||||
return json($data);
|
|
||||||
}
|
|
||||||
return $this->fetch();
|
|
||||||
}
|
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
data-auth-edit="{:auth('{{controllerUrl}}/edit')}"
|
data-auth-edit="{:auth('{{controllerUrl}}/edit')}"
|
||||||
data-auth-delete="{:auth('{{controllerUrl}}/delete')}"
|
data-auth-delete="{:auth('{{controllerUrl}}/delete')}"
|
||||||
lay-filter="currentTable">
|
lay-filter="currentTable">
|
||||||
|
<!-- searchTableShow="false" 隐藏搜索框 -->
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
7
app/admin/service/curd/templates/view/module/sort.code
Normal file
7
app/admin/service/curd/templates/view/module/sort.code
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">{{comment}}</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="number" name="{{field}}" class="layui-input" lay-affix="number" {{required}} placeholder="请输入{{comment}}" value="{{value}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -17,9 +17,7 @@ use think\response\Json;
|
|||||||
trait Curd
|
trait Curd
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '列表', auth: true)]
|
||||||
* @NodeAnnotation(title="列表")
|
|
||||||
*/
|
|
||||||
public function index(Request $request): Json|string
|
public function index(Request $request): Json|string
|
||||||
{
|
{
|
||||||
if ($request->isAjax()) {
|
if ($request->isAjax()) {
|
||||||
@@ -40,9 +38,7 @@ trait Curd
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '添加', auth: true)]
|
||||||
* @NodeAnnotation(title="添加")
|
|
||||||
*/
|
|
||||||
public function add(Request $request): string
|
public function add(Request $request): string
|
||||||
{
|
{
|
||||||
if ($request->isPost()) {
|
if ($request->isPost()) {
|
||||||
@@ -61,9 +57,7 @@ trait Curd
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '编辑', auth: true)]
|
||||||
* @NodeAnnotation(title="编辑")
|
|
||||||
*/
|
|
||||||
public function edit(Request $request, $id = 0): string
|
public function edit(Request $request, $id = 0): string
|
||||||
{
|
{
|
||||||
$row = $this->model->find($id);
|
$row = $this->model->find($id);
|
||||||
@@ -85,11 +79,11 @@ trait Curd
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '删除', auth: true)]
|
||||||
* @NodeAnnotation(title="删除")
|
public function delete(Request $request): void
|
||||||
*/
|
|
||||||
public function delete($id): void
|
|
||||||
{
|
{
|
||||||
|
// 如果不是id作为主键 请在对应的控制器中覆盖重写
|
||||||
|
$id = $request->param('id', []);
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
$row = $this->model->whereIn('id', $id)->select();
|
$row = $this->model->whereIn('id', $id)->select();
|
||||||
$row->isEmpty() && $this->error('数据不存在');
|
$row->isEmpty() && $this->error('数据不存在');
|
||||||
@@ -101,9 +95,7 @@ trait Curd
|
|||||||
$save ? $this->success('删除成功') : $this->error('删除失败');
|
$save ? $this->success('删除成功') : $this->error('删除失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '导出', auth: true)]
|
||||||
* @NodeAnnotation(title="导出")
|
|
||||||
*/
|
|
||||||
public function export()
|
public function export()
|
||||||
{
|
{
|
||||||
if (env('EASYADMIN.IS_DEMO', false)) {
|
if (env('EASYADMIN.IS_DEMO', false)) {
|
||||||
@@ -131,9 +123,7 @@ trait Curd
|
|||||||
return Excel::exportData($list, $header, $fileName, 'xlsx');
|
return Excel::exportData($list, $header, $fileName, 'xlsx');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[NodeAnnotation(title: '属性修改', auth: true)]
|
||||||
* @NodeAnnotation(title="属性修改")
|
|
||||||
*/
|
|
||||||
public function modify(Request $request): void
|
public function modify(Request $request): void
|
||||||
{
|
{
|
||||||
$this->checkPostRequest();
|
$this->checkPostRequest();
|
||||||
|
|||||||
@@ -30,6 +30,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">登录方式</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
{foreach notes.login_type as $key=>$val}
|
||||||
|
<input type="radio" name="login_type" lay-skin="primary" title="{$val}" value="{$key}" lay-filter="loginType-filter" {if $key==$row.login_type}checked=""{/if}>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item layui-form-text">
|
<div class="layui-form-item layui-form-text">
|
||||||
<label class="layui-form-label">备注信息</label>
|
<label class="layui-form-label">备注信息</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
|
|||||||
@@ -26,15 +26,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="layui-nav layui-layout-right">
|
<ul class="layui-nav layui-layout-right">
|
||||||
<!-- <li class="layui-nav-item" lay-unselect>-->
|
|
||||||
<!-- <div class="layui-form ws-header-theme" lay-filter="header-theme">-->
|
|
||||||
<!-- <input type="checkbox" name="theme-mode" id="ID-header-theme-mode" lay-filter="header-theme-mode" lay-skin="switch">-->
|
|
||||||
<!-- <div lay-checkbox>-->
|
|
||||||
<!-- <i class="layui-icon layui-icon-moon"></i> |-->
|
|
||||||
<!-- <i class="layui-icon layui-icon-light"></i>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<!-- </li>-->
|
|
||||||
<li class="layui-nav-item" lay-unselect>
|
<li class="layui-nav-item" lay-unselect>
|
||||||
<a href="http://easyadmin8.top" target="_blank"><i class="fa fa-home"></i></a>
|
<a href="http://easyadmin8.top" target="_blank"><i class="fa fa-home"></i></a>
|
||||||
</li>
|
</li>
|
||||||
@@ -47,6 +38,15 @@
|
|||||||
<li class="layui-nav-item mobile layui-hide-xs" lay-unselect>
|
<li class="layui-nav-item mobile layui-hide-xs" lay-unselect>
|
||||||
<a href="javascript:;" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a>
|
<a href="javascript:;" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="layui-nav-item" lay-unselect>
|
||||||
|
<div class="layui-form ws-header-theme" lay-filter="header-theme">
|
||||||
|
<input type="checkbox" name="theme-mode" lay-filter="header-theme-mode" lay-skin="switch">
|
||||||
|
<div lay-checkbox>
|
||||||
|
<i class="layui-icon layui-icon-moon"></i> |
|
||||||
|
<i class="layui-icon layui-icon-light"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="layui-nav-item layuimini-setting">
|
<li class="layui-nav-item layuimini-setting">
|
||||||
<a href="javascript:;">
|
<a href="javascript:;">
|
||||||
<img src="{:session('admin.head_img')}" class="layui-nav-img" width="50" height="50">
|
<img src="{:session('admin.head_img')}" class="layui-nav-img" width="50" height="50">
|
||||||
|
|||||||
45
app/admin/view/index/set2fa.html
Normal file
45
app/admin/view/index/set2fa.html
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<div class="layuimini-container">
|
||||||
|
<form id="app-form" class="layui-form layuimini-form" autocomplete="off">
|
||||||
|
{if $old_secret}
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">提示</div>
|
||||||
|
<div class="layui-card-body">
|
||||||
|
当前账号已经绑定过了 谷歌验证码 ,如果重新保存将替换
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label required">验证秘钥</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" name="ga_secret" class="layui-input" value="{$secret}" readonly disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label required">二维码</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<img src="{$dataUri}" alt="二维码" style="width: 200px;height: 200px">
|
||||||
|
<div class="layui-text layui-font-cyan layui-font-12">
|
||||||
|
使用
|
||||||
|
<a href="https://2fas.com" target="_blank"><span class="layui-text layui-font-blue">2FAS</span></a>
|
||||||
|
或者
|
||||||
|
<a href="https://cn.bing.com/search?q=Google+Authenticator" target="_blank"><span class="layui-text layui-font-blue">Google Authenticator</span></a>
|
||||||
|
APP 扫描二维码 后 输入验证码 进行绑定
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label required">谷歌验证码</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" name="ga_code" class="layui-input" maxlength="6" lay-verify="required" placeholder="扫描二维码,输入验证码" value="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class=" hr-line">
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item text-center">
|
||||||
|
<button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
@@ -69,16 +69,27 @@
|
|||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div class="welcome-module">
|
<div class="welcome-module">
|
||||||
<div class="layui-row layui-col-space10">
|
<div class="layui-row layui-col-space10">
|
||||||
|
<div class="swiper mySwiper">
|
||||||
|
<div class="swiper-wrapper">
|
||||||
|
{foreach $quicks as $value}
|
||||||
|
|
||||||
{foreach $quicks as $vo}
|
<div class="swiper-slide">
|
||||||
<div class="layui-col-xs3 layuimini-qiuck-module">
|
{foreach $value as $vo}
|
||||||
<a layuimini-content-href="{:url($vo['href'])}" data-title="{$vo['title']}">
|
|
||||||
<i class="{$vo['icon']|raw}"></i>
|
<div class="layui-col-xs3 layuimini-qiuck-module">
|
||||||
<cite>{$vo['title']}</cite>
|
<a layuimini-content-href="{:url($vo['href'])}" data-title="{$vo['title']}">
|
||||||
</a>
|
<i class="{$vo['icon']|raw}"></i>
|
||||||
|
<cite>{$vo['title']}</cite>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
<div class="swiper-pagination"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -169,7 +180,7 @@
|
|||||||
<td>Github</td>
|
<td>Github</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://github.com/wolf-leo/easyAdmin8" target="_blank">
|
<a href="https://github.com/wolf-leo/easyAdmin8" target="_blank">
|
||||||
<i class="layui-icon layui-icon-github layui-font-20 layui-font-cyan layui-text"></i>
|
<i class="layui-icon layui-icon-github layui-font-20 layui-font-gray layui-text"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -181,7 +192,7 @@
|
|||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>
|
<div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>
|
||||||
<div class="layui-card-body layui-text">
|
<div class="layui-card-body layui-text">
|
||||||
<p class="layui-font-cyan">
|
<p>
|
||||||
本模板基于layui2.9.x以及font-awesome-4.7.0进行实现。
|
本模板基于layui2.9.x以及font-awesome-4.7.0进行实现。
|
||||||
<a class="layui-btn layui-btn-xs layui-btn-danger" style="vertical-align: baseline;" target="_blank" href="http://layui.dev/docs">layui文档</a>
|
<a class="layui-btn layui-btn-xs layui-btn-danger" style="vertical-align: baseline;" target="_blank" href="http://layui.dev/docs">layui文档</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="icon" href="{:sysConfig('site', 'site_ico')}" type="image/x-icon">
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||||
|
|||||||
@@ -22,6 +22,11 @@
|
|||||||
<span class="bind-password icon icon-4"></span>
|
<span class="bind-password icon icon-4"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="item layui-hide" id="gaCode">
|
||||||
|
<span class="icon icon-3"></span>
|
||||||
|
<input type="text" name="ga_code" placeholder="谷歌验证码" maxlength="6">
|
||||||
|
</div>
|
||||||
|
|
||||||
{if $captcha == 1}
|
{if $captcha == 1}
|
||||||
<div id="validatePanel" class="item" style="width: 137px;">
|
<div id="validatePanel" class="item" style="width: 137px;">
|
||||||
<input type="text" name="captcha" placeholder="请输入验证码" maxlength="4">
|
<input type="text" name="captcha" placeholder="请输入验证码" maxlength="4">
|
||||||
@@ -36,7 +41,7 @@
|
|||||||
<a href="javascript:" class="forget-password">忘记密码?</a>
|
<a href="javascript:" class="forget-password">忘记密码?</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="text-align:center; width:100%;height:100%;margin:0px;">
|
<div class="layui-form-item" style="text-align:center; width:100%;height:100%;margin:0px;">
|
||||||
<button class="login-btn" lay-submit>立即登录</button>
|
<button type="button" class="login-btn" lay-submit>立即登录</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">分类排序</label>
|
<label class="layui-form-label">分类排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="0">
|
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">分类排序</label>
|
<label class="layui-form-label">分类排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="{$row.sort|default=''}">
|
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="{$row.sort|default=''}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">分类排序</label>
|
<label class="layui-form-label">分类排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="0">
|
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">分类排序</label>
|
<label class="layui-form-label">分类排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="{$row.sort|default=''}">
|
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="{$row.sort|default=''}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">入库数量</label>
|
<label class="layui-form-label">入库数量</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="stock" class="layui-input" lay-verify="required" placeholder="请输入入库数量" value="0">
|
<input type="number" name="stock" class="layui-input" lay-affix="number" lay-verify="required" placeholder="请输入入库数量" value="0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
|
<link rel="stylesheet" href="/static/plugs/zTree/fontawesome.css">
|
||||||
|
<link rel="stylesheet" href="/static/plugs/zTree/zTreeStyle.css?v={$version}">
|
||||||
|
<script src='/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js'></script>
|
||||||
|
<script src='/static/plugs/zTree/jquery.ztree.core.js'></script>
|
||||||
|
<script src='/static/plugs/zTree/jquery.ztree.excheck.js'></script>
|
||||||
|
|
||||||
<div class="layuimini-container">
|
<div class="layuimini-container">
|
||||||
|
|
||||||
<form id="app-form" class="layui-form layuimini-form">
|
<form id="app-form" class="layui-form layuimini-form">
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@@ -10,8 +17,8 @@
|
|||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label required">分配节点</label>
|
<label class="layui-form-label required">分配节点</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block" id="zTree">
|
||||||
<div id="node_ids" class="demo-tree-more"></div>
|
<ul id="tree" class="ztree"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -24,4 +31,4 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单排序</label>
|
<label class="layui-form-label">菜单排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input">
|
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input" lay-affix="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单排序</label>
|
<label class="layui-form-label">菜单排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input">
|
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input" lay-affix="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单排序</label>
|
<label class="layui-form-label">菜单排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input">
|
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input" lay-affix="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">菜单排序</label>
|
<label class="layui-form-label">菜单排序</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input">
|
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input" lay-affix="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ if (!function_exists('__url')) {
|
|||||||
*/
|
*/
|
||||||
function __url(string $url = '', array $vars = [], bool $suffix = true, bool $domain = false): string
|
function __url(string $url = '', array $vars = [], bool $suffix = true, bool $domain = false): string
|
||||||
{
|
{
|
||||||
|
if (filter_var($url, FILTER_VALIDATE_URL)) return $url;
|
||||||
return url($url, $vars, $suffix, $domain)->build();
|
return url($url, $vars, $suffix, $domain)->build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,6 +168,12 @@ class Curd extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (PHP_SAPI == 'cli') {
|
||||||
|
$output->info(">>>>>>>>>>>>>>>");
|
||||||
|
$output->info('执行成功');
|
||||||
|
}else {
|
||||||
|
$output->writeln('执行成功');
|
||||||
|
}
|
||||||
}catch (\Exception $e) {
|
}catch (\Exception $e) {
|
||||||
if (PHP_SAPI == 'cli')
|
if (PHP_SAPI == 'cli')
|
||||||
CliEcho::error($e->getMessage());
|
CliEcho::error($e->getMessage());
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace app\common\command;
|
|
||||||
|
|
||||||
use EasyAdmin\console\CliEcho;
|
|
||||||
use EasyAdmin\tool\CommonTool;
|
|
||||||
use EasyAdmin\upload\driver\alioss\Oss;
|
|
||||||
use think\console\Command;
|
|
||||||
use think\console\Input;
|
|
||||||
use think\console\input\Option;
|
|
||||||
use think\console\Output;
|
|
||||||
|
|
||||||
class OssStatic extends Command
|
|
||||||
{
|
|
||||||
|
|
||||||
protected function configure()
|
|
||||||
{
|
|
||||||
$this->setName('OssStatic')
|
|
||||||
->setDescription('将静态资源上传到oss上');
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function execute(Input $input, Output $output)
|
|
||||||
{
|
|
||||||
$output->writeln("========正在上传静态资源到OSS上:========" . date('Y-m-d H:i:s'));
|
|
||||||
$dir = root_path() . 'public' . DIRECTORY_SEPARATOR . 'static';
|
|
||||||
$list = CommonTool::readDirAllFiles($dir);
|
|
||||||
$uploadConfig = sysConfig('upload');
|
|
||||||
$uploadPrefix = config('app.oss_static_prefix', 'oss_static_prefix');
|
|
||||||
foreach ($list as $key => $val) {
|
|
||||||
list($objectName, $filePath) = [$uploadPrefix . DIRECTORY_SEPARATOR . $key, $val];
|
|
||||||
try {
|
|
||||||
$upload = Oss::instance($uploadConfig)
|
|
||||||
->save($objectName, $filePath);
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
CliEcho::error('文件上传失败:' . $filePath . '。错误信息:' . $e->getMessage());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($upload['save'] == true) {
|
|
||||||
CliEcho::success('文件上传成功:' . $filePath . '。上传地址:' . $upload['url']);
|
|
||||||
} else {
|
|
||||||
CliEcho::error('文件上传失败:' . $filePath . '。错误信息:' . $upload['msg']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$output->writeln("========已完成静态资源上传到OSS上:========" . date('Y-m-d H:i:s'));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -44,6 +44,12 @@ class AdminController extends BaseController
|
|||||||
'title',
|
'title',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过滤节点更新
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected array $ignoreNode = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不导出的字段信息
|
* 不导出的字段信息
|
||||||
* @var array
|
* @var array
|
||||||
@@ -127,6 +133,9 @@ class AdminController extends BaseController
|
|||||||
{
|
{
|
||||||
if ($layout) View::instance()->engine()->layout('/layout/default');
|
if ($layout) View::instance()->engine()->layout('/layout/default');
|
||||||
View::assign($vars);
|
View::assign($vars);
|
||||||
|
if (empty($template)) {
|
||||||
|
$template = strtolower(str_replace('.', '/', $this->request->pathinfo()));
|
||||||
|
}
|
||||||
return View::fetch($template);
|
return View::fetch($template);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,6 +199,9 @@ class AdminController extends BaseController
|
|||||||
case '%*':
|
case '%*':
|
||||||
$where[] = [$key, 'LIKE', "%{$val}"];
|
$where[] = [$key, 'LIKE', "%{$val}"];
|
||||||
break;
|
break;
|
||||||
|
case 'in':
|
||||||
|
$where[] = [$key, 'IN', $val];
|
||||||
|
break;
|
||||||
case 'range':
|
case 'range':
|
||||||
[$beginTime, $endTime] = explode(' - ', $val);
|
[$beginTime, $endTime] = explode(' - ', $val);
|
||||||
$where[] = [$key, '>=', strtotime($beginTime)];
|
$where[] = [$key, '>=', strtotime($beginTime)];
|
||||||
@@ -240,7 +252,7 @@ class AdminController extends BaseController
|
|||||||
'version' => env('APP_DEBUG') ? time() : ConfigService::getVersion(),
|
'version' => env('APP_DEBUG') ? time() : ConfigService::getVersion(),
|
||||||
'adminUploadUrl' => url('ajax/upload', [], false),
|
'adminUploadUrl' => url('ajax/upload', [], false),
|
||||||
'adminEditor' => sysConfig('site', 'editor_type') ?: 'wangEditor',
|
'adminEditor' => sysConfig('site', 'editor_type') ?: 'wangEditor',
|
||||||
'iframeOpenTop' => sysConfig('site', 'iframe_open_top') ?: 0,
|
'iframeOpenTop' => sysConfig('site', 'iframe_open_top') ?: 0,
|
||||||
];
|
];
|
||||||
View::assign($data);
|
View::assign($data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace app\common\service;
|
namespace app\common\service;
|
||||||
|
|
||||||
use app\common\constants\AdminConstant;
|
use app\common\constants\AdminConstant;
|
||||||
use EasyAdmin\tool\CommonTool;
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ class Index extends BaseController
|
|||||||
public function index(): Redirect
|
public function index(): Redirect
|
||||||
{
|
{
|
||||||
// 这是项目首页 系统默认跳转后台页面
|
// 这是项目首页 系统默认跳转后台页面
|
||||||
return redirect('/' . Env::get('EASYADMIN.ADMIN', false));
|
return redirect('/' . Env::get('EASYADMIN.ADMIN', 'admin'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,14 +22,25 @@ class Install extends BaseController
|
|||||||
// $this->redirect('/');
|
// $this->redirect('/');
|
||||||
$isInstall = true;
|
$isInstall = true;
|
||||||
$errorInfo = '已安装系统,如需重新安装请删除文件:/config/install/lock/install.lock,或者删除 /install 路由';
|
$errorInfo = '已安装系统,如需重新安装请删除文件:/config/install/lock/install.lock,或者删除 /install 路由';
|
||||||
}elseif (version_compare(phpversion(), '8.0.0', '<')) {
|
}elseif (version_compare(phpversion(), '8.1.0', '<')) {
|
||||||
$errorInfo = 'PHP版本不能小于8.0.0';
|
$errorInfo = 'PHP版本不能小于8.1.0';
|
||||||
}elseif (!extension_loaded("PDO")) {
|
}elseif (!extension_loaded("PDO")) {
|
||||||
$errorInfo = '当前未开启PDO,无法进行安装';
|
$errorInfo = '当前未开启PDO,无法进行安装';
|
||||||
}
|
}
|
||||||
|
if (!is_file(root_path() . '.env')) {
|
||||||
|
$errorInfo = '.env 文件不存在,请先配置 .env 文件';
|
||||||
|
}
|
||||||
if (!$request->isAjax()) {
|
if (!$request->isAjax()) {
|
||||||
|
$envInfo = [
|
||||||
|
'DB_HOST' => $isInstall ? '' : env('DB_HOST', '127.0.0.1'),
|
||||||
|
'DB_NAME' => $isInstall ? '' : env('DB_NAME', 'easyadmin8'),
|
||||||
|
'DB_USER' => $isInstall ? '' : env('DB_USER', 'root'),
|
||||||
|
'DB_PASS' => $isInstall ? '' : env('DB_PASS', 'root'),
|
||||||
|
'DB_PORT' => $isInstall ? '' : env('DB_PORT', 3306),
|
||||||
|
'DB_PREFIX' => $isInstall ? '' : env('DB_PREFIX', 'ea8_'),
|
||||||
|
];
|
||||||
$currentHost = '://';
|
$currentHost = '://';
|
||||||
$result = compact('errorInfo', 'currentHost', 'isInstall');
|
$result = compact('errorInfo', 'currentHost', 'isInstall', 'envInfo');
|
||||||
return view('index/install/index', $result);
|
return view('index/install/index', $result);
|
||||||
}
|
}
|
||||||
if ($errorInfo) $this->error($errorInfo);
|
if ($errorInfo) $this->error($errorInfo);
|
||||||
@@ -88,12 +99,11 @@ class Install extends BaseController
|
|||||||
$installPath = config_path() . DIRECTORY_SEPARATOR . 'install' . DIRECTORY_SEPARATOR;
|
$installPath = config_path() . DIRECTORY_SEPARATOR . 'install' . DIRECTORY_SEPARATOR;
|
||||||
$sqlPath = file_get_contents($installPath . 'sql' . DIRECTORY_SEPARATOR . 'install.sql');
|
$sqlPath = file_get_contents($installPath . 'sql' . DIRECTORY_SEPARATOR . 'install.sql');
|
||||||
$sqlArray = $this->parseSql($sqlPath, $config['prefix'], 'ea_');
|
$sqlArray = $this->parseSql($sqlPath, $config['prefix'], 'ea_');
|
||||||
$conn = mysqli_connect($config['host'], $config['username'], $config['password'], null, $config['port']);
|
$dsn = $this->pdoDsn($config, true);
|
||||||
try {
|
try {
|
||||||
mysqli_set_charset($conn, $config['charset']);
|
$pdo = new \PDO($dsn, $config['username'] ?? 'root', $config['password'] ?? '');
|
||||||
mysqli_select_db($conn, $config['database']);
|
|
||||||
foreach ($sqlArray as $sql) {
|
foreach ($sqlArray as $sql) {
|
||||||
mysqli_query($conn, $sql);
|
$pdo->query($sql);
|
||||||
}
|
}
|
||||||
$_password = password($password);
|
$_password = password($password);
|
||||||
$tableName = 'system_admin';
|
$tableName = 'system_admin';
|
||||||
@@ -105,9 +115,8 @@ class Install extends BaseController
|
|||||||
'update_time' => time()
|
'update_time' => time()
|
||||||
];
|
];
|
||||||
foreach ($update as $_k => $_up) {
|
foreach ($update as $_k => $_up) {
|
||||||
mysqli_query($conn, "UPDATE {$config['prefix']}{$tableName} SET {$_k} = '{$_up}' WHERE id = 1");
|
$pdo->query("UPDATE {$config['prefix']}{$tableName} SET {$_k} = '{$_up}' WHERE id = 1");
|
||||||
}
|
}
|
||||||
mysqli_close($conn);
|
|
||||||
// 处理安装文件
|
// 处理安装文件
|
||||||
!is_dir($installPath) && @mkdir($installPath);
|
!is_dir($installPath) && @mkdir($installPath);
|
||||||
!is_dir($installPath . 'lock' . DIRECTORY_SEPARATOR) && @mkdir($installPath . 'lock' . DIRECTORY_SEPARATOR);
|
!is_dir($installPath . 'lock' . DIRECTORY_SEPARATOR) && @mkdir($installPath . 'lock' . DIRECTORY_SEPARATOR);
|
||||||
@@ -158,11 +167,11 @@ class Install extends BaseController
|
|||||||
|
|
||||||
protected function createDatabase($database, $config): bool
|
protected function createDatabase($database, $config): bool
|
||||||
{
|
{
|
||||||
|
$dsn = $this->pdoDsn($config);
|
||||||
try {
|
try {
|
||||||
$con = mysqli_connect($config['host'] ?? '127.0.0.1', $config['username'] ?? 'root', $config['password'] ?? '', null, $config['port'] ?? '');
|
$pdo = new \PDO($dsn, $config['username'] ?? 'root', $config['password'] ?? '');
|
||||||
mysqli_query($con, "CREATE DATABASE IF NOT EXISTS `{$database}` DEFAULT CHARACTER SET {$config['charset']} COLLATE=utf8mb4_general_ci");
|
$pdo->query("CREATE DATABASE IF NOT EXISTS `{$database}` DEFAULT CHARACTER SET {$config['charset']} COLLATE=utf8mb4_general_ci");
|
||||||
mysqli_close($con);
|
}catch (\PDOException $e) {
|
||||||
}catch (\Throwable $e) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -184,19 +193,32 @@ class Install extends BaseController
|
|||||||
|
|
||||||
protected function checkConnect(array $config): ?bool
|
protected function checkConnect(array $config): ?bool
|
||||||
{
|
{
|
||||||
|
$dsn = $this->pdoDsn($config);
|
||||||
try {
|
try {
|
||||||
$con = mysqli_connect($config['host'] ?? '127.0.0.1', $config['username'] ?? 'root', $config['password'] ?? '', null, $config['port'] ?? '');
|
$pdo = new \PDO($dsn, $config['username'] ?? 'root', $config['password'] ?? '');
|
||||||
$res = mysqli_query($con, 'select VERSION()');
|
$res = $pdo->query('select VERSION()');
|
||||||
$mysqlVersion = mysqli_fetch_row($res);
|
$_version = $res->fetch()[0] ?? 0;
|
||||||
mysqli_close($con);
|
|
||||||
$_version = $mysqlVersion[0] ?? 0;
|
|
||||||
if (version_compare($_version, '5.7.0', '<')) {
|
if (version_compare($_version, '5.7.0', '<')) {
|
||||||
$this->error('mysql版本最低要求 5.7.x');
|
$this->error('mysql版本最低要求 5.7.x');
|
||||||
}
|
}
|
||||||
}catch (\mysqli_sql_exception $e) {
|
}catch (\PDOException $e) {
|
||||||
$this->error($e->getMessage());
|
$this->error($e->getMessage());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $config
|
||||||
|
* @param bool $needDatabase
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function pdoDsn(array $config, bool $needDatabase = false): string
|
||||||
|
{
|
||||||
|
$host = $config['host'] ?? '127.0.0.1';
|
||||||
|
$database = $config['database'] ?? '';
|
||||||
|
$port = $config['port'] ?? '3306';
|
||||||
|
$charset = $config['charset'] ?? 'utf8mb4';
|
||||||
|
if ($needDatabase) return "mysql:host=$host;port=$port;dbname=$database;charset=$charset";
|
||||||
|
return "mysql:host=$host;port=$port;charset=$charset";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -20,24 +20,25 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0.0",
|
"php": ">=8.1.0",
|
||||||
"topthink/framework": "^8.0",
|
"topthink/framework": "^8.0",
|
||||||
"topthink/think-orm": "^3.0",
|
"topthink/think-orm": "^3.0",
|
||||||
"topthink/think-multi-app": "^1.0",
|
"topthink/think-multi-app": "^1.1.0",
|
||||||
"topthink/think-view": "^2.0",
|
"topthink/think-view": "2.0.0",
|
||||||
"topthink/think-captcha": "^3.0",
|
"topthink/think-captcha": "^3.0",
|
||||||
"topthink/think-filesystem": "^2.0",
|
"topthink/think-filesystem": "^2.0",
|
||||||
"aliyuncs/oss-sdk-php": "^2.6",
|
"aliyuncs/oss-sdk-php": "^2.6",
|
||||||
"qcloud/cos-sdk-v5": "^2.6",
|
"qcloud/cos-sdk-v5": "^2.6",
|
||||||
"jianyan74/php-excel": "^1.0.2",
|
"jianyan74/php-excel": "^1.0.2",
|
||||||
"doctrine/annotations": "^1.13",
|
"doctrine/annotations": "^2.0.0",
|
||||||
"phpoffice/phpspreadsheet": "^1.28",
|
"phpoffice/phpspreadsheet": "^1.28",
|
||||||
"myclabs/php-enum": "^1.8",
|
"myclabs/php-enum": "^1.8",
|
||||||
|
"qiniu/php-sdk": "^7.11.0",
|
||||||
|
"wolf-leo/phplogviewer": "^0.11.3",
|
||||||
|
"wolfcode/authenticator": "^0.0.6",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"qiniu/php-sdk": "v7.11.0",
|
|
||||||
"ext-mysqli": "*",
|
"ext-mysqli": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*"
|
||||||
"wolf-leo/phplogviewer": "^0.10.0"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": ">=4.2",
|
"symfony/var-dumper": ">=4.2",
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ CREATE TABLE `ea_system_admin`
|
|||||||
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
|
`create_time` int(11) DEFAULT NULL COMMENT '创建时间',
|
||||||
`update_time` int(11) DEFAULT NULL COMMENT '更新时间',
|
`update_time` int(11) DEFAULT NULL COMMENT '更新时间',
|
||||||
`delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
|
`delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
|
||||||
|
`login_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '登录方式',
|
||||||
|
`ga_secret` varchar(32) NOT NULL DEFAULT '' COMMENT '谷歌验证码秘钥',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `username` (`username`) USING BTREE,
|
UNIQUE KEY `username` (`username`) USING BTREE,
|
||||||
KEY `phone` (`phone`)
|
KEY `phone` (`phone`)
|
||||||
@@ -106,7 +108,7 @@ CREATE TABLE `ea_system_admin`
|
|||||||
-- Records of ea_system_admin
|
-- Records of ea_system_admin
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `ea_system_admin`
|
INSERT INTO `ea_system_admin`
|
||||||
VALUES ('1', null, '/static/admin/images/head.jpg', 'admin', 'a33b679d5581a8692988ec9f92ad2d6a2259eaa7', 'admin', 'admin', '0', '0', '1', '1589454169', '1589476815', null);
|
VALUES ('1', null, '/static/admin/images/head.jpg', 'admin', 'a33b679d5581a8692988ec9f92ad2d6a2259eaa7', 'admin', 'admin', '0', '0', '1', '1589454169', '1589476815', null,1,'');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for ea_system_auth
|
-- Table structure for ea_system_auth
|
||||||
@@ -233,11 +235,11 @@ VALUES ('64', 'oss_domain', 'upload', '填你的', '阿里云oss访问域名', '
|
|||||||
INSERT INTO `ea_system_config`
|
INSERT INTO `ea_system_config`
|
||||||
VALUES ('65', 'logo_title', 'site', 'EasyAdmin', 'LOGO标题', '0', null, null);
|
VALUES ('65', 'logo_title', 'site', 'EasyAdmin', 'LOGO标题', '0', null, null);
|
||||||
INSERT INTO `ea_system_config`
|
INSERT INTO `ea_system_config`
|
||||||
VALUES ('66', 'logo_image', 'site', '/favicon.ico', 'logo图片', '0', null, null);
|
VALUES ('66', 'logo_image', 'site', '/static/common/images/logo-1.png', 'logo图片', '0', null, null);
|
||||||
INSERT INTO `ea_system_config`
|
INSERT INTO `ea_system_config`
|
||||||
VALUES ('68', 'site_name', 'site', 'EasyAdmin后台系统', '站点名称', '0', null, null);
|
VALUES ('68', 'site_name', 'site', 'EasyAdmin后台系统', '站点名称', '0', null, null);
|
||||||
INSERT INTO `ea_system_config`
|
INSERT INTO `ea_system_config`
|
||||||
VALUES ('69', 'site_ico', 'site', '填你的', '浏览器图标', '0', null, null);
|
VALUES ('69', 'site_ico', 'site', '/favicon.ico', '浏览器图标', '0', null, null);
|
||||||
INSERT INTO `ea_system_config`
|
INSERT INTO `ea_system_config`
|
||||||
VALUES ('70', 'site_copyright', 'site', '填你的', '版权信息', '0', null, null);
|
VALUES ('70', 'site_copyright', 'site', '填你的', '版权信息', '0', null, null);
|
||||||
INSERT INTO `ea_system_config`
|
INSERT INTO `ea_system_config`
|
||||||
|
|||||||
@@ -42,4 +42,6 @@ return [
|
|||||||
'default_jsonp_handler' => 'jsonpReturn',
|
'default_jsonp_handler' => 'jsonpReturn',
|
||||||
// 默认JSONP处理方法
|
// 默认JSONP处理方法
|
||||||
'var_jsonp_handler' => 'callback',
|
'var_jsonp_handler' => 'callback',
|
||||||
|
// 操作方法的参数绑定方式 route get param
|
||||||
|
'action_bind_param' => 'param',
|
||||||
];
|
];
|
||||||
|
|||||||
1
log.md
1
log.md
@@ -1,2 +1,3 @@
|
|||||||
|
> 2025年01月01日 `PHP` 要求升级到 `8.1+`
|
||||||
>
|
>
|
||||||
> 2024年05月 更新 `EasyAdmin8` 重置版,多处语法、写法进行变更
|
> 2024年05月 更新 `EasyAdmin8` 重置版,多处语法、写法进行变更
|
||||||
59
public/static/admin/css/color.css
Normal file
59
public/static/admin/css/color.css
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
.green {
|
||||||
|
color: #11c26d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red {
|
||||||
|
color: #ff4c52 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cyan {
|
||||||
|
color: #0bb2d4 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.purple {
|
||||||
|
color: #9463f7 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blue {
|
||||||
|
color: #3e8ef7 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.orange {
|
||||||
|
color: #eb6709 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.indigo {
|
||||||
|
color: #6610f2 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pink {
|
||||||
|
color: #e83e8c !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.teal {
|
||||||
|
color: #20c997 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray {
|
||||||
|
color: #6c757d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-dark {
|
||||||
|
color: #343a40 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.secondary {
|
||||||
|
color: #6c757d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yellow {
|
||||||
|
color: rgb(255, 214, 102) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.magenta {
|
||||||
|
color: #eb2f96 !important;
|
||||||
|
}
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
body {
|
||||||
|
background: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
.demo {
|
.demo {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
@@ -170,7 +173,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
background: #333333;
|
|
||||||
position: static;
|
position: static;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
@import url("../../plugs/layui-v2.x/css/layui.css");
|
@import url("../../plugs/layui-v2.x/css/layui.css");
|
||||||
@import url("../../plugs/font-awesome-4.7.0/css/font-awesome.min.css");
|
@import url("../../plugs/font-awesome-4.7.0/css/font-awesome.min.css");
|
||||||
|
@import url("../css/color.css");
|
||||||
|
@import url("../css/themes/index.css");
|
||||||
@import url("../css/iconfont.css");
|
@import url("../css/iconfont.css");
|
||||||
|
|
||||||
html, body {
|
html,
|
||||||
height: 100%;
|
body {
|
||||||
background: #f2f2f2;
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
}
|
|
||||||
|
|
||||||
html.dark, body {
|
|
||||||
height: 100%;
|
|
||||||
background: var(--lay-color-bg-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ws-header-theme .layui-form-switch {
|
.ws-header-theme .layui-form-switch {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ws-header-theme .layui-form-onswitch {
|
||||||
|
background: #333333;
|
||||||
|
border: 1px solid rgba(255, 255, 255, .7);
|
||||||
|
}
|
||||||
|
|
||||||
.layuimini-container {
|
.layuimini-container {
|
||||||
min-height: 250px;
|
min-height: 250px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@@ -58,10 +60,8 @@ html.dark, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hr-line {
|
.hr-line {
|
||||||
color: #fff;
|
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin: 30px 0;
|
margin: 30px 0;
|
||||||
background-color: #fff;
|
|
||||||
border-top: 1px dashed #e7eaec;
|
border-top: 1px dashed #e7eaec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +84,6 @@ html.dark, body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
border: 1px solid #e6e6e6;
|
border: 1px solid #e6e6e6;
|
||||||
padding: 10px 20px 5px 20px;
|
padding: 10px 20px 5px 20px;
|
||||||
color: #6b6b6b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**数据表格-搜索表单样式*/
|
/**数据表格-搜索表单样式*/
|
||||||
@@ -134,6 +133,19 @@ html.dark, body {
|
|||||||
color: #a29c9c;
|
color: #a29c9c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tableSearch-xmSelect xm-select {
|
||||||
|
min-height: 30px !important;
|
||||||
|
line-height: 30px !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
background-color: var(--lay-color-fill-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem-style-dark .tableSearch-xmSelect xm-select {
|
||||||
|
background-color: var(--lay-color-fill-2);
|
||||||
|
color: var(--lay-color-text-2);
|
||||||
|
border-color: var(--lay-color-border-1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/** 按钮背景色 */
|
/** 按钮背景色 */
|
||||||
.layuimini-container .layuimini-btn-primary {
|
.layuimini-container .layuimini-btn-primary {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -259,7 +271,6 @@ table样式
|
|||||||
|
|
||||||
.layuimini-container .layui-table-box .layui-table-header th {
|
.layuimini-container .layui-table-box .layui-table-header th {
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
color: #565656 !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -334,7 +345,7 @@ table样式
|
|||||||
弹出层样式
|
弹出层样式
|
||||||
*/
|
*/
|
||||||
.layui-layer-easy .layui-layer-title {
|
.layui-layer-easy .layui-layer-title {
|
||||||
background: #2c3e50 !important;
|
background: var(--lay-color-bg-5);
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
@@ -357,7 +368,6 @@ table样式
|
|||||||
.layui-layer-easy .layui-layer-btn {
|
.layui-layer-easy .layui-layer-btn {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
padding: 10px !important;
|
padding: 10px !important;
|
||||||
background: #ecf0f1;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,6 +485,18 @@ table样式
|
|||||||
.form-search .layui-input-inline input, .form-search .layui-input-inline select {
|
.form-search .layui-input-inline input, .form-search .layui-input-inline select {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tableSelect {
|
||||||
|
margin: 5px !important;
|
||||||
|
min-width: auto !important;
|
||||||
|
left: 1px !important;
|
||||||
|
right: 1px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tableSelect img {
|
||||||
|
object-fit: cover;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -494,4 +516,5 @@ table样式
|
|||||||
|
|
||||||
.wangEditor_div {
|
.wangEditor_div {
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
|
border: 1px solid var(--w-e-textarea-slight-border-color);
|
||||||
}
|
}
|
||||||
802
public/static/admin/css/themes/_dark.scss
Normal file
802
public/static/admin/css/themes/_dark.scss
Normal file
@@ -0,0 +1,802 @@
|
|||||||
|
// 通常用于背景色
|
||||||
|
$black-color :rgb(2, 17, 20);
|
||||||
|
// 通常用于字体颜色
|
||||||
|
$main-color :rgb(126, 252, 246);
|
||||||
|
// 通常用于边框
|
||||||
|
$less-main-color:rgb(6, 216, 215);
|
||||||
|
|
||||||
|
$plus-main-color:rgb(0, 125, 124);
|
||||||
|
|
||||||
|
// 通常用于激活状态,通常跟背景色搭配
|
||||||
|
$cover-color :rgba(62, 251, 251, 0.05);
|
||||||
|
// 更强的激活状态,适合做选项操作时使用
|
||||||
|
$active-color :rgba(62, 251, 251, 0.5);
|
||||||
|
|
||||||
|
|
||||||
|
$red-color :rgb(255, 0, 0);
|
||||||
|
$yellow-color:rgb(255, 255, 153);
|
||||||
|
$green-color :rgb(0, 255, 0);
|
||||||
|
|
||||||
|
& {
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-tool {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
$box-shape: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0);
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
|
||||||
|
&.layui-btn-lg {
|
||||||
|
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
clip-path : $box-shape;
|
||||||
|
padding-right : 10px;
|
||||||
|
position : relative;
|
||||||
|
background-color: transparent;
|
||||||
|
border : 1px solid;
|
||||||
|
color : rgb(126, 252, 246);
|
||||||
|
text-shadow : rgb(126, 252, 246) 0px 0px 1px;
|
||||||
|
background-color: rgb(126, 252, 246);
|
||||||
|
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: -0.5px;
|
||||||
|
top: -0.5px;
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: -0.5px;
|
||||||
|
top: -0.5px;
|
||||||
|
background-color: rgba(126, 252, 246, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-disabled {
|
||||||
|
&::after {
|
||||||
|
// todo:实现按钮禁用样式
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-success {
|
||||||
|
text-shadow: rgb(0, 255, 0) 0px 0px 1px;
|
||||||
|
color: rgb(0, 255, 0);
|
||||||
|
background-color: rgba(0, 255, 0);
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: rgba(0, 255, 0, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-danger {
|
||||||
|
text-shadow: rgb(255, 0, 0) 0px 0px 1px;
|
||||||
|
color: rgb(255, 0, 0);
|
||||||
|
background-color: rgb(255, 0, 0);
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: rgba(255, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layuimini-btn-primary {
|
||||||
|
text-shadow: rgb(255, 255, 153) 0px 0px 1px;
|
||||||
|
color: rgb(255, 255, 153);
|
||||||
|
background-color: rgb(255, 255, 153);
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: rgba(255, 255, 153, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-primary {
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-normal {
|
||||||
|
color: $black-color;
|
||||||
|
background-color: $main-color;
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table {
|
||||||
|
background: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
|
||||||
|
tr {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-header {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-box {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-box .layui-table-header th {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool .layui-inline[lay-event] {
|
||||||
|
color: $main-color;
|
||||||
|
border: none;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
border-color: $main-color;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: calc(100% - 1px);
|
||||||
|
height: calc(100% - 1px);
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table tbody tr:hover {
|
||||||
|
background-color: rgba(126, 252, 246, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-header {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.color-content>ul>li>a>div>span:nth-child(2) {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .elem-content li {
|
||||||
|
clip-path: $box-shape;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .elem-content li.layui-this {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color !important;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .more-menu-item {
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(62, 251, 251, 0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header {
|
||||||
|
background-color: $cover-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title {
|
||||||
|
background-color: $cover-color !important;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title span {
|
||||||
|
color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover,
|
||||||
|
.layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item {
|
||||||
|
background-color: $active-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layuimini-header-content>ul>.layui-nav-item.layui-this,
|
||||||
|
.layuimini-tool i:hover {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-control>li {
|
||||||
|
background-color: $black-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title li {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-flow-more a *,
|
||||||
|
.layui-laypage input,
|
||||||
|
.layui-table-view select[lay-ignore] {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laypage button,
|
||||||
|
.layui-laypage input {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
background-color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-onswitch {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch.layui-form-onswitch i {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
}
|
||||||
|
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laypage .layui-laypage-curr em {
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
|
||||||
|
background-color: $less-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
border-color: $main-color;
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-form-checkbox[lay-skin="primary"] i {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-init {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-border-line {
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid $less-main-color;
|
||||||
|
border-width: 1px;
|
||||||
|
$border-offset: 3px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 20px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
border: 1px solid $less-main-color;
|
||||||
|
top: -$border-offset;
|
||||||
|
left: -$border-offset;
|
||||||
|
border-right: none;
|
||||||
|
border-bottom: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 20px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
border: 1px solid $less-main-color;
|
||||||
|
bottom: -$border-offset;
|
||||||
|
right: -$border-offset;
|
||||||
|
border-left: none;
|
||||||
|
border-top: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
|
||||||
|
&::after,
|
||||||
|
&::before {
|
||||||
|
width: calc(100% + $border-offset);
|
||||||
|
height: calc(100% + $border-offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-search-fieldset {
|
||||||
|
.layui-input-inline {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.layui-form-item:not(:last-child) {
|
||||||
|
margin-right: 10px;
|
||||||
|
@extend .box-border-line;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-label {
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-pane .layui-form-label {
|
||||||
|
background-color: $cover-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .table-search-fieldset {
|
||||||
|
color: $main-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-select,
|
||||||
|
.layui-form-autocomplete {
|
||||||
|
dl {
|
||||||
|
|
||||||
|
color: $main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
|
||||||
|
dd {
|
||||||
|
&.layui-this {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $less-main-color !important;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-iconpicker-item,
|
||||||
|
.layui-iconpicker-item:hover {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
color: $black-color;
|
||||||
|
|
||||||
|
.layui-iconpicker-icon:hover {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-nav-child {
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-badge,
|
||||||
|
.layui-badge-dot,
|
||||||
|
.layui-badge-rim {
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-child a:hover {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool-panel {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"] span {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool-panel li:hover {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-side.layui-bg-black,
|
||||||
|
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
|
||||||
|
.layuimini-menu-left-zoom>ul {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-side {
|
||||||
|
border-right: 1px solid $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-blue {
|
||||||
|
background-color: #0000ff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-orange {
|
||||||
|
background-color: $yellow-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-green {
|
||||||
|
background-color: $green-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-hover {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-grid-down {
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tips-main {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layuimini-tool i {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-red {
|
||||||
|
color: $red-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this span {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card {
|
||||||
|
|
||||||
|
background-color: $cover-color;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
@extend .box-border-line;
|
||||||
|
|
||||||
|
.layui-card-header {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-text {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-qiuck-module {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
a i {
|
||||||
|
background-color: $cover-color;
|
||||||
|
color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a cite {
|
||||||
|
color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
a i {
|
||||||
|
background-color: $active-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a cite {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-number {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input,
|
||||||
|
.layui-select,
|
||||||
|
.layui-textarea,
|
||||||
|
.city-picker-span,
|
||||||
|
.main-input {
|
||||||
|
background-color: $cover-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.city-picker-span>.title>span {
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-radio:hover *,
|
||||||
|
.layui-form-radioed,
|
||||||
|
.layui-form-radioed>i {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input:focus,
|
||||||
|
.layui-textarea:focus {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input:hover,
|
||||||
|
.layui-textarea:hover {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-badge-rim,
|
||||||
|
.layui-border,
|
||||||
|
.layui-colla-content,
|
||||||
|
.layui-colla-item,
|
||||||
|
.layui-collapse,
|
||||||
|
.layui-elem-field,
|
||||||
|
.layui-form-pane .layui-form-item[pane],
|
||||||
|
.layui-form-pane .layui-form-label,
|
||||||
|
.layui-input,
|
||||||
|
.layui-layedit,
|
||||||
|
.layui-layedit-tool,
|
||||||
|
.layui-panel,
|
||||||
|
.layui-quote-nm,
|
||||||
|
.layui-select,
|
||||||
|
.layui-tab-bar,
|
||||||
|
.layui-tab-card,
|
||||||
|
.layui-tab-title,
|
||||||
|
.layui-tab-title .layui-this::after,
|
||||||
|
.layui-textarea {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-input-inline input,
|
||||||
|
.form-search .layui-input-inline select {
|
||||||
|
border-width: 0 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-tool .layui-nav-child {
|
||||||
|
border-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-child a {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-item {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-upload .layuimini-upload-btn {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer {
|
||||||
|
border: 1px solid $main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title {
|
||||||
|
background-color: $plus-main-color !important;
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.layui-table td,
|
||||||
|
.layui-table th,
|
||||||
|
.layui-table-col-set,
|
||||||
|
.layui-table-fixed-r,
|
||||||
|
.layui-table-grid-down,
|
||||||
|
.layui-table-header,
|
||||||
|
.layui-table-page,
|
||||||
|
.layui-table-tips-main,
|
||||||
|
.layui-table-tool,
|
||||||
|
.layui-table-total,
|
||||||
|
.layui-table-view,
|
||||||
|
.layui-table[lay-skin="line"],
|
||||||
|
.layui-table[lay-skin="row"] {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table tbody tr:hover,
|
||||||
|
.layui-table thead tr,
|
||||||
|
.layui-table-click,
|
||||||
|
.layui-table-header,
|
||||||
|
.layui-table-hover,
|
||||||
|
.layui-table-mend,
|
||||||
|
.layui-table-patch,
|
||||||
|
.layui-table-tool,
|
||||||
|
.layui-table-total,
|
||||||
|
.layui-table-total tr {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hr-line {
|
||||||
|
color: $main-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn {
|
||||||
|
background-color: $black-color;
|
||||||
|
border-top: 1px solid $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
|
||||||
|
background-color: $main-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
color: $main-color !important;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn a {
|
||||||
|
@extend .layui-btn
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-shade {
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left {
|
||||||
|
.layui-nav-tree .layui-nav-item {
|
||||||
|
|
||||||
|
margin: 5px;
|
||||||
|
width: calc(100% - 10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-item {
|
||||||
|
clip-path: $box-shape;
|
||||||
|
color: $main-color;
|
||||||
|
background-color: $active-color;
|
||||||
|
|
||||||
|
&.layui-this a {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-this {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
span {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-item a:hover {
|
||||||
|
background-color: $active-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-item a span {
|
||||||
|
color: $main-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-item:hover a span {
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layuimini-logo {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
.layui-left-nav {
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-iconpicker-icon {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
background-color: $less-main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-iconpicker .layui-anim {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-iconpicker .layui-iconpicker-list {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-header .layui-nav .layui-nav-child dd.layui-this a,
|
||||||
|
.layui-header .layui-nav-child dd.layui-this,
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
|
||||||
|
background-color: $active-color !important;
|
||||||
|
}
|
||||||
81
public/static/admin/css/themes/_demo.scss
Normal file
81
public/static/admin/css/themes/_demo.scss
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
.layui-btn {
|
||||||
|
color : #808185 !important;
|
||||||
|
background-color: #cde7ff !important;
|
||||||
|
border : 1px solid #d3dde6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title {
|
||||||
|
background-color: rgb(215, 215, 215) !important;
|
||||||
|
color : #6C6E71 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin>a::after {
|
||||||
|
color: #6C6E71 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
|
||||||
|
color : #808185 !important;
|
||||||
|
background-color: #cde7ff !important;
|
||||||
|
border : 1px solid #d3dde6 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layuimini-tab-active {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title li {
|
||||||
|
padding : 0 5px !important;
|
||||||
|
font-size : 12px;
|
||||||
|
border-width: 1px 1px 1px 0 !important;
|
||||||
|
border-style: solid !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title li.layui-this {
|
||||||
|
color : #fff !important;
|
||||||
|
border-color: rgba(0, 0, 255, 1) !important;
|
||||||
|
background : rgba(90, 173, 255, 1) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this span {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab>.layui-tab-title li,
|
||||||
|
.layuimini-tab>.close-box li {
|
||||||
|
line-height: 27px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab>.layui-tab-title,
|
||||||
|
.layuimini-tab>.close-box {
|
||||||
|
height: 28px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-control>li {
|
||||||
|
height : 28px !important;
|
||||||
|
line-height: 28px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
|
||||||
|
background-color: #6C6E71 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-onswitch {
|
||||||
|
background-color: #cde7ff !important;
|
||||||
|
border-color : #cde7ff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch {
|
||||||
|
|
||||||
|
background-color: #6C6E71;
|
||||||
|
border-color : #6C6E71;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool .layui-inline[lay-event] {
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
border-color : #cde7ff !important;
|
||||||
|
background-color: #cde7ff !important;
|
||||||
|
}
|
||||||
708
public/static/admin/css/themes/_gtk.scss
Normal file
708
public/static/admin/css/themes/_gtk.scss
Normal file
@@ -0,0 +1,708 @@
|
|||||||
|
& {
|
||||||
|
background-color: #f6f5f4;
|
||||||
|
color : #2e3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container {}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-box .layui-table-header th {
|
||||||
|
color : #979a9b !important;
|
||||||
|
font-weight : 700 !important;
|
||||||
|
font-weight : bold;
|
||||||
|
text-shadow : none;
|
||||||
|
border-color : #d7d2ce;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
|
||||||
|
border-right: 1px solid #d7d2ce;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-table td {
|
||||||
|
|
||||||
|
border-bottom: unset;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-right: 1px solid #d7d2ce;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table {
|
||||||
|
color : #2e3436;
|
||||||
|
background: #f6f5f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-table[lay-size="sm"] .layui-table-cell {
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table tbody tr:hover,
|
||||||
|
.layui-table thead tr,
|
||||||
|
.layui-table-click,
|
||||||
|
.layui-table-header,
|
||||||
|
.layui-table-hover,
|
||||||
|
.layui-table-mend,
|
||||||
|
.layui-table-patch,
|
||||||
|
.layui-table-tool,
|
||||||
|
.layui-table-total,
|
||||||
|
.layui-table-total tr {
|
||||||
|
background-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-cell {
|
||||||
|
padding: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table img {
|
||||||
|
height: 25px !important;
|
||||||
|
width : auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
position : relative;
|
||||||
|
outline : none;
|
||||||
|
overflow : visible;
|
||||||
|
line-height : 28px;
|
||||||
|
border-radius : 5px;
|
||||||
|
transition : all .15s cubic-bezier(.25, .46, .45, .94);
|
||||||
|
padding : 4px 9px;
|
||||||
|
user-select : none;
|
||||||
|
color : #2e3436;
|
||||||
|
outline-color : rgba(53, 132, 228, .5);
|
||||||
|
border : 1px solid #cdc7c2;
|
||||||
|
border-bottom-color: rgb(205, 199, 194);
|
||||||
|
border-bottom-color: #bfb8b1;
|
||||||
|
background-color : #f6f5f4;
|
||||||
|
box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07);
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content : ' ';
|
||||||
|
position : absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
width : 100%;
|
||||||
|
height : 100%;
|
||||||
|
top : 0px;
|
||||||
|
left : 0px;
|
||||||
|
background : linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent);
|
||||||
|
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content : '';
|
||||||
|
position : absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index : 2;
|
||||||
|
display : inline-block;
|
||||||
|
border : 2px solid transparent;
|
||||||
|
border-radius : inherit;
|
||||||
|
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
top : -4px;
|
||||||
|
left : -4px;
|
||||||
|
width : calc(100% - -4px);
|
||||||
|
height : calc(100% - -4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-normal {
|
||||||
|
color : #fff;
|
||||||
|
border-color : #1b6acb #1b6acb #15539e;
|
||||||
|
background-color: #3c88e5;
|
||||||
|
box-shadow : inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, .07);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-danger {
|
||||||
|
color : #fff;
|
||||||
|
border-color : #b2161d #b2161d #851015;
|
||||||
|
background-color: #e41f28;
|
||||||
|
box-shadow : inset 0 1px #db1a23, 0 1px 2px rgba(0, 0, 0, .07);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-sm {
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-xs {
|
||||||
|
line-height: 12px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-tool .layui-inline[lay-event] {
|
||||||
|
@extend .layui-btn;
|
||||||
|
|
||||||
|
line-height : 32px;
|
||||||
|
min-width : 32px;
|
||||||
|
min-height : 32px;
|
||||||
|
padding : 0;
|
||||||
|
border-radius: 9999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laydate .layui-this {
|
||||||
|
background-color: #3584e4 !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laydate-content td,
|
||||||
|
.layui-laydate-content th {
|
||||||
|
|
||||||
|
width : 36px;
|
||||||
|
height : 36px;
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.laydate-footer-btns span {
|
||||||
|
@extend .layui-btn;
|
||||||
|
|
||||||
|
line-height: 16px;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-right-style : none;
|
||||||
|
border-top-right-radius : 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top-left-radius : 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laydate-footer span {
|
||||||
|
@extend .layui-btn;
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laydate-footer span.layui-laydate-preview {
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
border-color : #185fb4 !important;
|
||||||
|
background-color: #5094e8;
|
||||||
|
background-image: linear-gradient(0deg, #3987e5, #5094e8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"]:hover i {
|
||||||
|
border-color : #185fb4;
|
||||||
|
background-image: linear-gradient(0deg, #5094e8, #6ba5eb);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-form-checkbox[lay-skin="primary"] i {
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-form-checkbox i {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-title {
|
||||||
|
padding : 0 6px;
|
||||||
|
min-height : 46px;
|
||||||
|
border : 1px solid #bfb8b1;
|
||||||
|
border-top-left-radius : 8px;
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
background : #f1f0ee linear-gradient(0deg, #dfdcd8, #f4f2f1) !important;
|
||||||
|
color : #2e3436 !important;
|
||||||
|
padding-left : 12px;
|
||||||
|
padding-right : 12px;
|
||||||
|
font-weight : bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer {
|
||||||
|
background-color: #f6f5f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title~.layui-layer-setwin>a {
|
||||||
|
position : relative;
|
||||||
|
outline : none;
|
||||||
|
overflow : visible;
|
||||||
|
border-radius: 5px;
|
||||||
|
transition : all .15s cubic-bezier(.25, .46, .45, .94);
|
||||||
|
user-select : none;
|
||||||
|
|
||||||
|
outline-color : rgba(53, 132, 228, .5);
|
||||||
|
border : 1px solid #cdc7c2;
|
||||||
|
border-bottom-color: rgb(205, 199, 194);
|
||||||
|
border-bottom-color: #bfb8b1;
|
||||||
|
background-color : #f6f5f4;
|
||||||
|
box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07);
|
||||||
|
height : 20px;
|
||||||
|
line-height : 20px;
|
||||||
|
width : 20px;
|
||||||
|
text-align : center;
|
||||||
|
display : inline-flex;
|
||||||
|
align-items : center;
|
||||||
|
justify-content : center;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
color: #2e3436 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-setwin {
|
||||||
|
display : flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch.layui-form-onswitch {
|
||||||
|
color : #ffffff;
|
||||||
|
border-color : #185fb4;
|
||||||
|
background-color: #3584e4;
|
||||||
|
text-shadow : 0 1px rgba(53, 132, 228, 0.5), 0 0 2px rgba(255, 255, 255, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch {
|
||||||
|
|
||||||
|
border : 1px solid #cdc7c2;
|
||||||
|
border-radius : 20px;
|
||||||
|
color : rgba(46, 52, 54, 0.2);
|
||||||
|
background-color: #e1dedb;
|
||||||
|
text-shadow : 0 1px rgba(0, 0, 0, 0.1);
|
||||||
|
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-switch {
|
||||||
|
height: 20px;
|
||||||
|
width : 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-switch {
|
||||||
|
|
||||||
|
padding : 0;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-switch.layui-form-onswitch i {
|
||||||
|
top : 0;
|
||||||
|
height : 20px;
|
||||||
|
width : 20px;
|
||||||
|
margin-left: -20px;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-switch i {
|
||||||
|
top : 0;
|
||||||
|
height : 20px;
|
||||||
|
width : 20px;
|
||||||
|
margin-left : -5px;
|
||||||
|
border-radius : 50%;
|
||||||
|
transition : all 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
color : #2e3436;
|
||||||
|
outline-color : rgba(53, 132, 228, 0.5);
|
||||||
|
border-color : #cdc7c2;
|
||||||
|
border-bottom-color: #bfb8b1;
|
||||||
|
background-color : #f6f5f4;
|
||||||
|
box-shadow : inset 0 1px white, 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.07);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
background-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tab-title li {
|
||||||
|
transition : none;
|
||||||
|
padding : 3px 12px;
|
||||||
|
min-height : 30px;
|
||||||
|
min-width : 65px;
|
||||||
|
display : flex;
|
||||||
|
justify-content : center;
|
||||||
|
align-items : center;
|
||||||
|
white-space : nowrap;
|
||||||
|
color : #2e3436;
|
||||||
|
font-weight : normal;
|
||||||
|
user-select : none;
|
||||||
|
border : 0;
|
||||||
|
border-top-style : none;
|
||||||
|
border-right-style : none;
|
||||||
|
border-bottom-style: none;
|
||||||
|
border-left-style : none;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow : inset 0 -3px #c8c2bc;
|
||||||
|
background-color: #edebe9;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-this {
|
||||||
|
box-shadow : inset 0 -3px #3584e4;
|
||||||
|
background-color: #f1f0ee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tab-title {
|
||||||
|
display : flex;
|
||||||
|
align-items : center;
|
||||||
|
flex-direction: row;
|
||||||
|
padding-left : 4px;
|
||||||
|
padding-right : 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab>.layui-tab-title li,
|
||||||
|
.layuimini-tab>.close-box li {
|
||||||
|
line-height: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this span {
|
||||||
|
color: #2e3436 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title span {
|
||||||
|
color: #2e3436 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layuimini-tab-active {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title {
|
||||||
|
background-color: #e1dedb;
|
||||||
|
border-color : #cdc7c2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-dialog .layui-layer-content {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn a {
|
||||||
|
position : relative;
|
||||||
|
outline : none;
|
||||||
|
overflow : visible;
|
||||||
|
line-height : 22px;
|
||||||
|
height : 22px;
|
||||||
|
border-radius : 5px;
|
||||||
|
transition : all .15s cubic-bezier(.25, .46, .45, .94);
|
||||||
|
padding : 4px 9px;
|
||||||
|
user-select : none;
|
||||||
|
color : #2e3436 !important;
|
||||||
|
outline-color : rgba(53, 132, 228, .5);
|
||||||
|
border : 1px solid #cdc7c2;
|
||||||
|
border-bottom-color: rgb(205, 199, 194);
|
||||||
|
border-bottom-color: #bfb8b1;
|
||||||
|
background-color : #f6f5f4;
|
||||||
|
box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07);
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content : ' ';
|
||||||
|
position : absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
width : 100%;
|
||||||
|
height : 100%;
|
||||||
|
top : 0px;
|
||||||
|
left : 0px;
|
||||||
|
background : linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent);
|
||||||
|
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content : '';
|
||||||
|
position : absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index : 2;
|
||||||
|
display : inline-block;
|
||||||
|
border : 2px solid transparent;
|
||||||
|
border-radius : inherit;
|
||||||
|
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
top : -4px;
|
||||||
|
left : -4px;
|
||||||
|
width : calc(100% - -4px);
|
||||||
|
height : calc(100% - -4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&.layui-layer-btn0 {
|
||||||
|
color : #fff !important;
|
||||||
|
border-color : #1b6acb #1b6acb #15539e;
|
||||||
|
background-color: #3c88e5;
|
||||||
|
box-shadow : inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, .07);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tab-brief {
|
||||||
|
|
||||||
|
&>.layui-tab-title {
|
||||||
|
|
||||||
|
li {
|
||||||
|
@extend .layui-btn;
|
||||||
|
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-right-style : none;
|
||||||
|
border-top-right-radius : 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top-left-radius : 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-this {
|
||||||
|
color : unset;
|
||||||
|
color : #2e3436;
|
||||||
|
border-color : #cdc7c2;
|
||||||
|
background-color: #d6d1cd;
|
||||||
|
box-shadow : inset 0 1px rgba(255, 255, 255, 0);
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow : unset;
|
||||||
|
background-color: #edebe9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-radio:hover *,
|
||||||
|
.layui-form-radioed,
|
||||||
|
.layui-form-radioed>i {
|
||||||
|
color: #5094e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card {
|
||||||
|
.layui-card-header {
|
||||||
|
padding : 0 6px;
|
||||||
|
min-height : 46px;
|
||||||
|
border-width : 1px;
|
||||||
|
border-style : solid;
|
||||||
|
border-color : #bfb8b1;
|
||||||
|
border-top-left-radius : 8px;
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
background : #f1f0ee linear-gradient(to top, #dfdcd8, #f4f2f1);
|
||||||
|
box-shadow : inset 0 1px rgba(255, 255, 255, 0.8), inset 0 -2px 2px rgba(0, 0, 0, 0.02);
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
color: #979a9b !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card-body {
|
||||||
|
background-color: #f6f5f4;
|
||||||
|
border : 1px solid #cdc7c2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn,
|
||||||
|
.layui-input,
|
||||||
|
.layui-select,
|
||||||
|
.layui-textarea,
|
||||||
|
.layui-upload-button,
|
||||||
|
.city-picker-span {
|
||||||
|
border-radius: 5px;
|
||||||
|
border : 1px solid #cdc7c2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-side.layui-bg-black,
|
||||||
|
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
|
||||||
|
.layuimini-menu-left-zoom>ul {
|
||||||
|
background-color: #f6f5f4 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left {
|
||||||
|
background-color: #fbfafa;
|
||||||
|
border-right : 1px solid #cdc7c2;
|
||||||
|
|
||||||
|
.layui-nav {
|
||||||
|
|
||||||
|
li {
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top: 1px solid #cdc7c2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&.layui-this {
|
||||||
|
a {
|
||||||
|
background-color: #347cd3 !important;
|
||||||
|
color : #fff !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-this a,
|
||||||
|
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-this a {
|
||||||
|
color: #2e3436 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item.layui-this a:hover,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-item.layui-this a:hover {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
|
||||||
|
color: #2e3436 !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #2e3436 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a {
|
||||||
|
height : 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
|
||||||
|
background-color: rgba(46, 52, 54, 0.05) !important;
|
||||||
|
border-top : 1px solid #d7d2ce;
|
||||||
|
|
||||||
|
dd {
|
||||||
|
border-bottom: 1px solid #d7d2ce;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
|
||||||
|
background-color: #347cd3 !important;
|
||||||
|
color : #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layuimini-logo {
|
||||||
|
background-color: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-header-menu>li.layui-nav-item {
|
||||||
|
@extend .layui-btn;
|
||||||
|
margin-top : 10px;
|
||||||
|
height : 30px !important;
|
||||||
|
line-height: 30px !important;
|
||||||
|
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-right-style : none;
|
||||||
|
border-top-right-radius : 0;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top-left-radius : 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-last-child(2) {
|
||||||
|
border-right-style : solid;
|
||||||
|
border-radius : 5px;
|
||||||
|
border-top-left-radius : 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header {
|
||||||
|
background-color: #f6f5f4 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-dialog {
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-iframe {
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-control>li {
|
||||||
|
background-color: #e1dedb;
|
||||||
|
border-style : solid;
|
||||||
|
border-color : #cdc7c2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-btn {
|
||||||
|
height : 32px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-form-select dl {
|
||||||
|
transition : all 80ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
||||||
|
background-color : #ffffff;
|
||||||
|
background-clip : padding-box;
|
||||||
|
border : 1px solid rgba(0, 0, 0, 0.23);
|
||||||
|
border-top-left-radius : 0;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-radius : 9px;
|
||||||
|
border-top-left-radius : 0px;
|
||||||
|
border-top-right-radius: 0px;
|
||||||
|
box-shadow : 0 1px 3px 2px rgba(0, 0, 0, 0.08);
|
||||||
|
top : 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-select dl dd,
|
||||||
|
.layui-form-select dl dt {
|
||||||
|
height : 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
padding : 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-select dl dd.layui-this {
|
||||||
|
background-color: #3c88e5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-header .layui-table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-header .layui-nav .layui-nav-child dd.layui-this a,
|
||||||
|
.layui-header .layui-nav-child dd.layui-this,
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
|
||||||
|
background-color: #3c88e5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-mobile-show {
|
||||||
|
.layui-nav-more {
|
||||||
|
top: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin>span {
|
||||||
|
color: #2e3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin>span:after {
|
||||||
|
|
||||||
|
color: #2e3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-max::after,
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-max::before {
|
||||||
|
border-color: #2e3436;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-min::before {
|
||||||
|
background-color: #2e3436;
|
||||||
|
}
|
||||||
284
public/static/admin/css/themes/_neomorphic.scss
Normal file
284
public/static/admin/css/themes/_neomorphic.scss
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
$main-color:#61677C;
|
||||||
|
|
||||||
|
& {
|
||||||
|
background-color: #EBECF0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header {
|
||||||
|
background-color: #EBECF0 !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-btn-success {
|
||||||
|
|
||||||
|
color: #4bb368;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-btn-danger {
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layuimini-btn-primary {
|
||||||
|
color: #2c3e50;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-btn-primary {
|
||||||
|
color: #5f5f5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-btn-normal {
|
||||||
|
color: #1e9fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: #EBECF0;
|
||||||
|
text-shadow: 1px 1px 0 #FFF;
|
||||||
|
color: $main-color;
|
||||||
|
box-shadow: -5px -5px 20px #FFF, 5px 5px 20px #BABECC;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-table-tool .layui-inline[lay-event] {
|
||||||
|
@extend .layui-btn;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
@extend .layui-btn;
|
||||||
|
text-shadow: 0.5px 0.5px 0 #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer {
|
||||||
|
@extend .layui-btn;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin>span {
|
||||||
|
color: $main-color !important;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-min::before {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card {
|
||||||
|
@extend .layui-btn;
|
||||||
|
text-shadow: 0.5px 0.5px 0 #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-tool {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table {
|
||||||
|
background-color: #EBECF0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
@extend .layui-btn;
|
||||||
|
text-shadow: 0.5px 0.5px 0 #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-qiuck-module {
|
||||||
|
@extend .layui-btn;
|
||||||
|
|
||||||
|
i {
|
||||||
|
background-color: transparent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-side.layui-bg-black,
|
||||||
|
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
|
||||||
|
.layuimini-menu-left-zoom>ul {
|
||||||
|
@extend .layui-btn;
|
||||||
|
background-color: #EBECF0 !important;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
|
||||||
|
@extend .layui-btn;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav-tree .layui-nav-item {
|
||||||
|
margin: 10px;
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav-tree .layui-nav-child dd {
|
||||||
|
margin: 10px;
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
|
||||||
|
background-color: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a:hover,
|
||||||
|
.layuimini-menu-left .layui-nav .layui-this a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-this a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layuimini-logo {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-header {
|
||||||
|
.layuimini-header-menu>.layui-nav-item {
|
||||||
|
@extend .layui-btn;
|
||||||
|
margin: 10px;
|
||||||
|
line-height: 40px !important;
|
||||||
|
height: 40px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-item {
|
||||||
|
@extend .layui-btn;
|
||||||
|
margin: 10px;
|
||||||
|
line-height: 40px !important;
|
||||||
|
height: 40px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-btn-xs {
|
||||||
|
padding: 0 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input,
|
||||||
|
.layui-textarea {
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 320px;
|
||||||
|
padding: 16px;
|
||||||
|
background-color: #EBECF0;
|
||||||
|
text-shadow: 1px 1px 0 #FFF;
|
||||||
|
margin-right: 8px;
|
||||||
|
box-shadow: inset 2px 2px 5px #BABECC, inset -5px -5px 10px #FFF;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-upload .layuimini-upload-btn {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-pane .layui-form-label {
|
||||||
|
background-color: transparent;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-select dl dd.layui-this {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #2c3e50
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .elem-content li.layui-this {
|
||||||
|
text-shadow: 0.5px 0.5px 0 #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-select dl {
|
||||||
|
@extend .layui-btn;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox {
|
||||||
|
|
||||||
|
@extend .layui-btn;
|
||||||
|
padding: 10px 10px 10px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox>i {
|
||||||
|
left: 6px;
|
||||||
|
top: 10px;
|
||||||
|
text-shadow: 0.5px 0.5px 0 #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked:hover>div,
|
||||||
|
.layui-form-checked>div {
|
||||||
|
|
||||||
|
color: #16b777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tree,
|
||||||
|
.laytable-cell-checkbox {
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"] {
|
||||||
|
padding: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"]>i {
|
||||||
|
left: 5px;
|
||||||
|
top: 5px
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tree-txt {
|
||||||
|
margin-left: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-radio {
|
||||||
|
@extend .layui-btn;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-radio:hover>*,
|
||||||
|
.layui-form-radioed,
|
||||||
|
.layui-form-radioed>i {
|
||||||
|
color: #16b777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tips-c {
|
||||||
|
text-shadow: 0.5px 0.5px 0 #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title {
|
||||||
|
background-color: #EBECF0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-control>li {
|
||||||
|
background-color: #EBECF0;
|
||||||
|
}
|
||||||
344
public/static/admin/css/themes/_nes.scss
Normal file
344
public/static/admin/css/themes/_nes.scss
Normal file
@@ -0,0 +1,344 @@
|
|||||||
|
a,
|
||||||
|
button {
|
||||||
|
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer
|
||||||
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABFklEQVRYR9WXURLDIAhE6/0PbSdOtUpcd1Gnpv1KGpTHBpCE1/cXq+vrMph7dGvXZTtpfW10DCA5jrH1H0Jhs5E0hnZdCR+vb5S8Nn8mQCeS9BdSalYJqMBjAGzq59xAESN7VFVUgV8AZB/dZBR7QTFDCqGquvUBVVoEtgIwpQRzmANSFHgWQKExHdIrPeuMvQNDarXe6nC/AutgV3JW+6bgqQLeV8FekRtgV+ToDKEKnACYKsfZjjkam7a0ZpYTytwmgainpC3HvwBocgKOxqRjehoR9DFKNFYtOwCGYCszobeCbl26N6yyQ6g8X/Wex/rBPsNEV6qAMaJPMynIHQCoSqS9JSMmwef51LflTgCRszU7DvAGiV6mHWfsaVUAAAAASUVORK5CYII=), auto;
|
||||||
|
font-family: "ark-pixel";
|
||||||
|
}
|
||||||
|
|
||||||
|
$border-line-width:3px;
|
||||||
|
|
||||||
|
.public-border {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: $border-line-width;
|
||||||
|
border-image-slice: 2;
|
||||||
|
border-image-width: 2;
|
||||||
|
border-image-repeat: stretch;
|
||||||
|
border-image-source: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" ?><svg version="1.1" width="5" height="5" xmlns="http://www.w3.org/2000/svg"><path d="M2 1 h1 v1 h-1 z M1 2 h1 v1 h-1 z M3 2 h1 v1 h-1 z M2 3 h1 v1 h-1 z" fill="rgb(33,37,41)" /></svg>');
|
||||||
|
border-image-outset: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
|
||||||
|
@extend .public-border;
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
color: #212529;
|
||||||
|
background-color: #fff;
|
||||||
|
border-image-repeat: stretch;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
top: -$border-line-width;
|
||||||
|
right: -$border-line-width;
|
||||||
|
bottom: -$border-line-width;
|
||||||
|
left: -$border-line-width;
|
||||||
|
content: "";
|
||||||
|
box-shadow: inset (-$border-line-width) (-$border-line-width) #adafbc;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #212529;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #e7e7e7;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-sm {
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-xs {
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-normal {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #209cee;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: inset (-$border-line-width) (-$border-line-width) #006bb3;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #108de0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-success {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #92cc41;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: inset (-$border-line-width) (-$border-line-width) #4aa52e;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #92cc41;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-danger {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #e76e55;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: inset (-$border-line-width) (-$border-line-width) #8c2022;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ce372b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-warm {
|
||||||
|
color: #212529;
|
||||||
|
background-color: #f7d51d;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: inset (-$border-line-width) (-$border-line-width) #e59400;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #212529;
|
||||||
|
background-color: #f2c409;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-btn {
|
||||||
|
line-height: 16px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-tool .layui-inline[lay-event] {
|
||||||
|
@extend .layui-btn;
|
||||||
|
line-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table img {
|
||||||
|
image-rendering: pixelated;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"] i {
|
||||||
|
@extend .public-border;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
background-color: unset;
|
||||||
|
color: #212529;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn-sm {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn-xs {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav * {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-tab-title li {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav-tree .layui-nav-item {
|
||||||
|
border-bottom: 3px solid #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-header-menu>.layui-nav-item {
|
||||||
|
|
||||||
|
@extend .public-border;
|
||||||
|
|
||||||
|
border-image-outset: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table td,
|
||||||
|
.layui-table th {
|
||||||
|
font-size: 16px;
|
||||||
|
border-width: 0 2px 2px 0;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #212529
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input,
|
||||||
|
.layui-select,
|
||||||
|
.layui-textarea {
|
||||||
|
@extend .public-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-label {
|
||||||
|
background-color: unset;
|
||||||
|
border: unset;
|
||||||
|
text-align: right;
|
||||||
|
color: #212529;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-form>.layui-form-item>.layui-input-block tip,
|
||||||
|
.layuimini-form>.layui-form-item>.layui-inline tip {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title {
|
||||||
|
background: unset !important;
|
||||||
|
color: #212529 !important;
|
||||||
|
font-size: 16px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn {
|
||||||
|
background: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn a {
|
||||||
|
@extend .layui-btn;
|
||||||
|
color: #212529 !important;
|
||||||
|
|
||||||
|
&.layui-layer-btn0 {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #209cee;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: inset (-$border-line-width) (-$border-line-width) #006bb3;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #108de0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-layer-dialog .layui-layer-content {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin>span {
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin>span:after {
|
||||||
|
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-max::after,
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-max::before {
|
||||||
|
border-color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-setwin .layui-layer-min::before {
|
||||||
|
background-color: #212529;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-layer {
|
||||||
|
@extend .public-border;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card {
|
||||||
|
@extend .public-border;
|
||||||
|
|
||||||
|
.layui-card-header {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
@extend .public-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-box {
|
||||||
|
@extend .public-border;
|
||||||
|
border-image-outset: 1;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-box .layui-table-header th {
|
||||||
|
|
||||||
|
color: #212529 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table tbody tr:hover,
|
||||||
|
.layui-table thead tr,
|
||||||
|
.layui-table-click,
|
||||||
|
.layui-table-header,
|
||||||
|
.layui-table-hover,
|
||||||
|
.layui-table-mend,
|
||||||
|
.layui-table-patch,
|
||||||
|
.layui-table-tool,
|
||||||
|
.layui-table-total,
|
||||||
|
.layui-table-total tr {
|
||||||
|
background-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-header .layui-table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-badge,
|
||||||
|
.layui-badge-rim {
|
||||||
|
position: relative;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-bg-blue {
|
||||||
|
background-color: #209cee;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-bg-gray {
|
||||||
|
background-color: #92cc41;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
box-shadow: 0 4px #92cc41, 0 -4px #92cc41, 4px 0 #92cc41, -4px 0 #92cc41;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .elem-content li {
|
||||||
|
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer;
|
||||||
|
}
|
||||||
0
public/static/admin/css/themes/_normal.scss
Normal file
0
public/static/admin/css/themes/_normal.scss
Normal file
802
public/static/admin/css/themes/_sicfi.scss
Normal file
802
public/static/admin/css/themes/_sicfi.scss
Normal file
@@ -0,0 +1,802 @@
|
|||||||
|
// 通常用于背景色
|
||||||
|
$black-color :rgb(2, 17, 20);
|
||||||
|
// 通常用于字体颜色
|
||||||
|
$main-color :rgb(126, 252, 246);
|
||||||
|
// 通常用于边框
|
||||||
|
$less-main-color:rgb(6, 216, 215);
|
||||||
|
|
||||||
|
$plus-main-color:rgb(0, 125, 124);
|
||||||
|
|
||||||
|
// 通常用于激活状态,通常跟背景色搭配
|
||||||
|
$cover-color :rgba(62, 251, 251, 0.05);
|
||||||
|
// 更强的激活状态,适合做选项操作时使用
|
||||||
|
$active-color :rgba(62, 251, 251, 0.5);
|
||||||
|
|
||||||
|
|
||||||
|
$red-color :rgb(255, 0, 0);
|
||||||
|
$yellow-color:rgb(255, 255, 153);
|
||||||
|
$green-color :rgb(0, 255, 0);
|
||||||
|
|
||||||
|
& {
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-tool {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
$box-shape: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0);
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
|
||||||
|
&.layui-btn-lg {
|
||||||
|
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
clip-path : $box-shape;
|
||||||
|
padding-right : 10px;
|
||||||
|
position : relative;
|
||||||
|
background-color: transparent;
|
||||||
|
border : 1px solid;
|
||||||
|
color : rgb(126, 252, 246);
|
||||||
|
text-shadow : rgb(126, 252, 246) 0px 0px 1px;
|
||||||
|
background-color: rgb(126, 252, 246);
|
||||||
|
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: -0.5px;
|
||||||
|
top: -0.5px;
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: -0.5px;
|
||||||
|
top: -0.5px;
|
||||||
|
background-color: rgba(126, 252, 246, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-disabled {
|
||||||
|
&::after {
|
||||||
|
// todo:实现按钮禁用样式
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-success {
|
||||||
|
text-shadow: rgb(0, 255, 0) 0px 0px 1px;
|
||||||
|
color: rgb(0, 255, 0);
|
||||||
|
background-color: rgba(0, 255, 0);
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: rgba(0, 255, 0, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-danger {
|
||||||
|
text-shadow: rgb(255, 0, 0) 0px 0px 1px;
|
||||||
|
color: rgb(255, 0, 0);
|
||||||
|
background-color: rgb(255, 0, 0);
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: rgba(255, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layuimini-btn-primary {
|
||||||
|
text-shadow: rgb(255, 255, 153) 0px 0px 1px;
|
||||||
|
color: rgb(255, 255, 153);
|
||||||
|
background-color: rgb(255, 255, 153);
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: rgba(255, 255, 153, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-primary {
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-btn-normal {
|
||||||
|
color: $black-color;
|
||||||
|
background-color: $main-color;
|
||||||
|
border: unset;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover::after {
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table {
|
||||||
|
background: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
|
||||||
|
tr {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-header {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-box {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-table-box .layui-table-header th {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool .layui-inline[lay-event] {
|
||||||
|
color: $main-color;
|
||||||
|
border: none;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
border-color: $main-color;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: calc(100% - 1px);
|
||||||
|
height: calc(100% - 1px);
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table tbody tr:hover {
|
||||||
|
background-color: rgba(126, 252, 246, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-main {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-header {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.color-content>ul>li>a>div>span:nth-child(2) {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .elem-content li {
|
||||||
|
clip-path: $box-shape;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .elem-content li.layui-this {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color !important;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-color .more-menu-item {
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(62, 251, 251, 0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header {
|
||||||
|
background-color: $cover-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title {
|
||||||
|
background-color: $cover-color !important;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title span {
|
||||||
|
color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover,
|
||||||
|
.layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item {
|
||||||
|
background-color: $active-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layuimini-header-content>ul>.layui-nav-item.layui-this,
|
||||||
|
.layuimini-tool i:hover {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-control>li {
|
||||||
|
background-color: $black-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title li {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-flow-more a *,
|
||||||
|
.layui-laypage input,
|
||||||
|
.layui-table-view select[lay-ignore] {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laypage button,
|
||||||
|
.layui-laypage input {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
background-color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-onswitch {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .layui-form-switch.layui-form-onswitch i {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
}
|
||||||
|
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-laypage .layui-laypage-curr em {
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
|
||||||
|
background-color: $less-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
border-color: $main-color;
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-view .layui-form-checkbox[lay-skin="primary"] i {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-init {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-border-line {
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid $less-main-color;
|
||||||
|
border-width: 1px;
|
||||||
|
$border-offset: 3px;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 20px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
border: 1px solid $less-main-color;
|
||||||
|
top: -$border-offset;
|
||||||
|
left: -$border-offset;
|
||||||
|
border-right: none;
|
||||||
|
border-bottom: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 50px;
|
||||||
|
height: 20px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
border: 1px solid $less-main-color;
|
||||||
|
bottom: -$border-offset;
|
||||||
|
right: -$border-offset;
|
||||||
|
border-left: none;
|
||||||
|
border-top: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
|
||||||
|
&::after,
|
||||||
|
&::before {
|
||||||
|
width: calc(100% + $border-offset);
|
||||||
|
height: calc(100% + $border-offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-search-fieldset {
|
||||||
|
.layui-input-inline {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.layui-form-item:not(:last-child) {
|
||||||
|
margin-right: 10px;
|
||||||
|
@extend .box-border-line;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-label {
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-pane .layui-form-label {
|
||||||
|
background-color: $cover-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-container .table-search-fieldset {
|
||||||
|
color: $main-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-select,
|
||||||
|
.layui-form-autocomplete {
|
||||||
|
dl {
|
||||||
|
|
||||||
|
color: $main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
|
||||||
|
dd {
|
||||||
|
&.layui-this {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $less-main-color !important;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-iconpicker-item,
|
||||||
|
.layui-iconpicker-item:hover {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
color: $black-color;
|
||||||
|
|
||||||
|
.layui-iconpicker-icon:hover {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-nav-child {
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-badge,
|
||||||
|
.layui-badge-dot,
|
||||||
|
.layui-badge-rim {
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-child a:hover {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool-panel {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"] span {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tool-panel li:hover {
|
||||||
|
background-color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-side.layui-bg-black,
|
||||||
|
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
|
||||||
|
.layuimini-menu-left-zoom>ul {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-side {
|
||||||
|
border-right: 1px solid $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-blue {
|
||||||
|
background-color: #0000ff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-orange {
|
||||||
|
background-color: $yellow-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-green {
|
||||||
|
background-color: $green-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-hover {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-grid-down {
|
||||||
|
background-color: $black-color;
|
||||||
|
color: $main-color;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table-tips-main {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layui-header .layuimini-tool i {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-red {
|
||||||
|
color: $red-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this span {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card {
|
||||||
|
|
||||||
|
background-color: $cover-color;
|
||||||
|
border-radius: 0;
|
||||||
|
|
||||||
|
@extend .box-border-line;
|
||||||
|
|
||||||
|
.layui-card-header {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-text {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-qiuck-module {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
a i {
|
||||||
|
background-color: $cover-color;
|
||||||
|
color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a cite {
|
||||||
|
color: $active-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
a i {
|
||||||
|
background-color: $active-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a cite {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-bg-number {
|
||||||
|
background-color: $cover-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input,
|
||||||
|
.layui-select,
|
||||||
|
.layui-textarea,
|
||||||
|
.city-picker-span,
|
||||||
|
.main-input {
|
||||||
|
background-color: $cover-color;
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.city-picker-span>.title>span {
|
||||||
|
color: $main-color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-radio:hover *,
|
||||||
|
.layui-form-radioed,
|
||||||
|
.layui-form-radioed>i {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
background-color: $main-color;
|
||||||
|
color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input:focus,
|
||||||
|
.layui-textarea:focus {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input:hover,
|
||||||
|
.layui-textarea:hover {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-badge-rim,
|
||||||
|
.layui-border,
|
||||||
|
.layui-colla-content,
|
||||||
|
.layui-colla-item,
|
||||||
|
.layui-collapse,
|
||||||
|
.layui-elem-field,
|
||||||
|
.layui-form-pane .layui-form-item[pane],
|
||||||
|
.layui-form-pane .layui-form-label,
|
||||||
|
.layui-input,
|
||||||
|
.layui-layedit,
|
||||||
|
.layui-layedit-tool,
|
||||||
|
.layui-panel,
|
||||||
|
.layui-quote-nm,
|
||||||
|
.layui-select,
|
||||||
|
.layui-tab-bar,
|
||||||
|
.layui-tab-card,
|
||||||
|
.layui-tab-title,
|
||||||
|
.layui-tab-title .layui-this::after,
|
||||||
|
.layui-textarea {
|
||||||
|
border-color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-input-inline input,
|
||||||
|
.form-search .layui-input-inline select {
|
||||||
|
border-width: 0 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-tool .layui-nav-child {
|
||||||
|
border-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-child a {
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-item {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-upload .layuimini-upload-btn {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer {
|
||||||
|
border: 1px solid $main-color;
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title {
|
||||||
|
background-color: $plus-main-color !important;
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.layui-table td,
|
||||||
|
.layui-table th,
|
||||||
|
.layui-table-col-set,
|
||||||
|
.layui-table-fixed-r,
|
||||||
|
.layui-table-grid-down,
|
||||||
|
.layui-table-header,
|
||||||
|
.layui-table-page,
|
||||||
|
.layui-table-tips-main,
|
||||||
|
.layui-table-tool,
|
||||||
|
.layui-table-total,
|
||||||
|
.layui-table-view,
|
||||||
|
.layui-table[lay-skin="line"],
|
||||||
|
.layui-table[lay-skin="row"] {
|
||||||
|
border-color: $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-table tbody tr:hover,
|
||||||
|
.layui-table thead tr,
|
||||||
|
.layui-table-click,
|
||||||
|
.layui-table-header,
|
||||||
|
.layui-table-hover,
|
||||||
|
.layui-table-mend,
|
||||||
|
.layui-table-patch,
|
||||||
|
.layui-table-tool,
|
||||||
|
.layui-table-total,
|
||||||
|
.layui-table-total tr {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hr-line {
|
||||||
|
color: $main-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
background-color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn {
|
||||||
|
background-color: $black-color;
|
||||||
|
border-top: 1px solid $less-main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
|
||||||
|
background-color: $main-color;
|
||||||
|
border-color: $less-main-color;
|
||||||
|
color: $main-color !important;
|
||||||
|
clip-path: $box-shape;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn a {
|
||||||
|
@extend .layui-btn
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-shade {
|
||||||
|
background-color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left {
|
||||||
|
.layui-nav-tree .layui-nav-item {
|
||||||
|
|
||||||
|
margin: 5px;
|
||||||
|
width: calc(100% - 10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-item {
|
||||||
|
clip-path: $box-shape;
|
||||||
|
color: $main-color;
|
||||||
|
background-color: $active-color;
|
||||||
|
|
||||||
|
&.layui-this a {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-this {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
span {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-nav .layui-nav-item a:hover {
|
||||||
|
background-color: $active-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
|
||||||
|
color: $main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-item a span {
|
||||||
|
color: $main-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-item:hover a span {
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layout-admin .layuimini-logo {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
|
||||||
|
background-color: $black-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
|
||||||
|
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
|
||||||
|
background-color: $main-color !important;
|
||||||
|
color: $black-color !important;
|
||||||
|
|
||||||
|
.layui-left-nav {
|
||||||
|
color: $black-color !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-iconpicker-icon {
|
||||||
|
border-color: $less-main-color !important;
|
||||||
|
background-color: $less-main-color !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-iconpicker .layui-anim {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-iconpicker .layui-iconpicker-list {
|
||||||
|
background-color: $black-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-header .layui-nav .layui-nav-child dd.layui-this a,
|
||||||
|
.layui-header .layui-nav-child dd.layui-this,
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
|
||||||
|
background-color: $active-color !important;
|
||||||
|
}
|
||||||
288
public/static/admin/css/themes/_win7.scss
Normal file
288
public/static/admin/css/themes/_win7.scss
Normal file
@@ -0,0 +1,288 @@
|
|||||||
|
& {
|
||||||
|
color: #222;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-btn {
|
||||||
|
background: linear-gradient(180deg, #eee 45%, #ddd 0, #bbb);
|
||||||
|
border: 1.5px solid #888;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: inset 0 -1px 1px hsla(0, 0%, 100%, .8), inset 0 1px 1px #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #222;
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: linear-gradient(180deg, #e5f4fd 45%, #b3e0f9 0);
|
||||||
|
border-color: #72a2c5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn a {
|
||||||
|
@extend .layui-btn;
|
||||||
|
color: #222 !important;
|
||||||
|
|
||||||
|
height: 26px;
|
||||||
|
line-height: 26px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-title {
|
||||||
|
background: linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4 !important;
|
||||||
|
border: 1px solid rgba(0, 0, 0, .6);
|
||||||
|
border-radius: 6px 6px 0 0;
|
||||||
|
// box-shadow : inset 0 0 .5px .5px #fff;
|
||||||
|
|
||||||
|
height: 27px;
|
||||||
|
line-height: 27px;
|
||||||
|
|
||||||
|
color: #000 !important;
|
||||||
|
letter-spacing: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
|
||||||
|
|
||||||
|
padding: 0 80px 0 8px;
|
||||||
|
|
||||||
|
border: 0;
|
||||||
|
box-shadow: inset 0 .5px #fff;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title~.layui-layer-setwin {
|
||||||
|
height: 27px !important;
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-title~.layui-layer-setwin>span {
|
||||||
|
height: 20px !important;
|
||||||
|
line-height: 20px !important;
|
||||||
|
|
||||||
|
background: linear-gradient(hsla(0, 0%, 100%, .3), hsla(0, 0%, 100%, .3) 45%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .1) 75%, hsla(0, 0%, 100%, .5)) !important;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
border-bottom-right-radius: 0px;
|
||||||
|
border-right: 1px solid rgba(0, 0, 0, .6);
|
||||||
|
box-shadow: inset 0 0 0 .5px #eee;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
margin-left: 0;
|
||||||
|
|
||||||
|
min-width: 26px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: radial-gradient(circle at 50% 100%, #2aceda, transparent 60%), linear-gradient(#a9d2e8 50%, #196c9b 0) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border: 0;
|
||||||
|
border-bottom-right-radius: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-bottom-left-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-layer-close1 {
|
||||||
|
background-color: #d04a37 !important;
|
||||||
|
min-width: 45px !important;
|
||||||
|
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
filter: contrast(1.3);
|
||||||
|
background-image: linear-gradient(hsla(0, 0%, 100%, .3), hsla(0, 0%, 100%, .3) 45%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .1) 75%, hsla(0, 0%, 100%, .5)) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-dialog {
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-iframe {
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer:not(.layui-layer-loading) {
|
||||||
|
|
||||||
|
.layui-layer-content {
|
||||||
|
background: #f0f0f0;
|
||||||
|
border: 1px solid rgba(0, 0, 0, .6);
|
||||||
|
box-shadow: 0 -1px 1px .5px #fff;
|
||||||
|
margin: 0 6px 0 6px;
|
||||||
|
padding: 6px;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, .7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4;
|
||||||
|
border-radius: 6px;
|
||||||
|
content: "";
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&.layui-layer-iframe {
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
height: calc(100% + 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-layer-easy .layui-layer-btn {
|
||||||
|
background: #f0f0f0;
|
||||||
|
border: 1px solid rgba(0, 0, 0, .6);
|
||||||
|
box-shadow: 0 0 1px .5px #fff;
|
||||||
|
margin: 0 6px 6px;
|
||||||
|
padding: 6px;
|
||||||
|
border-top: 0;
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card {
|
||||||
|
|
||||||
|
border: 1px solid rgba(0, 0, 0, .6);
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 0 5px 1px rgba(0, 0, 0, .6);
|
||||||
|
font: 9pt Segoe UI, sans-serif;
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, .7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4;
|
||||||
|
border-radius: 6px;
|
||||||
|
content: "";
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layui-card-header {
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4;
|
||||||
|
border-radius: 6px 6px 0 0;
|
||||||
|
font: 9pt Segoe UI, sans-serif;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 6px;
|
||||||
|
border: 0;
|
||||||
|
box-shadow: inset 0 .5px #fff;
|
||||||
|
height: 15px;
|
||||||
|
|
||||||
|
color: #000;
|
||||||
|
letter-spacing: 0;
|
||||||
|
line-height: 15px;
|
||||||
|
text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-card-body {
|
||||||
|
background: #f0f0f0;
|
||||||
|
border: 1px solid rgba(0, 0, 0, .6);
|
||||||
|
box-shadow: 0 0 1px .5px #fff;
|
||||||
|
margin: 0 6px 6px;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.layui-tab-brief>.layui-tab-title .layui-this {
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-tab .layui-tab-control>li {
|
||||||
|
height: 27px !important;
|
||||||
|
line-height: 27px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checkbox[lay-skin="primary"] i {
|
||||||
|
background: #ddd;
|
||||||
|
border: 1px solid #888;
|
||||||
|
box-shadow: inset 0 0 0 1.5px #eee, inset 0 2px 4px #888, inset -2px -3px 4px #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
height: 13px;
|
||||||
|
margin-right: 6px;
|
||||||
|
width: 13px;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-checked[lay-skin="primary"] i {
|
||||||
|
color: #16638f;
|
||||||
|
border-color: #888;
|
||||||
|
display: block;
|
||||||
|
font-weight: 700;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-radio:hover *,
|
||||||
|
.layui-form-radioed,
|
||||||
|
.layui-form-radioed>i {
|
||||||
|
color: #16638f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input {
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-top-color: rgb(204, 204, 204);
|
||||||
|
border-radius: 2px;
|
||||||
|
border-top-color: #888;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font: 9pt Segoe UI, sans-serif;
|
||||||
|
padding: 3px 4px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-input,
|
||||||
|
.layui-select,
|
||||||
|
.layui-textarea {
|
||||||
|
height: unset
|
||||||
|
}
|
||||||
|
|
||||||
|
.layui-form-label {
|
||||||
|
padding: 3px 15px;
|
||||||
|
font: 9pt Segoe UI, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.layuimini-form>.layui-form-item .required::after {
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-input-inline input,
|
||||||
|
.form-search .layui-input-inline select {
|
||||||
|
height: unset;
|
||||||
|
line-height: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-search .layui-form-label {
|
||||||
|
height: unset;
|
||||||
|
background: unset;
|
||||||
|
text-align: right;
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layuimini-upload-btn {
|
||||||
|
.layui-btn {
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
95
public/static/admin/css/themes/default.css
Normal file
95
public/static/admin/css/themes/default.css
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
/*头部右侧背景色 headerRightBg */
|
||||||
|
.layui-layout-admin .layui-header {
|
||||||
|
background-color: #ffffff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*头部右侧选中背景色 headerRightBgThis */
|
||||||
|
.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
|
||||||
|
background-color: #e4e4e4 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*头部右侧字体颜色 headerRightColor */
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
|
||||||
|
color: rgba(107, 107, 107, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**头部右侧下拉字体颜色 headerRightChildColor */
|
||||||
|
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
|
||||||
|
color: rgba(107, 107, 107, 0.7) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*头部右侧鼠标选中 headerRightColorThis */
|
||||||
|
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
|
||||||
|
color: #565656 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*头部右侧更多下拉颜色 headerRightNavMore */
|
||||||
|
.layui-header .layui-nav .layui-nav-more {
|
||||||
|
border-top-color: rgba(160, 160, 160, 0.7) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*头部右侧更多下拉颜色 headerRightNavMore */
|
||||||
|
.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {
|
||||||
|
border-color: transparent transparent rgba(160, 160, 160, 0.7) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */
|
||||||
|
.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
|
||||||
|
background-color: #1E9FFF !important;
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*头部缩放按钮样式 headerRightToolColor */
|
||||||
|
.layui-layout-admin .layui-header .layuimini-tool i {
|
||||||
|
color: #565656;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*logo背景颜色 headerLogoBg */
|
||||||
|
.layui-layout-admin .layuimini-logo {
|
||||||
|
background-color: #192027 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*logo字体颜色 headerLogoColor */
|
||||||
|
.layui-layout-admin .layuimini-logo h1 {
|
||||||
|
color: rgb(191, 187, 187);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单更多下拉样式 leftMenuNavMore */
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more {
|
||||||
|
border-top-color: rgb(191, 187, 187);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单更多下拉样式 leftMenuNavMore */
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {
|
||||||
|
border-color: transparent transparent rgb(191, 187, 187) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单背景 leftMenuBg */
|
||||||
|
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {
|
||||||
|
background-color: #28333E !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单选中背景 leftMenuBgThis */
|
||||||
|
.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
|
||||||
|
background-color: #1E9FFF !important
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单子菜单背景 leftMenuChildBg */
|
||||||
|
.layuimini-menu-left .layui-nav-itemed > .layui-nav-child {
|
||||||
|
background-color: #0c0f13 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单字体颜色 leftMenuColor */
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
|
||||||
|
color: rgb(191, 187, 187) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*左侧菜单选中字体颜色 leftMenuColorThis */
|
||||||
|
.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**tab选项卡选中颜色 tabActiveColor */
|
||||||
|
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
|
||||||
|
background-color: #1e9fff;
|
||||||
|
}
|
||||||
3050
public/static/admin/css/themes/index.css
Normal file
3050
public/static/admin/css/themes/index.css
Normal file
File diff suppressed because it is too large
Load Diff
41
public/static/admin/css/themes/index.scss
Normal file
41
public/static/admin/css/themes/index.scss
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
.elem-style-normal {
|
||||||
|
@import 'normal';
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem-style-demo {
|
||||||
|
@import 'demo';
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem-style-sicfi {
|
||||||
|
@import 'sicfi';
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem-style-gtk {
|
||||||
|
@import 'gtk';
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem-style-nes {
|
||||||
|
@import 'nes';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.elem-style-win7 {
|
||||||
|
@import 'win7';
|
||||||
|
}
|
||||||
|
.elem-style-neomorphic {
|
||||||
|
@import 'neomorphic';
|
||||||
|
}
|
||||||
|
.elem-style-dark {
|
||||||
|
@import 'dark';
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "ark-pixel";
|
||||||
|
src : url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf') format('truetype'),
|
||||||
|
url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf') format('truetype'),
|
||||||
|
url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf') format('truetype'),
|
||||||
|
url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf') format('truetype'),
|
||||||
|
url('./nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf') format('truetype'),
|
||||||
|
url('./nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf') format('truetype'),
|
||||||
|
url('./nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf') format('truetype');
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
Copyright (c) 2021, TakWolf (https://ark-pixel-font.takwolf.com),
|
||||||
|
with Reserved Font Name 'Ark Pixel'.
|
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
This license is copied below, and is also available with a FAQ at:
|
||||||
|
http://scripts.sil.org/OFL
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
PREAMBLE
|
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||||
|
development of collaborative font projects, to support the font creation
|
||||||
|
efforts of academic and linguistic communities, and to provide a free and
|
||||||
|
open framework in which fonts may be shared and improved in partnership
|
||||||
|
with others.
|
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely as long as they are not sold by themselves. The
|
||||||
|
fonts, including any derivative works, can be bundled, embedded,
|
||||||
|
redistributed and/or sold with any software provided that any reserved
|
||||||
|
names are not used by derivative works. The fonts and derivatives,
|
||||||
|
however, cannot be released under any other type of license. The
|
||||||
|
requirement for fonts to remain under this license does not apply
|
||||||
|
to any document created using the fonts or their derivatives.
|
||||||
|
|
||||||
|
DEFINITIONS
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this license and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the
|
||||||
|
copyright statement(s).
|
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as
|
||||||
|
distributed by the Copyright Holder(s).
|
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to a
|
||||||
|
new environment.
|
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical
|
||||||
|
writer or other person who contributed to the Font Software.
|
||||||
|
|
||||||
|
PERMISSION & CONDITIONS
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||||
|
redistribute, and sell modified and unmodified copies of the Font
|
||||||
|
Software, subject to the following conditions:
|
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components,
|
||||||
|
in Original or Modified Versions, may be sold by itself.
|
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled,
|
||||||
|
redistributed and/or sold with any software, provided that each copy
|
||||||
|
contains the above copyright notice and this license. These can be
|
||||||
|
included either as stand-alone text files, human-readable headers or
|
||||||
|
in the appropriate machine-readable metadata fields within text or
|
||||||
|
binary files as long as those fields can be easily viewed by the user.
|
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font
|
||||||
|
Name(s) unless explicit written permission is granted by the corresponding
|
||||||
|
Copyright Holder. This restriction only applies to the primary font name as
|
||||||
|
presented to the users.
|
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||||
|
Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except to acknowledge the contribution(s) of the
|
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||||
|
permission.
|
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole,
|
||||||
|
must be distributed entirely under this license, and must not be
|
||||||
|
distributed under any other license. The requirement for fonts to
|
||||||
|
remain under this license does not apply to any document created
|
||||||
|
using the Font Software.
|
||||||
|
|
||||||
|
TERMINATION
|
||||||
|
This license becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
|
||||||
|
DISCLAIMER
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
.layuimini-qiuck-module a i {
|
.layuimini-qiuck-module a i {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 80%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -48,7 +48,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
display: block;
|
display: block;
|
||||||
color: #666;
|
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -58,6 +57,8 @@
|
|||||||
.welcome-module {
|
.welcome-module {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 210px;
|
height: 210px;
|
||||||
|
max-height: 210px;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel {
|
.panel {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTab"], function ($, ea, echarts, undefined, miniAdmin, miniTab) {
|
define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTheme", "miniTab", "swiper"], function ($, ea, echarts, undefined, miniAdmin, miniTheme, miniTab) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
index: function () {
|
index: function () {
|
||||||
@@ -25,31 +25,17 @@ define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTa
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
layui.form.on('switch(header-theme-mode)', function (data) {
|
|
||||||
let dark_mode = this.checked
|
|
||||||
let that = $('iframe').contents()
|
|
||||||
if (dark_mode) {
|
|
||||||
$('#layuicss-theme-dark').attr({
|
|
||||||
rel: "stylesheet",
|
|
||||||
type: "text/css",
|
|
||||||
href: "/static/admin/css/layui-theme-dark.css"
|
|
||||||
})
|
|
||||||
.appendTo("head");
|
|
||||||
that.find("html").addClass('dark')
|
|
||||||
$('html').addClass('dark')
|
|
||||||
} else {
|
|
||||||
$('#layuicss-theme-dark').attr({
|
|
||||||
rel: "stylesheet",
|
|
||||||
type: "text/css",
|
|
||||||
href: ""
|
|
||||||
})
|
|
||||||
that.find("html").removeClass('dark')
|
|
||||||
$('html').removeClass('dark')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
welcome: function () {
|
welcome: function () {
|
||||||
miniTab.listen();
|
miniTab.listen();
|
||||||
|
|
||||||
|
new Swiper('.mySwiper', {
|
||||||
|
pagination: {
|
||||||
|
el: '.swiper-pagination',
|
||||||
|
clickable: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看公告信息
|
* 查看公告信息
|
||||||
**/
|
**/
|
||||||
@@ -156,10 +142,22 @@ define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTa
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
editAdmin: function () {
|
editAdmin: function () {
|
||||||
|
let form = layui.form
|
||||||
|
form.on('radio(loginType-filter)', function (data) {
|
||||||
|
let elem = data.elem
|
||||||
|
let value = elem.value
|
||||||
|
if (value === '2') {
|
||||||
|
let width = screen.width < 768 ? '85%' : '60%'
|
||||||
|
ea.open('绑定谷歌验证码', ea.url('index/set2fa'), width, '75%')
|
||||||
|
}
|
||||||
|
});
|
||||||
ea.listen();
|
ea.listen();
|
||||||
},
|
},
|
||||||
editPassword: function () {
|
editPassword: function () {
|
||||||
ea.listen();
|
ea.listen();
|
||||||
}
|
},
|
||||||
|
set2fa: function () {
|
||||||
|
ea.listen();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
define(["easy-admin"], function (ea) {
|
define(["jquery", "easy-admin"], function ($, ea) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
index: function () {
|
index: function () {
|
||||||
@@ -7,7 +7,7 @@ define(["easy-admin"], function (ea) {
|
|||||||
}
|
}
|
||||||
$(function () {
|
$(function () {
|
||||||
if (backgroundUrl) {
|
if (backgroundUrl) {
|
||||||
$('.container').css('background', 'url(' + backgroundUrl + ') 0% 0% / cover no-repeat')
|
$('body').css('background', 'url(' + backgroundUrl + ') 0% 0% / cover no-repeat')
|
||||||
}
|
}
|
||||||
$('.bind-password').on('click', function () {
|
$('.bind-password').on('click', function () {
|
||||||
if ($(this).hasClass('icon-5')) {
|
if ($(this).hasClass('icon-5')) {
|
||||||
@@ -39,6 +39,12 @@ define(["easy-admin"], function (ea) {
|
|||||||
window.location = ea.url('index');
|
window.location = ea.url('index');
|
||||||
})
|
})
|
||||||
}, function (res) {
|
}, function (res) {
|
||||||
|
let data = res.data
|
||||||
|
if (data.is_ga_code) {
|
||||||
|
let elem = $('#gaCode')
|
||||||
|
elem.removeClass('layui-hide');
|
||||||
|
elem.find('input').focus()
|
||||||
|
}
|
||||||
ea.msg.error(res.msg, function () {
|
ea.msg.error(res.msg, function () {
|
||||||
$('#refreshCaptcha').trigger("click");
|
$('#refreshCaptcha').trigger("click");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -42,6 +42,14 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
{field: 'virtual_sales', width: 100, title: '虚拟销量'},
|
{field: 'virtual_sales', width: 100, title: '虚拟销量'},
|
||||||
{field: 'sales', width: 80, title: '销量'},
|
{field: 'sales', width: 80, title: '销量'},
|
||||||
{field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch},
|
{field: 'status', title: '状态', width: 85, selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch},
|
||||||
|
// 演示多选,实际数据库并无 status2 字段,搜索后会报错
|
||||||
|
{
|
||||||
|
field: 'status2', title: '演示多选', width: 105, search: 'xmSelect', selectList: {1: '模拟选项1', 2: '模拟选项2', 3: '模拟选项3', 4: '模拟选项4', 5: '模拟选项5'},
|
||||||
|
searchOp: 'in', templet: function (res) {
|
||||||
|
// 根据自己实际项目进行输出
|
||||||
|
return res?.status2 || '模拟数据'
|
||||||
|
}
|
||||||
|
},
|
||||||
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
||||||
{
|
{
|
||||||
width: 250,
|
width: 250,
|
||||||
@@ -49,6 +57,10 @@ define(["jquery", "easy-admin"], function ($, ea) {
|
|||||||
templet: ea.table.tool,
|
templet: ea.table.tool,
|
||||||
operat: [
|
operat: [
|
||||||
[{
|
[{
|
||||||
|
templet: function (d) {
|
||||||
|
return `<button type="button" class="layui-btn layui-btn-xs">自定义 ${d.id}</button>`
|
||||||
|
}
|
||||||
|
}, {
|
||||||
text: '编辑',
|
text: '编辑',
|
||||||
url: init.edit_url,
|
url: init.edit_url,
|
||||||
method: 'open',
|
method: 'open',
|
||||||
|
|||||||
@@ -1,89 +1,107 @@
|
|||||||
define(["jquery", "easy-admin"], function ($, ea) {
|
define(["jquery", "easy-admin"], function ($, ea) {
|
||||||
|
|
||||||
var init = {
|
var init = {
|
||||||
table_elem: '#currentTable',
|
table_elem: '#currentTable',
|
||||||
table_render_id: 'currentTableRenderId',
|
table_render_id: 'currentTableRenderId',
|
||||||
index_url: 'system.auth/index',
|
index_url: 'system.auth/index',
|
||||||
add_url: 'system.auth/add',
|
add_url: 'system.auth/add',
|
||||||
edit_url: 'system.auth/edit',
|
edit_url: 'system.auth/edit',
|
||||||
delete_url: 'system.auth/delete',
|
delete_url: 'system.auth/delete',
|
||||||
export_url: 'system.auth/export',
|
export_url: 'system.auth/export',
|
||||||
modify_url: 'system.auth/modify',
|
modify_url: 'system.auth/modify',
|
||||||
authorize_url: 'system.auth/authorize',
|
authorize_url: 'system.auth/authorize',
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
index: function () {
|
index: function () {
|
||||||
ea.table.render({
|
ea.table.render({
|
||||||
init: init,
|
init: init,
|
||||||
cols: [[
|
cols: [[
|
||||||
{type: "checkbox"},
|
{type: "checkbox"},
|
||||||
{field: 'id', width: 80, title: 'ID', searchOp: '='},
|
{field: 'id', width: 80, title: 'ID', searchOp: '='},
|
||||||
{field: 'sort', width: 80, title: '排序', edit: 'text'},
|
{field: 'sort', width: 80, title: '排序', edit: 'text'},
|
||||||
{field: 'title', minWidth: 80, title: '权限名称'},
|
{field: 'title', minWidth: 80, title: '权限名称'},
|
||||||
{field: 'remark', minWidth: 80, title: '备注信息'},
|
{field: 'remark', minWidth: 80, title: '备注信息'},
|
||||||
{field: 'status', title: '状态', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch},
|
{field: 'status', title: '状态', width: 85, search: 'select', selectList: {0: '禁用', 1: '启用'}, templet: ea.table.switch},
|
||||||
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
{field: 'create_time', minWidth: 80, title: '创建时间', search: 'range'},
|
||||||
{
|
{
|
||||||
width: 250,
|
width: 250,
|
||||||
title: '操作',
|
title: '操作',
|
||||||
templet: ea.table.tool,
|
templet: ea.table.tool,
|
||||||
operat: [
|
operat: [
|
||||||
'edit',
|
'edit',
|
||||||
[{
|
[{
|
||||||
text: '授权',
|
text: '授权',
|
||||||
url: init.authorize_url,
|
url: init.authorize_url,
|
||||||
method: 'open',
|
method: 'open',
|
||||||
auth: 'authorize',
|
auth: 'authorize',
|
||||||
class: 'layui-btn layui-btn-normal layui-btn-xs',
|
class: 'layui-btn layui-btn-normal layui-btn-xs',
|
||||||
}],
|
}],
|
||||||
'delete'
|
'delete'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]],
|
]],
|
||||||
});
|
|
||||||
|
|
||||||
ea.listen();
|
|
||||||
},
|
|
||||||
add: function () {
|
|
||||||
ea.listen();
|
|
||||||
},
|
|
||||||
edit: function () {
|
|
||||||
ea.listen();
|
|
||||||
},
|
|
||||||
authorize: function () {
|
|
||||||
var tree = layui.tree;
|
|
||||||
|
|
||||||
ea.request.get(
|
|
||||||
{
|
|
||||||
url: window.location.href,
|
|
||||||
}, function (res) {
|
|
||||||
res.data = res.data || [];
|
|
||||||
tree.render({
|
|
||||||
elem: '#node_ids',
|
|
||||||
data: res.data,
|
|
||||||
showCheckbox: true,
|
|
||||||
id: 'nodeDataId',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
ea.listen(function (data) {
|
|
||||||
var checkedData = tree.getChecked('nodeDataId');
|
|
||||||
var ids = [];
|
|
||||||
$.each(checkedData, function (i, v) {
|
|
||||||
ids.push(v.id);
|
|
||||||
if (v.children !== undefined && v.children.length > 0) {
|
|
||||||
$.each(v.children, function (ii, vv) {
|
|
||||||
ids.push(vv.id);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
data.node = JSON.stringify(ids);
|
|
||||||
return data;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
ea.listen();
|
||||||
|
},
|
||||||
|
add: function () {
|
||||||
|
ea.listen();
|
||||||
|
},
|
||||||
|
edit: function () {
|
||||||
|
ea.listen();
|
||||||
|
},
|
||||||
|
authorize: function () {
|
||||||
|
|
||||||
|
let setting = {
|
||||||
|
check: {
|
||||||
|
enable: true,
|
||||||
|
chkStyle: "checkbox",
|
||||||
|
},
|
||||||
|
view: {
|
||||||
|
showIcon: true,
|
||||||
|
showLine: true,
|
||||||
|
selectedMulti: false,
|
||||||
|
dblClickExpand: false
|
||||||
|
}, callback: {
|
||||||
|
onClick: function (e, treeId, treeNode, clickFlag) {
|
||||||
|
treeObj.checkNode(treeNode, !treeNode.checked, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let treeObj
|
||||||
|
let treeData = []
|
||||||
|
ea.request.get({url: window.location.href}, function (res) {
|
||||||
|
res.data = res.data || [];
|
||||||
|
$.each(res.data, function (index, value) {
|
||||||
|
treeData[index] = []
|
||||||
|
treeData[index].id = value.id
|
||||||
|
treeData[index].name = value.title
|
||||||
|
treeData[index].pId = 0
|
||||||
|
treeData[index].open = true
|
||||||
|
let children = value.children
|
||||||
|
treeData[index]['children'] = []
|
||||||
|
$.each(children, function (idx, val) {
|
||||||
|
treeData[index]['children'].push({id: val.id, name: val.title, checked: val.checked, pId: value.id})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
$.fn.zTree.init($("#tree"), setting, treeData);
|
||||||
|
treeObj = $.fn.zTree.getZTreeObj("tree");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
ea.listen(function (data) {
|
||||||
|
let checkedData = treeObj.getCheckedNodes();
|
||||||
|
let ids = []
|
||||||
|
for (var i = 0; i < checkedData.length; i++) {
|
||||||
|
ids.push(checkedData[i].id)
|
||||||
|
}
|
||||||
|
data.node = JSON.stringify(ids);
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
});
|
)
|
||||||
|
|||||||
@@ -1,31 +1,37 @@
|
|||||||
body{
|
body {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
h1{
|
|
||||||
|
h1 {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
h1 img{
|
|
||||||
|
h1 img {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #3C5675;
|
color: #3C5675;
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
}
|
}
|
||||||
.content{
|
|
||||||
|
.content {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.content p{
|
|
||||||
|
.content p {
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
.content form{
|
|
||||||
margin:0 auto;
|
.content form {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
margin-bottom: 20px;
|
margin: 0 auto 20px;
|
||||||
}
|
}
|
||||||
.content form .bg{
|
|
||||||
|
.content form .bg {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
@@ -33,51 +39,68 @@ h2 {
|
|||||||
padding: 14px 14px;
|
padding: 14px 14px;
|
||||||
box-shadow: 0 0 8px #cccccc;
|
box-shadow: 0 0 8px #cccccc;
|
||||||
}
|
}
|
||||||
.content form .layui-form-item:last-child{
|
|
||||||
margin-bottom:0!important;
|
.content form .bg .layui-card {
|
||||||
|
background-color: #fafafa;
|
||||||
|
color: #ff8080;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.content form .layui-btn{
|
|
||||||
|
.content form .layui-form-item:last-child {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content form .layui-btn {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.content .layui-elem-field legend{
|
|
||||||
|
.content .layui-elem-field legend {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #8a8a8a;
|
color: #8a8a8a;
|
||||||
}
|
}
|
||||||
.content .tips{
|
|
||||||
|
.content .tips {
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #eca6a6
|
color: #eca6a6
|
||||||
}
|
}
|
||||||
.content .admin-tips{
|
|
||||||
|
.content .admin-tips {
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #eca6a6
|
color: #eca6a6
|
||||||
}
|
}
|
||||||
.content .desc{
|
|
||||||
|
.content .desc {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #4E5465;
|
color: #4E5465;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
.content .desc a{
|
|
||||||
|
.content .desc a {
|
||||||
color: #07adeb;
|
color: #07adeb;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.content .desc a:first-child{
|
|
||||||
|
.content .desc a:first-child {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
.error{
|
|
||||||
|
.error {
|
||||||
background: #D83E3E;
|
background: #D83E3E;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
@media screen and (max-width:768px) {
|
|
||||||
.content form{
|
@media screen and (max-width: 768px) {
|
||||||
|
.content form {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,10 @@ require.config({
|
|||||||
"tableSelect": ["plugs/lay-module/tableSelect/tableSelect"],
|
"tableSelect": ["plugs/lay-module/tableSelect/tableSelect"],
|
||||||
"iconPickerFa": ["plugs/lay-module/iconPicker/iconPickerFa"],
|
"iconPickerFa": ["plugs/lay-module/iconPicker/iconPickerFa"],
|
||||||
"autocomplete": ["plugs/lay-module/autocomplete/autocomplete"],
|
"autocomplete": ["plugs/lay-module/autocomplete/autocomplete"],
|
||||||
|
"xmSelect": ["plugs/xmSelect/xm-select"],
|
||||||
"vue": ["plugs/vue-2.6.10/vue.min"],
|
"vue": ["plugs/vue-2.6.10/vue.min"],
|
||||||
|
"swiper": ["plugs/swiper/swiper-bundle.min"],
|
||||||
|
"colorMode": ["plugs/colorMode/colorMode"],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
186
public/static/plugs/colorMode/colorMode.js
Normal file
186
public/static/plugs/colorMode/colorMode.js
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
define(['jquery'], function (colorMode) {
|
||||||
|
// 'use strict';
|
||||||
|
|
||||||
|
/** @type {jQuery}*/
|
||||||
|
var $ = layui.jquery;
|
||||||
|
|
||||||
|
var MOD_NAME = 'colorMode';
|
||||||
|
var defaultWindow = window;
|
||||||
|
var document = defaultWindow.document;
|
||||||
|
|
||||||
|
var colorMode = {
|
||||||
|
/**
|
||||||
|
* @typedef {object} initOptions
|
||||||
|
* @prop {string} [selector="html"] - 应用于目标元素的 CSS 选择器
|
||||||
|
* @prop {string} [attribute="class"] - 应用于目标元素的 HTML 属性
|
||||||
|
* @prop {string} [initialValue='auto'] - 初始颜色模式
|
||||||
|
* @prop {Object.<string, string>} [modes]- 颜色模式。value 为添加到 HTML 属性上的值
|
||||||
|
* @prop {(mode: string, defaultHandler: (window?: Window) => void) => void} [onChanged] - 用于处理更新的自定义处理程序,指定时,默认行为将被覆盖。
|
||||||
|
* @prop {Storage} [storage=localStorage] - 将数据持久化到 localStorage/sessionStorage 的键。传递 `null` 以禁用持久性
|
||||||
|
* @prop {string | null} [storageKey='color-scheme'] - 持久化使用的 key
|
||||||
|
* @prop {boolean} [disableTransition=true] - 禁用切换时的过渡 {@link https://paco.me/writing/disable-theme-transitions}
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {initOptions} options
|
||||||
|
* @returns {{mode: () => string; setMode: (mode: string, window?: Window) => void; }}
|
||||||
|
*/
|
||||||
|
init: function (options) {
|
||||||
|
var defaults = {
|
||||||
|
selector: 'html',
|
||||||
|
attribute: 'class',
|
||||||
|
initialValue: 'auto',
|
||||||
|
modes: {
|
||||||
|
auto: '',
|
||||||
|
light: 'light',
|
||||||
|
dark: 'dark',
|
||||||
|
},
|
||||||
|
storage: localStorage,
|
||||||
|
storageKey: 'color-scheme',
|
||||||
|
disableTransition: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
var opts = $.extend(true, {}, defaults, options);
|
||||||
|
|
||||||
|
// 当前颜色模式
|
||||||
|
var state;
|
||||||
|
// 系统颜色模式
|
||||||
|
var system;
|
||||||
|
// 初始化 storage
|
||||||
|
var store =
|
||||||
|
opts.storageKey == null
|
||||||
|
? opts.initialValue
|
||||||
|
: (function () {
|
||||||
|
var v = opts.storage.getItem(opts.storageKey);
|
||||||
|
if (!v) {
|
||||||
|
opts.storage.setItem(opts.storageKey, opts.initialValue);
|
||||||
|
return opts.initialValue;
|
||||||
|
}
|
||||||
|
return v;
|
||||||
|
})();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新 HTML 属性值
|
||||||
|
* @param {String} selector
|
||||||
|
* @param {String} attribute
|
||||||
|
* @param {String} value
|
||||||
|
* @param {Window} win
|
||||||
|
*/
|
||||||
|
var updateHTMLAttrs = function (selector, attribute, value, win) {
|
||||||
|
win = win || defaultWindow;
|
||||||
|
var document = win.document;
|
||||||
|
var el = typeof selector === 'string' ? document.querySelector(selector) : undefined;
|
||||||
|
if (!el) return;
|
||||||
|
|
||||||
|
/**@type HTMLStyleElement */
|
||||||
|
var style;
|
||||||
|
|
||||||
|
if (opts.disableTransition) {
|
||||||
|
style = document.createElement('style');
|
||||||
|
style.appendChild(
|
||||||
|
document.createTextNode(
|
||||||
|
'*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
document.head.appendChild(style);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attribute === 'class') {
|
||||||
|
var current = value.split(/\s/g);
|
||||||
|
$.each(opts.modes, function (_, modeval) {
|
||||||
|
$.each((modeval || '').split(/\s/g), function (_, v) {
|
||||||
|
if (!v) return;
|
||||||
|
if (current.indexOf(v) !== -1) {
|
||||||
|
el.classList.add(v);
|
||||||
|
} else {
|
||||||
|
el.classList.remove(v);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
el.setAttribute(attribute, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opts.disableTransition) {
|
||||||
|
// 调用 getComputedStyle 强制浏览器重绘
|
||||||
|
// @ts-expect-error 未使用的变量
|
||||||
|
var _ = window.getComputedStyle(style).opacity;
|
||||||
|
document.head.removeChild(style);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新状态
|
||||||
|
* @param {String} mode - 颜色模式
|
||||||
|
*/
|
||||||
|
var updateState = function (mode) {
|
||||||
|
store = opts.storageKey == null ? mode : opts.storage.getItem(opts.storageKey);
|
||||||
|
state = store === 'auto' ? system : store;
|
||||||
|
};
|
||||||
|
|
||||||
|
var prefersColorScheme = function () {
|
||||||
|
var isSupported = window && 'matchMedia' in window && typeof window.matchMedia === 'function';
|
||||||
|
if (!isSupported) {
|
||||||
|
system = 'light';
|
||||||
|
onChanged(system);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var darkThemeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
||||||
|
var update = function () {
|
||||||
|
var preferredDark = darkThemeMediaQuery.matches;
|
||||||
|
system = preferredDark ? 'dark' : 'light';
|
||||||
|
onChanged(system);
|
||||||
|
};
|
||||||
|
update();
|
||||||
|
if ('addEventListener' in darkThemeMediaQuery) {
|
||||||
|
darkThemeMediaQuery.addEventListener('change', update);
|
||||||
|
} else {
|
||||||
|
// @ts-ignore 已弃用
|
||||||
|
darkThemeMediaQuery.addListener(update);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
prefersColorScheme();
|
||||||
|
|
||||||
|
function defaultOnChanged(win) {
|
||||||
|
updateHTMLAttrs(opts.selector, opts.attribute, opts.modes[state], win);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onChanged(mode, win) {
|
||||||
|
updateState(mode);
|
||||||
|
if (opts.onChanged) {
|
||||||
|
opts.onChanged(state, defaultOnChanged);
|
||||||
|
} else {
|
||||||
|
defaultOnChanged(win);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
status:system,
|
||||||
|
setMode: function (mode, win) {
|
||||||
|
if (opts.storageKey) {
|
||||||
|
opts.storage.setItem(opts.storageKey, mode);
|
||||||
|
}
|
||||||
|
onChanged(mode, win);
|
||||||
|
},
|
||||||
|
mode: function () {
|
||||||
|
return state;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
addStyle: function (id, cssStr) {
|
||||||
|
var el = /** @type {HTMLStyleElement} */ (document.getElementById(id) || document.createElement('style'));
|
||||||
|
if (!el.isConnected) {
|
||||||
|
el.type = 'text/css';
|
||||||
|
el.id = id;
|
||||||
|
document.head.appendChild(el);
|
||||||
|
}
|
||||||
|
el.textContent = cssStr;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return colorMode;
|
||||||
|
});
|
||||||
@@ -1,4 +1,15 @@
|
|||||||
define(["jquery", "tableSelect"], function ($, tableSelect) {
|
define(["jquery", "tableSelect", "miniTheme", "xmSelect"], function ($, tableSelect, miniTheme, xmSelect) {
|
||||||
|
|
||||||
|
//切换日夜模式
|
||||||
|
window.onInitElemStyle = function () {
|
||||||
|
miniTheme.renderElemStyle();
|
||||||
|
$('iframe').each(function (index, iframe) {
|
||||||
|
if (typeof iframe.contentWindow.onInitElemStyle == "function") {
|
||||||
|
iframe.contentWindow.onInitElemStyle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
window.onInitElemStyle();
|
||||||
|
|
||||||
var form = layui.form,
|
var form = layui.form,
|
||||||
layer = layui.layer,
|
layer = layui.layer,
|
||||||
@@ -20,7 +31,9 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
upload_url: 'ajax/upload',
|
upload_url: 'ajax/upload',
|
||||||
upload_exts: 'doc|gif|ico|icon|jpg|mp3|mp4|p12|pem|png|rar',
|
upload_exts: 'doc|gif|ico|icon|jpg|mp3|mp4|p12|pem|png|rar',
|
||||||
csrf_token: window.CONFIG.CSRF_TOKEN,
|
csrf_token: window.CONFIG.CSRF_TOKEN,
|
||||||
wait_submit: false
|
wait_submit: false,
|
||||||
|
xmSelectList: {},
|
||||||
|
xmSelectModel: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -370,6 +383,15 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
'</div>';
|
'</div>';
|
||||||
break;
|
break;
|
||||||
|
case 'xmSelect':
|
||||||
|
formHtml += '\t<div class="layui-form-item layui-inline">\n' +
|
||||||
|
'<label class="layui-form-label">' + d.title + '</label>\n' +
|
||||||
|
'<div class="layui-input-inline">\n' +
|
||||||
|
'<div id="c-' + d.fieldAlias + '" class="tableSearch-xmSelect xmSelect-' + d.fieldAlias + '" name="' + d.fieldAlias + '" data-search-op="' + d.searchOp + '"></div>\n' +
|
||||||
|
'</div>\n' +
|
||||||
|
'</div>';
|
||||||
|
init.xmSelectList[d.fieldAlias] = d.selectList
|
||||||
|
break;
|
||||||
case 'range':
|
case 'range':
|
||||||
d.searchOp = 'range';
|
d.searchOp = 'range';
|
||||||
formHtml += '\t<div class="layui-form-item layui-inline">\n' +
|
formHtml += '\t<div class="layui-form-item layui-inline">\n' +
|
||||||
@@ -388,6 +410,15 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
'</div>\n' +
|
'</div>\n' +
|
||||||
'</div>';
|
'</div>';
|
||||||
break;
|
break;
|
||||||
|
case 'date':
|
||||||
|
d.searchOp = '=';
|
||||||
|
formHtml += `<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">${d.title}</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input data-date data-date-type="date" id="c-${d.fieldAlias}" name="${d.fieldAlias}" data-search-op="${d.searchOp}" value="${d.searchValue}" placeholder="${d.searchTip}" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>`
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
newCols.push(d);
|
newCols.push(d);
|
||||||
}
|
}
|
||||||
@@ -652,6 +683,12 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
|
|
||||||
$.each(item, function (i, operat) {
|
$.each(item, function (i, operat) {
|
||||||
if (typeof operat !== 'object') return
|
if (typeof operat !== 'object') return
|
||||||
|
|
||||||
|
if ('function' === typeof operat.templet) {
|
||||||
|
html += operat.templet(data);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
operat.class = operat.class || '';
|
operat.class = operat.class || '';
|
||||||
operat.icon = operat.icon || '';
|
operat.icon = operat.icon || '';
|
||||||
operat.auth = operat.auth || '';
|
operat.auth = operat.auth || '';
|
||||||
@@ -823,6 +860,17 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
listenTableSearch: function (tableId) {
|
listenTableSearch: function (tableId) {
|
||||||
|
if (Object.keys(init.xmSelectList).length > 0) {
|
||||||
|
$.each(init.xmSelectList, function (index, value) {
|
||||||
|
const keysArray = Object.keys(value).map((key) => {
|
||||||
|
return {name: value[key], value: key}
|
||||||
|
})
|
||||||
|
init.xmSelectModel[index] = xmSelect.render({
|
||||||
|
el: '.xmSelect-' + index, language: 'zn', data: keysArray, name: index,
|
||||||
|
filterable: true, paging: true, pageSize: 10, theme: {color: '#16b777'}, toolbar: {show: true},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
form.on('submit(' + tableId + '_filter)', function (data) {
|
form.on('submit(' + tableId + '_filter)', function (data) {
|
||||||
var dataField = data.field;
|
var dataField = data.field;
|
||||||
var formatFilter = {},
|
var formatFilter = {},
|
||||||
@@ -978,9 +1026,17 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
},
|
},
|
||||||
success: function (layero, index) {
|
success: function (layero, index) {
|
||||||
if (window.CONFIG.IFRAME_OPEN_TOP == '1') {
|
if (window.CONFIG.IFRAME_OPEN_TOP == '1') {
|
||||||
|
let iframeUrl = ``
|
||||||
|
try {
|
||||||
|
let iframeId = $('iframe:eq(0)').attr('id')
|
||||||
|
let iframe = document.getElementById(iframeId)
|
||||||
|
iframeUrl = iframe.contentWindow.location.href
|
||||||
|
} catch (e) {
|
||||||
|
iframeUrl = location.href
|
||||||
|
}
|
||||||
let _winTopBtn = `
|
let _winTopBtn = `
|
||||||
<span class="_winTopBtn layui-btn layui-btn-primary layui-btn-xs"
|
<span class="_winTopBtn layui-btn layui-btn-primary layui-btn-xs"
|
||||||
style="position: absolute;top: 14px;right: 120px;color: #fff;border-color: #fff;" onclick="window.open(location.href)">
|
style="position: absolute;top: 14px;right: 120px;color: #fff;border-color: #fff;" onclick="window.open('${iframeUrl}')">
|
||||||
新标签页打开
|
新标签页打开
|
||||||
</span>`
|
</span>`
|
||||||
$('.layui-layer-iframe').append(_winTopBtn)
|
$('.layui-layer-iframe').append(_winTopBtn)
|
||||||
@@ -1155,6 +1211,11 @@ define(["jquery", "tableSelect"], function ($, tableSelect) {
|
|||||||
if (tableId === undefined || tableId === '' || tableId == null) {
|
if (tableId === undefined || tableId === '' || tableId == null) {
|
||||||
tableId = init.table_render_id;
|
tableId = init.table_render_id;
|
||||||
}
|
}
|
||||||
|
if (Object.keys(init.xmSelectModel).length > 0) {
|
||||||
|
$.each(init.xmSelectModel, function (index, value) {
|
||||||
|
init.xmSelectModel[index].setValue([])
|
||||||
|
})
|
||||||
|
}
|
||||||
table.reload(tableId, {
|
table.reload(tableId, {
|
||||||
page: {
|
page: {
|
||||||
curr: 1
|
curr: 1
|
||||||
|
|||||||
2
public/static/plugs/easymde/easymde.min.js
vendored
2
public/static/plugs/easymde/easymde.min.js
vendored
@@ -8184,7 +8184,7 @@
|
|||||||
if (!1 === e.autoDownloadFontAwesome && (t = !1), !0 !== e.autoDownloadFontAwesome) for (var n = document.styleSheets, i = 0; i < n.length; i++) n[i].href && n[i].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/") > -1 && (t = !1);
|
if (!1 === e.autoDownloadFontAwesome && (t = !1), !0 !== e.autoDownloadFontAwesome) for (var n = document.styleSheets, i = 0; i < n.length; i++) n[i].href && n[i].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/") > -1 && (t = !1);
|
||||||
if (t) {
|
if (t) {
|
||||||
var r = document.createElement("link");
|
var r = document.createElement("link");
|
||||||
r.rel = "stylesheet", r.href = "https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css", document.getElementsByTagName("head")[0].appendChild(r)
|
r.rel = "stylesheet", r.href = "/static/plugs/font-awesome-4.7.0/css/font-awesome.min.css", document.getElementsByTagName("head")[0].appendChild(r)
|
||||||
}
|
}
|
||||||
if (e.element) this.element = e.element; else if (null === e.element) return void console.log("EasyMDE: Error. No element was found.");
|
if (e.element) this.element = e.element; else if (null === e.element) return void console.log("EasyMDE: Error. No element was found.");
|
||||||
if (void 0 === e.toolbar) for (var o in e.toolbar = [], te) Object.prototype.hasOwnProperty.call(te, o) && (-1 != o.indexOf("separator-") && e.toolbar.push("|"), (!0 === te[o].default || e.showIcons && e.showIcons.constructor === Array && -1 != e.showIcons.indexOf(o)) && e.toolbar.push(o));
|
if (void 0 === e.toolbar) for (var o in e.toolbar = [], te) Object.prototype.hasOwnProperty.call(te, o) && (-1 != o.indexOf("separator-") && e.toolbar.push("|"), (!0 === te[o].default || e.showIcons && e.showIcons.constructor === Array && -1 != e.showIcons.indexOf(o)) && e.toolbar.push(o));
|
||||||
|
|||||||
@@ -607,7 +607,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-color .more-menu-item {
|
.layuimini-color .more-menu-item {
|
||||||
color: #595959;
|
|
||||||
height: 50px;
|
height: 50px;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -617,10 +616,6 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-color .more-menu-item:hover {
|
|
||||||
background-color: whitesmoke;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layuimini-color .more-menu-item:after {
|
.layuimini-color .more-menu-item:after {
|
||||||
color: #8c8c8c;
|
color: #8c8c8c;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
@@ -700,14 +695,6 @@
|
|||||||
margin-top: -6px !important;
|
margin-top: -6px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layuimini-menu-left .layui-nav .layui-nav-mored,.layuimini-menu-left .layui-nav-itemed>a .layui-nav-more{
|
|
||||||
margin-top: -9px!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layuimini-menu-left-zoom.layui-nav .layui-nav-mored,.layuimini-menu-left-zoom.layui-nav-itemed>a .layui-nav-more{
|
|
||||||
margin-top: -9px!important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layuimini-menu-left .layui-nav-more:before,.layuimini-menu-left-zoom .layui-nav-more:before {
|
.layuimini-menu-left .layui-nav-more:before,.layuimini-menu-left-zoom .layui-nav-more:before {
|
||||||
content: "\e61a";
|
content: "\e61a";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, miniTheme, miniTab) {
|
define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($, miniMenu, miniTheme, miniTab, colorMode) {
|
||||||
|
|
||||||
var $ = layui.$,
|
var $ = layui.$,
|
||||||
layer = layui.layer,
|
layer = layui.layer,
|
||||||
@@ -104,7 +104,7 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, mi
|
|||||||
* @param clearUrl
|
* @param clearUrl
|
||||||
*/
|
*/
|
||||||
renderClear: function (clearUrl) {
|
renderClear: function (clearUrl) {
|
||||||
$('.layuimini-clear').attr('data-href',clearUrl);
|
$('.layuimini-clear').attr('data-href', clearUrl);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,7 +171,7 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, mi
|
|||||||
el.msExitFullscreen();
|
el.msExitFullscreen();
|
||||||
} else if (el.oRequestFullscreen) {
|
} else if (el.oRequestFullscreen) {
|
||||||
el.oCancelFullScreen();
|
el.oCancelFullScreen();
|
||||||
}else if (el.mozCancelFullScreen) {
|
} else if (el.mozCancelFullScreen) {
|
||||||
el.mozCancelFullScreen();
|
el.mozCancelFullScreen();
|
||||||
} else if (el.webkitCancelFullScreen) {
|
} else if (el.webkitCancelFullScreen) {
|
||||||
el.webkitCancelFullScreen();
|
el.webkitCancelFullScreen();
|
||||||
@@ -243,6 +243,92 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, mi
|
|||||||
*/
|
*/
|
||||||
listen: function () {
|
listen: function () {
|
||||||
|
|
||||||
|
layui.form.on('switch(header-theme-mode)', function (data) {
|
||||||
|
let checked = data.elem.checked;
|
||||||
|
let mode = checked ? 'dark' : 'light';
|
||||||
|
changeTheme(mode);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浅色和暗色主题切换
|
||||||
|
*/
|
||||||
|
const theme = colorMode.init({
|
||||||
|
onChanged(mode, defaultHandler) {
|
||||||
|
const isAppearanceTransition =
|
||||||
|
document.startViewTransition && !window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;
|
||||||
|
const isDark = mode === 'dark';
|
||||||
|
//跟随windows系统主题色的变化而变化,但没法保存选择的元素风格
|
||||||
|
// var darkThemeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
||||||
|
// var preferredDark = darkThemeMediaQuery.matches;
|
||||||
|
// var currMode = preferredDark ? 'dark' : 'light';
|
||||||
|
// changeTheme(currMode);
|
||||||
|
$('#change-theme').attr('class', `layui-icon layui-icon-${isDark ? 'moon' : 'light'}`);
|
||||||
|
|
||||||
|
if (!isAppearanceTransition) {
|
||||||
|
defaultHandler();
|
||||||
|
} else {
|
||||||
|
rippleViewTransition(isDark, function () {
|
||||||
|
// 动画需要
|
||||||
|
document.documentElement.classList[isDark ? 'add' : 'remove']('dark');
|
||||||
|
defaultHandler();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
//切换特效
|
||||||
|
function rippleViewTransition(isDark, callback) {
|
||||||
|
// 移植自 https://github.com/vuejs/vitepress/pull/2347
|
||||||
|
// 支持 Chrome 111+
|
||||||
|
const x = event.clientX;
|
||||||
|
const y = event.clientY;
|
||||||
|
const endRadius = Math.hypot(Math.max(x, innerWidth - x), Math.max(y, innerHeight - y));
|
||||||
|
const transition = document.startViewTransition(function () {
|
||||||
|
callback && callback();
|
||||||
|
});
|
||||||
|
transition.ready.then(function () {
|
||||||
|
var clipPath = [`circle(0px at ${x}px ${y}px)`, `circle(${endRadius}px at ${x}px ${y}px)`];
|
||||||
|
document.documentElement.animate(
|
||||||
|
{
|
||||||
|
clipPath: isDark ? clipPath : [...clipPath].reverse(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
duration: 300,
|
||||||
|
easing: 'ease-in',
|
||||||
|
pseudoElement: isDark ? '::view-transition-new(root)' : '::view-transition-old(root)',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//改变主题
|
||||||
|
function changeTheme(mode) {
|
||||||
|
switch (mode) {
|
||||||
|
case 'dark':
|
||||||
|
localStorage.setItem('layuiminiBgColorId', '1');
|
||||||
|
localStorage.setItem('layuiminiElemStyleName', 'dark');
|
||||||
|
changeBgColor(1);
|
||||||
|
break;
|
||||||
|
case 'light':
|
||||||
|
localStorage.setItem('layuiminiBgColorId', '0');
|
||||||
|
localStorage.setItem('layuiminiElemStyleName', 'normal');
|
||||||
|
changeBgColor(0);
|
||||||
|
break
|
||||||
|
}
|
||||||
|
window.onInitElemStyle()
|
||||||
|
}
|
||||||
|
|
||||||
|
//改变配色
|
||||||
|
function changeBgColor(id) {
|
||||||
|
$('.layuimini-color .color-content ul .layui-this').attr('class', '');
|
||||||
|
$(this).attr('class', 'layui-this');
|
||||||
|
localStorage.setItem('layuiminiBgColorId', id);
|
||||||
|
miniTheme.render({
|
||||||
|
bgColorDefault: id,
|
||||||
|
listen: false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清理
|
* 清理
|
||||||
*/
|
*/
|
||||||
@@ -289,14 +375,14 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, mi
|
|||||||
tips = $(this).prop("innerHTML"),
|
tips = $(this).prop("innerHTML"),
|
||||||
isShow = $('.layuimini-tool i').attr('data-side-fold');
|
isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||||
if (isShow == 0 && tips) {
|
if (isShow == 0 && tips) {
|
||||||
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>"+tips+"</li></ul>" ;
|
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>" + tips + "</li></ul>";
|
||||||
window.openTips = layer.tips(tips, $(this), {
|
window.openTips = layer.tips(tips, $(this), {
|
||||||
tips: [2, '#2f4056'],
|
tips: [2, '#2f4056'],
|
||||||
time: 300000,
|
time: 300000,
|
||||||
skin:"popup-tips",
|
skin: "popup-tips",
|
||||||
success:function (el) {
|
success: function (el) {
|
||||||
var left = $(el).position().left - 10 ;
|
var left = $(el).position().left - 10;
|
||||||
$(el).css({ left:left });
|
$(el).css({left: left});
|
||||||
element.render();
|
element.render();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -345,6 +431,5 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, mi
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return miniAdmin;
|
return miniAdmin;
|
||||||
});
|
});
|
||||||
@@ -41,20 +41,20 @@ define(["jquery"], function ($) {
|
|||||||
headerRightBg: '#23262e', //头部右侧背景色
|
headerRightBg: '#23262e', //头部右侧背景色
|
||||||
headerRightBgThis: '#0c0c0c', //头部右侧选中背景色,
|
headerRightBgThis: '#0c0c0c', //头部右侧选中背景色,
|
||||||
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
|
||||||
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
|
headerRightChildColor: 'rgba(255,255,255,.7)', //头部右侧下拉字体颜色,
|
||||||
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
|
headerRightColorThis: 'rgba(255,255,255,.7)', //头部右侧鼠标选中,
|
||||||
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
|
||||||
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
|
||||||
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
|
headerRightNavMoreColor: 'rgba(255,255,255,.7)', //头部右侧更多下拉列表字体色,
|
||||||
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
|
||||||
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
headerLogoBg: '#0c0c0c', //logo背景颜色,
|
||||||
headerLogoColor: '#ffffff', //logo字体颜色,
|
headerLogoColor: 'rgba(255,255,255,.7)', //logo字体颜色,
|
||||||
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
|
||||||
leftMenuBg: '#23262e', //左侧菜单背景,
|
leftMenuBg: '#23262e', //左侧菜单背景,
|
||||||
leftMenuBgThis: '#737373', //左侧菜单选中背景,
|
leftMenuBgThis: '#484849', //左侧菜单选中背景,
|
||||||
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
|
leftMenuChildBg: '#23262e', //左侧菜单子菜单背景,
|
||||||
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
|
leftMenuColor: 'rgba(255,255,255,.9)', //左侧菜单字体颜色,
|
||||||
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
|
leftMenuColorThis: 'rgba(255,255,255,.7)', //左侧菜单选中字体颜色,
|
||||||
tabActiveColor: '#23262e', //tab选项卡选中颜色,
|
tabActiveColor: '#23262e', //tab选项卡选中颜色,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -272,7 +272,7 @@ define(["jquery"], function ($) {
|
|||||||
render: function (options) {
|
render: function (options) {
|
||||||
options.bgColorDefault = options.bgColorDefault || false;
|
options.bgColorDefault = options.bgColorDefault || false;
|
||||||
options.listen = options.listen || false;
|
options.listen = options.listen || false;
|
||||||
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId');
|
var bgcolorId = localStorage.getItem('layuiminiBgColorId');
|
||||||
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') {
|
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') {
|
||||||
bgcolorId = options.bgColorDefault;
|
bgcolorId = options.bgColorDefault;
|
||||||
}
|
}
|
||||||
@@ -280,6 +280,21 @@ define(["jquery"], function ($) {
|
|||||||
if (options.listen) miniTheme.listen(options);
|
if (options.listen) miniTheme.listen(options);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
renderElemStyle(elemStyleDefault) {
|
||||||
|
elemStyleDefault = elemStyleDefault || 'light';
|
||||||
|
let elemStyleName = localStorage.getItem('layuiminiElemStyleName');
|
||||||
|
if (!elemStyleName) elemStyleName = elemStyleDefault;
|
||||||
|
let themeModeEle = $('input[name=theme-mode]')
|
||||||
|
if (themeModeEle.length > 0) {
|
||||||
|
if (elemStyleName == 'dark') {
|
||||||
|
themeModeEle.prop('checked', true);
|
||||||
|
} else {
|
||||||
|
themeModeEle.prop('checked', false);
|
||||||
|
}
|
||||||
|
layui.form.render('checkbox', 'header-theme-mode');
|
||||||
|
}
|
||||||
|
miniTheme.buildBodyElemStyle(elemStyleName);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 构建主题样式
|
* 构建主题样式
|
||||||
* @param bgcolorId
|
* @param bgcolorId
|
||||||
@@ -386,7 +401,85 @@ define(["jquery"], function ($) {
|
|||||||
'}\n';
|
'}\n';
|
||||||
$('#layuimini-bg-color').html(styleHtml);
|
$('#layuimini-bg-color').html(styleHtml);
|
||||||
},
|
},
|
||||||
|
configElemStyle() {
|
||||||
|
var listElemStyle = [
|
||||||
|
{
|
||||||
|
title: '标准',
|
||||||
|
className: 'normal'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '原型',
|
||||||
|
className: 'demo',
|
||||||
|
defaultColorConfig: '12'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '科幻',
|
||||||
|
className: 'sicfi'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'GTK',
|
||||||
|
className: 'gtk'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '像素',
|
||||||
|
className: 'nes',
|
||||||
|
defaultColorConfig: '12'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'WIN7',
|
||||||
|
className: 'win7',
|
||||||
|
defaultColorConfig: '12'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '拟物',
|
||||||
|
className: 'neomorphic',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '暗黑',
|
||||||
|
className: 'dark',
|
||||||
|
defaultColorConfig: '1'
|
||||||
|
|
||||||
|
},
|
||||||
|
]
|
||||||
|
return listElemStyle;
|
||||||
|
},
|
||||||
|
buildBodyElemStyle(className) {
|
||||||
|
|
||||||
|
var listElemStyle = miniTheme.configElemStyle()
|
||||||
|
|
||||||
|
$.each(listElemStyle, function (index, item) {
|
||||||
|
var classNameReal = 'elem-style-' + item.className;
|
||||||
|
if ($('body').hasClass(classNameReal)) {
|
||||||
|
$('body').removeClass(classNameReal);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$('body').addClass('elem-style-' + className)
|
||||||
|
},
|
||||||
|
buildElemStyleHtml(options) {
|
||||||
|
var elemStyleName = localStorage.getItem('layuiminiElemStyleName');
|
||||||
|
if (!elemStyleName) elemStyleName = options.elemStyleDefault;
|
||||||
|
var listElemStyle = miniTheme.configElemStyle()
|
||||||
|
var html = '';
|
||||||
|
$.each(listElemStyle, function (key, val) {
|
||||||
|
|
||||||
|
if (typeof val.defaultColorConfig == 'undefined') {
|
||||||
|
val.defaultColorConfig = '0'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val.className === elemStyleName) {
|
||||||
|
html += '<li class="layui-this style-item" data-select-style="' + val.className + '" data-default-color-config="' + val.defaultColorConfig + '">\n';
|
||||||
|
} else {
|
||||||
|
html += '<li id="' + val.className + '" class="style-item" data-select-style="' + val.className + '" data-default-color-config="' + val.defaultColorConfig + '">\n';
|
||||||
|
}
|
||||||
|
html +=
|
||||||
|
val.title +
|
||||||
|
|
||||||
|
'</li>';
|
||||||
|
});
|
||||||
|
return html;
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 构建主题选择html
|
* 构建主题选择html
|
||||||
* @param options
|
* @param options
|
||||||
@@ -394,7 +487,7 @@ define(["jquery"], function ($) {
|
|||||||
*/
|
*/
|
||||||
buildBgColorHtml: function (options) {
|
buildBgColorHtml: function (options) {
|
||||||
options.bgColorDefault = options.bgColorDefault || 0;
|
options.bgColorDefault = options.bgColorDefault || 0;
|
||||||
var bgcolorId = parseInt(sessionStorage.getItem('layuiminiBgcolorId'));
|
var bgcolorId = parseInt(localStorage.getItem('layuiminiBgColorId'));
|
||||||
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault;
|
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault;
|
||||||
var bgColorConfig = miniTheme.config();
|
var bgColorConfig = miniTheme.config();
|
||||||
var html = '';
|
var html = '';
|
||||||
@@ -457,12 +550,29 @@ define(["jquery"], function ($) {
|
|||||||
var bgcolorId = $(this).attr('data-select-bgcolor');
|
var bgcolorId = $(this).attr('data-select-bgcolor');
|
||||||
$('.layuimini-color .color-content ul .layui-this').attr('class', '');
|
$('.layuimini-color .color-content ul .layui-this').attr('class', '');
|
||||||
$(this).attr('class', 'layui-this');
|
$(this).attr('class', 'layui-this');
|
||||||
sessionStorage.setItem('layuiminiBgcolorId', bgcolorId);
|
localStorage.setItem('layuiminiBgColorId', bgcolorId);
|
||||||
miniTheme.render({
|
miniTheme.render({
|
||||||
bgColorDefault: bgcolorId,
|
bgColorDefault: bgcolorId,
|
||||||
listen: false,
|
listen: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$('body').on('click', '[data-select-style]', function () {
|
||||||
|
var elemStyleName = $(this).attr('data-select-style');
|
||||||
|
|
||||||
|
$(this).attr('class', 'layui-this').siblings().removeClass('layui-this');
|
||||||
|
|
||||||
|
var defaultColorConfig = $(this).attr('data-default-color-config');
|
||||||
|
|
||||||
|
if (defaultColorConfig && defaultColorConfig.length > 0) {
|
||||||
|
localStorage.setItem('layuiminiBgColorId', defaultColorConfig);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('layuiminiElemStyleName', elemStyleName);
|
||||||
|
miniTheme.render({
|
||||||
|
listen: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
13
public/static/plugs/swiper/swiper-bundle.min.css
vendored
Normal file
13
public/static/plugs/swiper/swiper-bundle.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
17
public/static/plugs/swiper/swiper-bundle.min.js
vendored
Normal file
17
public/static/plugs/swiper/swiper-bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user