Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lakernote
EasyAdmin
提交
5a7c2971
E
EasyAdmin
项目概览
lakernote
/
EasyAdmin
9 个月 前同步成功
通知
14
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
EasyAdmin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5a7c2971
编写于
8月 05, 2021
作者:
lakernote
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
(新增)[前端](改用更简单的adminui)
上级
108a8833
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
99 addition
and
223 deletion
+99
-223
README.md
README.md
+3
-1
src/main/java/com/laker/admin/module/sys/controller/LoginController.java
...om/laker/admin/module/sys/controller/LoginController.java
+12
-0
src/main/java/com/laker/admin/module/sys/controller/LoginDto.java
.../java/com/laker/admin/module/sys/controller/LoginDto.java
+1
-0
web/Pear-Admin-Layui-3.8.10/LICENSE
web/Pear-Admin-Layui-3.8.10/LICENSE
+0
-21
web/Pear-Admin-Layui-3.8.10/README.md
web/Pear-Admin-Layui-3.8.10/README.md
+0
-134
web/Pear-Admin-Layui-3.8.10/login.html
web/Pear-Admin-Layui-3.8.10/login.html
+83
-67
未找到文件。
README.md
浏览文件 @
5a7c2971
...
...
@@ -4,7 +4,9 @@
easy,easy,easy,打造一个简单、轻量级的后台管理系统脚手架。
#### 软件架构
前端:https://gitee.com/zhongshaofa/layuimini
前端:
-
https://gitee.com/zhongshaofa/layuimini
-
https://gitee.com/pear-admin/Pear-Admin-Layui
#### 安装教程
...
...
src/main/java/com/laker/admin/module/sys/controller/LoginController.java
浏览文件 @
5a7c2971
...
...
@@ -3,13 +3,17 @@ package com.laker.admin.module.sys.controller;
import
cn.dev33.satoken.annotation.SaCheckLogin
;
import
cn.dev33.satoken.annotation.SaCheckPermission
;
import
cn.dev33.satoken.stp.StpUtil
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
import
com.laker.admin.framework.Response
;
import
com.laker.admin.framework.repeatedsubmit.RepeatSubmitLimit
;
import
com.laker.admin.module.sys.entity.SysUser
;
import
com.laker.admin.module.sys.service.ISysUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -21,6 +25,8 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
public
class
LoginController
{
@Autowired
ISysUserService
sysUserService
;
@PostMapping
(
"/api/v1/login"
)
@ApiOperationSupport
(
order
=
1
)
...
...
@@ -28,6 +34,12 @@ public class LoginController {
public
Response
login
(
@RequestBody
LoginDto
loginDto
)
{
log
.
info
(
"login {}"
,
loginDto
);
// 单机版:在map中创建了会话,token id等映射关系 // 写入cookie
SysUser
sysUser
=
sysUserService
.
getOne
(
Wrappers
.<
SysUser
>
lambdaQuery
()
.
eq
(
SysUser:
:
getUserName
,
loginDto
.
getUsername
())
.
eq
(
SysUser:
:
getPassword
,
loginDto
.
getPassword
()));
if
(
sysUser
==
null
)
{
return
Response
.
error
(
"5001"
,
"用户名或密码不正确"
);
}
StpUtil
.
setLoginId
(
1
);
return
Response
.
ok
(
StpUtil
.
getTokenInfo
());
}
...
...
src/main/java/com/laker/admin/module/sys/controller/LoginDto.java
浏览文件 @
5a7c2971
...
...
@@ -7,4 +7,5 @@ public class LoginDto {
private
String
username
;
private
String
password
;
private
String
captchaCode
;
}
web/Pear-Admin-Layui-3.8.10/LICENSE
已删除
100644 → 0
浏览文件 @
108a8833
MIT License
Copyright (c) 2020 就眠儀式
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
web/Pear-Admin-Layui-3.8.10/README.md
已删除
100644 → 0
浏览文件 @
108a8833
<div
align=
"center"
>
<br/>
<br/>
<img
src=
"admin/images/logo.png"
width=
"90px"
style=
"margin-top:30px;"
/>
<h1
align=
"center"
>
Pear Admin Layui
</h1>
<h4
align=
"center"
>
开 箱 即 用 的 前 后 端 解 决 方 案
</h4>
[
预 览
](
http://layui.pearadmin.com
)
|
[
官 网
](
http://www.pearadmin.com/
)
|
[
群聊
](
https://jq.qq.com/?_wv=1027&k=5OdSmve
)
|
[
社区
](
http://forum.pearadmin.com/
)
|
[
文档
](
http://www.pearadmin.com/doc
)
</div>
<p
align=
"center"
>
<a
href=
"#"
>
<img
src=
"https://img.shields.io/badge/Pear Admin Layui-3.7.8+-green.svg"
alt=
"Pear Admin Layui Version"
>
</a>
<a
href=
"#"
>
<img
src=
"https://img.shields.io/badge/JQuery-2.0+-green.svg"
alt=
"Jquery Version"
>
</a>
<a
href=
"#"
>
<img
src=
"https://img.shields.io/badge/Layui-2.6.4+-green.svg"
alt=
"Layui Version"
>
</a>
</p>
<br>
<div
align=
"center"
>
<img
width=
"92%"
style=
"border-radius:10px;margin-top:20px;margin-bottom:20px;box-shadow: 2px 0 6px gray;"
src=
"admin/images/show.png"
/>
</div>
<br>
#### 项目介绍
<p
style=
"padding:10px;"
width=
"90%"
>
基于 Layui 的后台管理系统模板,扩展Layui原生UI样式,大量开源组件,提供便捷快速的开发方式,延续 LayuiAdmin 的设计风格。基于异步Ajax的菜单构建,多标签页,单标签页的共存,多主题,多布局切换,为开发者提供相对完善的开发方案,只为成为更好的轮子,项目不定时更新
</p>
#### 项目结构
```
Pear Admin Layui
│
├─admin 资源
│ │
│ ├─css 样式
│ │
│ ├─data 数据
│ │
│ └─images 图片
│
├─component 组件
│ │
│ ├─code 设计器
│ │
│ ├─layui 框架
│ │
│ └─pear 封装
│
├─config 配置
│ │
│ ├─pear.config.yml 配置文件
│ │
│ └─pear.config.json 配置文件
│
├─view 视图
│ │
│ ├─console 首页
│ │
│ ├─document 文档
│ │
│ ├─echarts 图表
│ │
│ ├─error 错误页
│ │
│ ├─result 结果页
│ │
│ └─system 系统管理
│
├─index 入口
│
└─login 登录
```
#### 开源地址
<p
style=
"padding:10px;"
width=
"90%"
>
Gitee 开源地址 : https://gitee.com/pear-admin/Pear-Admin-Layui
GitHub 开源地址 :https://github.com/PearAdmin/pear-admin-layui
</p>
#### 项目截图
| | |
|---------------------|---------------------|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/221841_9d135fe6_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/221901_b5282417_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/221920_84f71864_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/221953_eacb1578_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222007_334b5411_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222020_ed5e67ac_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222105_9a1036c6_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222116_50936543_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222150_6251bb30_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222206_777ccf74_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222315_712d2942_4835367.png
"屏幕截图.png"
)
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222345_2629d03c_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222410_e83792fa_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222431_5b884442_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222453_b02034b2_4835367.png
"屏幕截图.png"
)
| !
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222508_fec3ad5e_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222533_abda701e_4835367.png
"屏幕截图.png"
)
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222547_db49f0b8_4835367.png
"屏幕截图.png"
)
|
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222611_7ffd378b_4835367.png
"屏幕截图.png"
)
|!
[
输入图片说明
](
https://images.gitee.com/uploads/images/2021/0331/222625_55e092f3_4835367.png
"屏幕截图.png"
)
|
#### Star 趋势
[
![Giteye chart
](
https://chart.giteye.net/gitee/pear-admin/Pear-Admin-Layui/MZ26N8HL.png
)
](https://giteye.net/chart/MZ26N8HL)
#### 开源贡献
<p
style=
"padding:10px;"
width=
"90%"
>
1.
欢迎提交
[
pull request
](
https://gitee.com/pear-admin/Pear-Admin-Layui/pulls
)
,注意对应提交对应
`master`
分支
2.
欢迎提交
[
issue
](
https://gitee.com/pear-admin/Pear-Admin-Layui/issues
)
,请写清楚遇到问题的原因、开发环境、复显步骤。
</p>
感谢每一位贡献代码的朋友。
[
![Giteye chart
](
https://chart.giteye.net/gitee/pear-admin/Pear-Admin-Layui/RSZTK22D.png
)
](https://giteye.net/chart/RSZTK22D)
如果对您有帮助,您可以点右上角 💘Star💘支持
web/Pear-Admin-Layui-3.8.10/login.html
浏览文件 @
5a7c2971
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Login Page
</title>
<!-- 样 式 文 件 -->
<link
rel=
"stylesheet"
href=
"component/pear/css/pear.css"
/>
<link
rel=
"stylesheet"
href=
"admin/css/other/login.css"
/>
</head>
<!-- 代 码 结 构 -->
<body
background=
"admin/images/background.svg"
style=
"background-size: cover;"
>
<form
class=
"layui-form"
action=
"javascript:void(0);"
>
<div
class=
"layui-form-item"
>
<img
class=
"logo"
src=
"admin/images/logo.png"
/>
<div
class=
"title"
>
Pear Admin
</div>
<div
class=
"desc"
>
明 湖 区 最 具 影 响 力 的 设 计 规 范 之 一
</div>
</div>
<div
class=
"layui-form-item"
>
<input
placeholder=
"账 户 : admin "
lay-verify=
"required"
hover
class=
"layui-input"
/>
</div>
<div
class=
"layui-form-item"
>
<input
placeholder=
"密 码 : admin "
lay-verify=
"required"
hover
class=
"layui-input"
/>
</div>
<div
class=
"layui-form-item"
>
<input
placeholder=
"验证码 : "
hover
lay-verify=
"required"
class=
"code layui-input layui-input-inline"
/>
<img
src=
"admin/images/captcha.gif"
class=
"codeImage"
/>
</div>
<div
class=
"layui-form-item"
>
<input
type=
"checkbox"
name=
""
title=
"记住密码"
lay-skin=
"primary"
checked
>
</div>
<div
class=
"layui-form-item"
>
<button
type=
"button"
class=
"pear-btn pear-btn-success login"
lay-submit
lay-filter=
"login"
>
登 入
</button>
</div>
</form>
<!-- 资 源 引 入 -->
<script
src=
"component/layui/layui.js"
></script>
<script
src=
"component/pear/pear.js"
></script>
<script>
layui
.
use
([
'
form
'
,
'
button
'
,
'
popup
'
],
function
()
{
var
form
=
layui
.
form
;
var
button
=
layui
.
button
;
var
popup
=
layui
.
popup
;
// 登 录 提 交
form
.
on
(
'
submit(login)
'
,
function
(
data
)
{
/// 验证
/// 登录
/// 动画
button
.
load
({
elem
:
'
.login
'
,
time
:
1500
,
done
:
function
()
{
popup
.
success
(
"
登录成功
"
,
function
()
{
location
.
href
=
"
index.html
"
});
}
})
return
false
;
});
})
</script>
</body>
<head>
<meta
charset=
"utf-8"
>
<title>
Login Page
</title>
<!-- 样 式 文 件 -->
<link
rel=
"stylesheet"
href=
"component/pear/css/pear.css"
/>
<link
rel=
"stylesheet"
href=
"admin/css/other/login.css"
/>
</head>
<!-- 代 码 结 构 -->
<body
background=
"admin/images/background.svg"
style=
"background-size: cover;"
>
<form
class=
"layui-form"
action=
"javascript:void(0);"
>
<div
class=
"layui-form-item"
>
<img
class=
"logo"
src=
"admin/images/logo.png"
/>
<div
class=
"title"
>
Easy Admin
</div>
<div
class=
"desc"
>
easy easy easy 打造最易入门的admin脚手架
</div>
</div>
<div
class=
"layui-form-item"
>
<input
placeholder=
"账 户 : 输入账号"
name=
"username"
lay-verify=
"required"
hover
class=
"layui-input"
/>
</div>
<div
class=
"layui-form-item"
>
<input
placeholder=
"密 码 : 输入密码 "
name=
"password"
lay-verify=
"required"
hover
class=
"layui-input"
type=
"password"
/>
</div>
<div
class=
"layui-form-item"
>
<input
placeholder=
"验证码 : "
hover
name=
"captchaCode"
lay-verify=
"required"
class=
"code layui-input layui-input-inline"
/>
<img
src=
"admin/images/captcha.gif"
class=
"codeImage"
/>
</div>
<div
class=
"layui-form-item"
>
<input
type=
"checkbox"
name=
""
title=
"记住密码"
lay-skin=
"primary"
checked
>
</div>
<div
class=
"layui-form-item"
>
<button
type=
"button"
class=
"pear-btn pear-btn-success login"
lay-submit
lay-filter=
"login"
>
登 入
</button>
</div>
</form>
<!-- 资 源 引 入 -->
<script
src=
"component/layui/layui.js"
></script>
<script
src=
"component/pear/pear.js"
></script>
<script>
layui
.
use
([
'
form
'
,
'
button
'
,
'
popup
'
,
'
jquery
'
],
function
()
{
var
form
=
layui
.
form
;
var
button
=
layui
.
button
;
var
popup
=
layui
.
popup
;
let
$
=
layui
.
jquery
;
// 登 录 提 交
form
.
on
(
'
submit(login)
'
,
function
(
data
)
{
/// 验证
console
.
log
(
data
);
/// 登录
$
.
ajax
({
url
:
EasyAdminContext
.
url
+
'
/api/v1/login
'
,
data
:
JSON
.
stringify
(
data
.
field
),
dataType
:
'
json
'
,
contentType
:
'
application/json
'
,
type
:
'
post
'
,
success
:
function
(
result
)
{
if
(
result
.
success
)
{
// 动画
button
.
load
({
elem
:
'
.login
'
,
time
:
500
,
done
:
function
()
{
popup
.
success
(
"
登录成功
"
,
function
()
{
location
.
href
=
"
index.html
"
});
}
})
}
else
{
layer
.
msg
(
result
.
msg
,
{
icon
:
2
,
time
:
1000
,
area
:
[
'
200px
'
,
'
90px
'
]}
);
}
}
})
return
false
;
});
})
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录