Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
303612eed9 | ||
![]() |
dcb1f4d13c | ||
![]() |
44ddc8c3a8 | ||
![]() |
70f6f8a471 | ||
![]() |
2a45df71cd | ||
![]() |
eabeb705c4 |
@@ -1,12 +1,12 @@
|
||||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi-Vue3-FastAPI v1.0.2</h1>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi-Vue3-FastAPI v1.0.3</h1>
|
||||
<h4 align="center">基于RuoYi-Vue3+FastAPI前后端分离的快速开发框架</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/stargazers"><img src="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/badge/star.svg?theme=dark"></a>
|
||||
<a href="https://github.com/insistence/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/github/stars/insistence/RuoYi-Vue3-FastAPI?style=social"></a>
|
||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/badge/RuoYiVue3FastAPI-v1.0.2-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/badge/RuoYiVue3FastAPI-v1.0.3-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
<img src="https://img.shields.io/badge/python-≥3.8-blue">
|
||||
<img src="https://img.shields.io/badge/MySQL-≥5.7-blue">
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
## 平台简介
|
||||
|
||||
RuoYi-Vue-FastAPI是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# 应用运行环境
|
||||
APP_ENV = 'dev'
|
||||
# 应用名称
|
||||
APP_NAME = 'RuoYi-FasAPI'
|
||||
APP_NAME = 'RuoYi-FastAPI'
|
||||
# 应用代理路径
|
||||
APP_ROOT_PATH = '/dev-api'
|
||||
# 应用主机
|
||||
@@ -10,7 +10,7 @@ APP_HOST = '0.0.0.0'
|
||||
# 应用端口
|
||||
APP_PORT = 9099
|
||||
# 应用版本
|
||||
APP_VERSION= '1.0.2'
|
||||
APP_VERSION= '1.0.3'
|
||||
# 应用是否开启热重载
|
||||
APP_RELOAD = true
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# 应用运行环境
|
||||
APP_ENV = 'prod'
|
||||
# 应用名称
|
||||
APP_NAME = 'RuoYi-FasAPI'
|
||||
APP_NAME = 'RuoYi-FastAPI'
|
||||
# 应用代理路径
|
||||
APP_ROOT_PATH = '/prod-api'
|
||||
# 应用主机
|
||||
@@ -10,7 +10,7 @@ APP_HOST = '0.0.0.0'
|
||||
# 应用端口
|
||||
APP_PORT = 9099
|
||||
# 应用版本
|
||||
APP_VERSION= '1.0.2'
|
||||
APP_VERSION= '1.0.3'
|
||||
# 应用是否开启热重载
|
||||
APP_RELOAD = false
|
||||
|
||||
|
@@ -56,6 +56,7 @@ class LoginService:
|
||||
:param login_user: 登录用户对象
|
||||
:return: 校验结果
|
||||
"""
|
||||
await cls.__check_login_ip(request)
|
||||
account_lock = await request.app.state.redis.get(
|
||||
f"{RedisInitKeyConfig.ACCOUNT_LOCK.get('key')}:{login_user.user_name}")
|
||||
if login_user.user_name == account_lock:
|
||||
@@ -100,6 +101,21 @@ class LoginService:
|
||||
f"{RedisInitKeyConfig.PASSWORD_ERROR_COUNT.get('key')}:{login_user.user_name}")
|
||||
return user
|
||||
|
||||
@classmethod
|
||||
async def __check_login_ip(cls, request: Request):
|
||||
"""
|
||||
校验用户登录ip是否在黑名单内
|
||||
:param request: Request对象
|
||||
:return: 校验结果
|
||||
"""
|
||||
black_ip_value = await request.app.state.redis.get(
|
||||
f"{RedisInitKeyConfig.SYS_CONFIG.get('key')}:sys.login.blackIPList")
|
||||
black_ip_list = black_ip_value.split(',') if black_ip_value else []
|
||||
if request.headers.get('X-Forwarded-For') in black_ip_list:
|
||||
logger.warning("当前IP禁止登录")
|
||||
raise LoginException(data="", message="当前IP禁止登录")
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
async def __check_login_captcha(cls, request: Request, login_user: UserLogin):
|
||||
"""
|
||||
@@ -229,14 +245,16 @@ class LoginService:
|
||||
if permission.menu_type == 'M':
|
||||
router_list_data['name'] = permission.path.capitalize()
|
||||
router_list_data['hidden'] = False if permission.visible == '0' else True
|
||||
if permission.is_frame == 1:
|
||||
router_list_data['redirect'] = 'noRedirect'
|
||||
if permission.parent_id == 0:
|
||||
router_list_data['component'] = 'Layout'
|
||||
router_list_data['path'] = f'/{permission.path}'
|
||||
else:
|
||||
router_list_data['component'] = 'ParentView'
|
||||
router_list_data['path'] = permission.path
|
||||
if permission.is_frame == 1:
|
||||
router_list_data['redirect'] = 'noRedirect'
|
||||
else:
|
||||
router_list_data['path'] = permission.path
|
||||
if children:
|
||||
router_list_data['alwaysShow'] = True
|
||||
router_list_data['children'] = children
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vfadmin",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "vfadmin管理系统",
|
||||
"author": "insistence",
|
||||
"license": "MIT",
|
||||
|
@@ -152,8 +152,8 @@
|
||||
</span>
|
||||
</template>
|
||||
<el-radio-group v-model="form.isFrame">
|
||||
<el-radio label="0">是</el-radio>
|
||||
<el-radio label="1">否</el-radio>
|
||||
<el-radio :label="0">是</el-radio>
|
||||
<el-radio :label="1">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -220,8 +220,8 @@
|
||||
</span>
|
||||
</template>
|
||||
<el-radio-group v-model="form.isCache">
|
||||
<el-radio label="0">缓存</el-radio>
|
||||
<el-radio label="1">不缓存</el-radio>
|
||||
<el-radio :label="0">缓存</el-radio>
|
||||
<el-radio :label="1">不缓存</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
Reference in New Issue
Block a user