diff --git a/backend/README.md b/backend/README.md index 7033ae7827caef59108367ccab4eb69d3acd8be4..90123dd9e2d248874bcd52fb83b66aa499df3541 100644 --- a/backend/README.md +++ b/backend/README.md @@ -12,11 +12,11 @@ DATABASE_HOST = "127.0.0.1" # 数据库端口 DATABASE_PORT = 3306 # 数据库用户名 -DATABASE_USER = "fuadmin" +DATABASE_USER = "benadmin" # 数据库密码 -DATABASE_PASSWORD = "fuadmin" +DATABASE_PASSWORD = "benadmin" # 数据库名 -DATABASE_NAME = "fu-fastapi-vue" +DATABASE_NAME = "ben-fastapi-vue" ``` ### 3. 设置迁移环境 #### 3.1 在alembic下创建`versions`文件夹 diff --git a/backend/__pycache__/main.cpython-310.pyc b/backend/__pycache__/main.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f732099ad361cbb067e1b1c63468cec9df503e34 Binary files /dev/null and b/backend/__pycache__/main.cpython-310.pyc differ diff --git a/backend/alembic.ini b/backend/alembic.ini index da7c4d8951c80e13c8572b676665309552bfc454..88b5f7f949be576daa1e79d1227054567930ba2b 100644 --- a/backend/alembic.ini +++ b/backend/alembic.ini @@ -60,8 +60,9 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne # are written from script.py.mako # output_encoding = utf-8 -sqlalchemy.url = postgresql://fuadmin:fuadmin@124.222.210.96:5432/fu-fastapi-vue -# sqlalchemy.url = mysql://fuadmin:fuadmin@127.0.0.1:3306/fu-fastapi-vue +# sqlalchemy.url = postgresql://fuadmin:fuadmin@124.222.210.96:5432/ben-fastapi-vue +sqlalchemy.url = mysql://benadmin:benadmin@127.0.0.1:3306/ben-fastapi-vue +# sqlalchemy.url = sqlite:///db/sqlitedb.db [post_write_hooks] # post_write_hooks defines scripts or Python functions that are run diff --git a/backend/alembic/__pycache__/env.cpython-310.pyc b/backend/alembic/__pycache__/env.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39ca48bad4bb154ff91baf0f293f6e233c1f4377 Binary files /dev/null and b/backend/alembic/__pycache__/env.cpython-310.pyc differ diff --git a/backend/alembic/script.py.mako b/backend/alembic/script.py.mako index fbc4b07dcef98b20c6f96b642097f35e8433258e..8193789da4a765e33c91283d2ba6a24c54298e69 100644 --- a/backend/alembic/script.py.mako +++ b/backend/alembic/script.py.mako @@ -9,6 +9,7 @@ from typing import Sequence, Union from alembic import op import sqlalchemy as sa +import common ${imports if imports else ""} # revision identifiers, used by Alembic. diff --git a/backend/common/__pycache__/__init__.cpython-310.pyc b/backend/common/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3cf90b1c2e8973ff5c22e71bf908da94190c1e99 Binary files /dev/null and b/backend/common/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/common/__pycache__/fu_async_crud.cpython-310.pyc b/backend/common/__pycache__/fu_async_crud.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..61ee88ac8114421b1b9a23aed8f01cb8d006c1a3 Binary files /dev/null and b/backend/common/__pycache__/fu_async_crud.cpython-310.pyc differ diff --git a/backend/common/__pycache__/fu_auth.cpython-310.pyc b/backend/common/__pycache__/fu_auth.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..502e8bf0c2f95442969651e5ec745a507830e92a Binary files /dev/null and b/backend/common/__pycache__/fu_auth.cpython-310.pyc differ diff --git a/backend/common/__pycache__/fu_middleware.cpython-310.pyc b/backend/common/__pycache__/fu_middleware.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2abc9a6f8411390203e77fcc9e246eafea6ef838 Binary files /dev/null and b/backend/common/__pycache__/fu_middleware.cpython-310.pyc differ diff --git a/backend/common/__pycache__/fu_model.cpython-310.pyc b/backend/common/__pycache__/fu_model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f25d095b632a90d8bebc48932af948e3ce381974 Binary files /dev/null and b/backend/common/__pycache__/fu_model.cpython-310.pyc differ diff --git a/backend/common/__pycache__/fu_pagination.cpython-310.pyc b/backend/common/__pycache__/fu_pagination.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c1ad78485dcf2e69b902f0a5c1f918b73151d64 Binary files /dev/null and b/backend/common/__pycache__/fu_pagination.cpython-310.pyc differ diff --git a/backend/common/__pycache__/fu_schema.cpython-310.pyc b/backend/common/__pycache__/fu_schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..037e3f787d8e077bee4f55356028dd6ca5962bd0 Binary files /dev/null and b/backend/common/__pycache__/fu_schema.cpython-310.pyc differ diff --git a/backend/common/fu_middleware.py b/backend/common/fu_middleware.py index 5eee64e7e3bb4746e3a17c1cfc891f8d0f8cd90f..d89f910f012c1c28ae94eef316ac6c3d7cba6d80 100644 --- a/backend/common/fu_middleware.py +++ b/backend/common/fu_middleware.py @@ -49,15 +49,18 @@ class JWTAuthBackend(AuthenticationBackend): raise AuthenticationError("Invalid authentication credentials") from e -class LogOperationMiddleware(BaseHTTPMiddleware): +class LogOperationMiddleware(BaseHTTPMiddleware):#(BaseHTTPMiddleware): async def dispatch(self, request: Request, call_next): response = await call_next(request) path: str = request.get("path") if path in WHITE_LIST: return response - user = request.user + user = getattr(request, 'user', None)#request.user + # user = get_request_user(request) + + # user = await get_user_by_token(request) info = { - "request_username": user.username, + "request_username":user.username, "request_ip": getattr(request, "request_ip", "unknown"), "request_method": request.method, "request_path": path, diff --git a/backend/common/utils/__pycache__/excel_utils.cpython-310.pyc b/backend/common/utils/__pycache__/excel_utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ef81b3a5f7d18901615b1b72954e56fafd4616e Binary files /dev/null and b/backend/common/utils/__pycache__/excel_utils.cpython-310.pyc differ diff --git a/backend/common/utils/__pycache__/list_to_tree.cpython-310.pyc b/backend/common/utils/__pycache__/list_to_tree.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ef0778bc6c020930ea25cdfb2ccfe9ffebc7980 Binary files /dev/null and b/backend/common/utils/__pycache__/list_to_tree.cpython-310.pyc differ diff --git a/backend/common/utils/__pycache__/request_util.cpython-310.pyc b/backend/common/utils/__pycache__/request_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f07767d5446c3c0820cef3a67edbb6a8072c5b4a Binary files /dev/null and b/backend/common/utils/__pycache__/request_util.cpython-310.pyc differ diff --git a/backend/common/utils/__pycache__/system.cpython-310.pyc b/backend/common/utils/__pycache__/system.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7738b4f3e9365a44ac8bf7db8e5d9da351885a12 Binary files /dev/null and b/backend/common/utils/__pycache__/system.cpython-310.pyc differ diff --git a/backend/common/utils/request_util.py b/backend/common/utils/request_util.py index f2128d26c12fca60da3dc51de47c847659c0fbef..df20c9787009bcda73f7f31377b8d52557e73c34 100644 --- a/backend/common/utils/request_util.py +++ b/backend/common/utils/request_util.py @@ -27,6 +27,23 @@ from system.log_login.model import LogLogin # user = await get_user_by_token(request) # return user +# def get_request_user(request): +# """ +# 获取请求user +# (1)如果request里的user没有认证,那么则手动认证一次 +# :param request: +# :return: +# """ +# user: AbstractBaseUser = getattr(request, 'user', None) +# if user and user.is_authenticated: +# return user +# try: +# user = get_user_info_from_token(request) +# except Exception as e: +# pass +# return user or AnonymousUser() + + def get_request_ip(request): """ diff --git a/backend/common/utils/server/__pycache__/windows.cpython-310.pyc b/backend/common/utils/server/__pycache__/windows.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9f3911292475fbb5081b86037d3b9185284df31f Binary files /dev/null and b/backend/common/utils/server/__pycache__/windows.cpython-310.pyc differ diff --git a/backend/config/__init__.py b/backend/config/__init__.py index 5865a02478c71e0b9e1a97561887bcaba4f75f61..09722858eb02f604ad736480862db3c56a0b9fb8 100644 --- a/backend/config/__init__.py +++ b/backend/config/__init__.py @@ -2,7 +2,7 @@ from sqlalchemy import URL from pathlib import Path -ENV = "uat" +ENV = "dev" if ENV == "dev": from config.dev_env import * diff --git a/backend/config/__pycache__/__init__.cpython-310.pyc b/backend/config/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f702c6dff816a9a6457193c4414a60769b754118 Binary files /dev/null and b/backend/config/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/config/__pycache__/dev_env.cpython-310.pyc b/backend/config/__pycache__/dev_env.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e02dc1be20494b9afb84aa8d059e5292a6be8d05 Binary files /dev/null and b/backend/config/__pycache__/dev_env.cpython-310.pyc differ diff --git a/backend/config/__pycache__/uat_env.cpython-310.pyc b/backend/config/__pycache__/uat_env.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2cba898ce4b0d89273d4286e6e29cb04720ca2d4 Binary files /dev/null and b/backend/config/__pycache__/uat_env.cpython-310.pyc differ diff --git a/backend/config/dev_env.py b/backend/config/dev_env.py index 5685da302d5c01cdaf613385194f64d3f2d73720..22ca16c7e27e471d5867ade7381a14c7a91153f4 100644 --- a/backend/config/dev_env.py +++ b/backend/config/dev_env.py @@ -7,10 +7,10 @@ DATABASE_HOST = "127.0.0.1" # 数据库端口 DATABASE_PORT = 3306 # 数据库用户名 -DATABASE_USER = "fuadmin" +DATABASE_USER = "benadmin" # 数据库密码 -DATABASE_PASSWORD = "fuadmin" +DATABASE_PASSWORD = "benadmin" # 数据库名 -DATABASE_NAME = "fu-fastapi-vue" +DATABASE_NAME = "ben-fastapi-vue" IS_DEMO = False \ No newline at end of file diff --git a/backend/config/prd_env.py b/backend/config/prd_env.py index 7eefdc64b11cbf332da840e624ab3314ffcf06de..f1d86b44a57e85d10fb79f0ec9fa661e02a59bd8 100644 --- a/backend/config/prd_env.py +++ b/backend/config/prd_env.py @@ -11,6 +11,6 @@ DATABASE_USER = "postgres" # 数据库密码 DATABASE_PASSWORD = "Zhl939589097..." # 数据库名 -DATABASE_NAME = "fu-fastapi-vue" +DATABASE_NAME = "ben-fastapi-vue" IS_DEMO = True \ No newline at end of file diff --git a/backend/db/sqlitedb.db b/backend/db/sqlitedb.db new file mode 100644 index 0000000000000000000000000000000000000000..ddd0f6e2b8acf83f90dfbac4bc1d5040ee487005 Binary files /dev/null and b/backend/db/sqlitedb.db differ diff --git a/backend/main.py b/backend/main.py index 8f56b7212a2276f855402b8e97d5083bdee9ef7c..f8164ca1932b3cab779ca1341703ec0a46489ca7 100644 --- a/backend/main.py +++ b/backend/main.py @@ -1,20 +1,33 @@ from fastapi import FastAPI, Depends +from fastapi.requests import Request from fastapi_async_sqlalchemy import SQLAlchemyMiddleware from fastapi_pagination import add_pagination from starlette.middleware.authentication import AuthenticationMiddleware +from starlette.authentication import ( + AuthenticationBackend, + AuthenticationError, + SimpleUser, + AuthCredentials, +) from common.fu_auth import FuOAuth2PasswordBearer from common.fu_middleware import LogOperationMiddleware, JWTAuthBackend from config import DATABASE_URL from system.router import system_router +#解决跨域访问问题 +from fastapi.middleware.cors import CORSMiddleware my_oauth2_scheme = FuOAuth2PasswordBearer(tokenUrl="api/system/oauth2_login") + + app = FastAPI(dependencies=[Depends(my_oauth2_scheme)]) + + app.add_middleware( - SQLAlchemyMiddleware, + SQLAlchemyMiddleware, db_url=DATABASE_URL, engine_args={ # engine arguments example "echo": True, # print all SQL statements @@ -24,8 +37,27 @@ app.add_middleware( "pool_recycle": 3600, }, ) + app.add_middleware(AuthenticationMiddleware, backend=JWTAuthBackend()) app.add_middleware(LogOperationMiddleware) + +# 允许跨域请求的源列表 +origins = [ + "http://localhost", + "http://localhost:8080", + "http://localhost:8000", + "http://localhost:3000", + # 可以添加更多允许的源 +] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, # 允许的源列表 + allow_credentials=True, # 允许携带凭证(如cookies) + allow_methods=["*"], # 允许的HTTP方法,*表示所有方法 + allow_headers=["*"], # 允许的HTTP头,*表示所有头 +) + add_pagination(app) diff --git a/backend/requirements.txt b/backend/requirements.txt index c33390b67f6a23eb71cf8a8d75ff7a0d311a5ebb..f1a5180562f965cd2288587cb592c89a5d36cdcd 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,15 +1,18 @@ +# 必须 fastapi==0.112.1 fastapi-pagination==0.12.26 SQLAlchemy~=2.0.32 pydantic~=2.8.2 +# 数据迁移工具 alembic~=1.13.2 +# 应用服务器 uvicorn~=0.30.6 python-jose==3.3.0 cryptography==42.0.8 # psycopg2-binary==2.9.9 openpyxl==3.0.10 # PostgreSQL异步驱动 -asyncpg==0.29.0 +# asyncpg==0.29.0 # MySql异步驱动 aiomysql==0.2.0 PyJWT==2.9.0 diff --git a/backend/sql/fast-api-mysql.sql b/backend/sql/fast-api-mysql.sql index af40e666cb6f4e01589f6b43acc80f393388e818..74f1454340d44281f0dfa679718d8c6867f6a86b 100644 --- a/backend/sql/fast-api-mysql.sql +++ b/backend/sql/fast-api-mysql.sql @@ -1,3 +1,4 @@ +SET NAMES utf8mb4; INSERT INTO `sys_menu` (`parent_id`, `icon`, `title`, `is_embed_link`, `frame_src`, `type`, `path`, `redirect`, `component`, `name`, `status`, `keep_alive`, `hide_menu`, `template_id`, `id`, `sys_creator_id`, `sys_modifier_id`, `sys_create_datetime`, `sys_update_datetime`, `sys_effect_datetime`, `sys_expire_datetime`, `sys_flag`, `sort`) VALUES ('5b3af138-2d03-4b8f-b9bd-d663db042e12', 'ant-design:book-outlined', '操作日志', 0, NULL, 1, 'operation', NULL, '/fuadmin/system/log/operation-log/index', 'Operation Log', 1, 0, 0, NULL, '0775a1de-7dc3-4655-ad2f-f06ca0d17a18', NULL, NULL, '2024-07-05 07:33:30', '2024-07-08 09:32:40', '2024-07-05 07:33:30', NULL, 1, 2); INSERT INTO `sys_menu` (`parent_id`, `icon`, `title`, `is_embed_link`, `frame_src`, `type`, `path`, `redirect`, `component`, `name`, `status`, `keep_alive`, `hide_menu`, `template_id`, `id`, `sys_creator_id`, `sys_modifier_id`, `sys_create_datetime`, `sys_update_datetime`, `sys_effect_datetime`, `sys_expire_datetime`, `sys_flag`, `sort`) VALUES ('503fc0e9-1464-4393-9f59-ccf862ba2cf3', 'bx:bx-home', 'routes.dashboard.workbench', 0, NULL, 1, 'workbench', NULL, '/dashboard/workbench/index', 'Workbench', 1, 0, 0, NULL, '15f6f5b8-02bd-4905-b87a-092c6c51d843', NULL, NULL, '2024-08-17 06:40:28', '2024-08-17 06:40:28', '2024-08-17 06:40:28', NULL, 1, 1); INSERT INTO `sys_menu` (`parent_id`, `icon`, `title`, `is_embed_link`, `frame_src`, `type`, `path`, `redirect`, `component`, `name`, `status`, `keep_alive`, `hide_menu`, `template_id`, `id`, `sys_creator_id`, `sys_modifier_id`, `sys_create_datetime`, `sys_update_datetime`, `sys_effect_datetime`, `sys_expire_datetime`, `sys_flag`, `sort`) VALUES ('82687f8d-3f16-41ba-b6ac-224562598c25', 'ant-design:user-outlined', '角色管理', 0, NULL, 1, 'role', NULL, '/fuadmin/system/role/index', 'RoleManagement', 1, 0, 0, NULL, '244574d5-cbe1-4231-a4a4-7f685bbe3d3f', NULL, NULL, '2024-01-25 03:19:21', '2024-01-25 03:21:14', '2024-01-25 03:19:21', NULL, 1, 3); diff --git a/backend/system/__pycache__/__init__.cpython-310.pyc b/backend/system/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9a64c2ce2d57b4086d78cca7fdc3aa8f32c0ee1 Binary files /dev/null and b/backend/system/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/__pycache__/router.cpython-310.pyc b/backend/system/__pycache__/router.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa959b16dedf1551fee11318247ad19a7317f9e8 Binary files /dev/null and b/backend/system/__pycache__/router.cpython-310.pyc differ diff --git a/backend/system/button/__pycache__/__init__.cpython-310.pyc b/backend/system/button/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76f51b9726afc4af4e11b7b486468eb72554975f Binary files /dev/null and b/backend/system/button/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/button/__pycache__/api.cpython-310.pyc b/backend/system/button/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..131b90eff9a538ca936a824d86d03fbe1fc6e3de Binary files /dev/null and b/backend/system/button/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/button/__pycache__/model.cpython-310.pyc b/backend/system/button/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96b86e1096c18a077415d08b930d99b84b22589c Binary files /dev/null and b/backend/system/button/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/button/__pycache__/schema.cpython-310.pyc b/backend/system/button/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..45b73ee664f749785fa236e2c1d44ca34fcffb16 Binary files /dev/null and b/backend/system/button/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/dept/__pycache__/__init__.cpython-310.pyc b/backend/system/dept/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..212ac900a59cebc0ba3b6d1a57e63ba9dd7a1aa5 Binary files /dev/null and b/backend/system/dept/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/dept/__pycache__/api.cpython-310.pyc b/backend/system/dept/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b5555d3cb3ca3efefc042a1d2ff9133f79710fd Binary files /dev/null and b/backend/system/dept/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/dept/__pycache__/model.cpython-310.pyc b/backend/system/dept/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a10c9f7273e66e9b641c2807ff5a2b8bc845597 Binary files /dev/null and b/backend/system/dept/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/dept/__pycache__/schema.cpython-310.pyc b/backend/system/dept/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fa8fff39ebb2ecfb0fbe24be91bb4760e7e8c72d Binary files /dev/null and b/backend/system/dept/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/dict/__pycache__/__init__.cpython-310.pyc b/backend/system/dict/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e6d88713fa601a2abdc90a35f88fdae1e7ac94f Binary files /dev/null and b/backend/system/dict/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/dict/__pycache__/api.cpython-310.pyc b/backend/system/dict/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e62a160c5a17359ed08d46a7ae88bba7c77318b9 Binary files /dev/null and b/backend/system/dict/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/dict/__pycache__/model.cpython-310.pyc b/backend/system/dict/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..136c4eb7e6d77d1d6adbdff82d73ea67e05caceb Binary files /dev/null and b/backend/system/dict/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/dict/__pycache__/schema.cpython-310.pyc b/backend/system/dict/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6d8c40043dd7d092b7f70cb9db965b4d3e3f15d Binary files /dev/null and b/backend/system/dict/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/dict_item/__pycache__/__init__.cpython-310.pyc b/backend/system/dict_item/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b86406d4e8acddadec0ad3c4d7af2eb0f631ae16 Binary files /dev/null and b/backend/system/dict_item/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/dict_item/__pycache__/api.cpython-310.pyc b/backend/system/dict_item/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ecb33d3d6034d6cfb4c6ef84916ca1ef2bbb80fe Binary files /dev/null and b/backend/system/dict_item/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/dict_item/__pycache__/model.cpython-310.pyc b/backend/system/dict_item/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c92735700cfeea4e1de94d89b2faaf9edf23a14a Binary files /dev/null and b/backend/system/dict_item/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/dict_item/__pycache__/schema.cpython-310.pyc b/backend/system/dict_item/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db9039d3b3a4d81c51681e5e48074abaac7f7767 Binary files /dev/null and b/backend/system/dict_item/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/file/__pycache__/__init__.cpython-310.pyc b/backend/system/file/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..822cdc281d92ff1d7bfc65f804235bbd8422cefb Binary files /dev/null and b/backend/system/file/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/file/__pycache__/api.cpython-310.pyc b/backend/system/file/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f65d245948d29e99bf20732046ba2cc8928f46a Binary files /dev/null and b/backend/system/file/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/file/__pycache__/model.cpython-310.pyc b/backend/system/file/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5235db78cf19c253b10f05c1ca4d00980aef119d Binary files /dev/null and b/backend/system/file/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/file/__pycache__/schema.cpython-310.pyc b/backend/system/file/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ecef806d8bb4e50307207e811cc0efca5966f2f Binary files /dev/null and b/backend/system/file/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/log_login/__pycache__/__init__.cpython-310.pyc b/backend/system/log_login/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6907d92821bae2a6aff258b8ce0cf296ec14526f Binary files /dev/null and b/backend/system/log_login/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/log_login/__pycache__/api.cpython-310.pyc b/backend/system/log_login/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c68b462be78befddf6e062e37e0824269ba61121 Binary files /dev/null and b/backend/system/log_login/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/log_login/__pycache__/model.cpython-310.pyc b/backend/system/log_login/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..313ecb2a6e8d9e0e71123b58626cc032dbf85046 Binary files /dev/null and b/backend/system/log_login/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/log_login/__pycache__/schema.cpython-310.pyc b/backend/system/log_login/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25edcf1ec19e5083fc0927e725ec2edd862d8a54 Binary files /dev/null and b/backend/system/log_login/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/log_operation/__pycache__/__init__.cpython-310.pyc b/backend/system/log_operation/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..795c649cc7da45215bde662c2f2e532ed489eceb Binary files /dev/null and b/backend/system/log_operation/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/log_operation/__pycache__/api.cpython-310.pyc b/backend/system/log_operation/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3394abf2225c92b48acb6d5fa885b7cac7df08bb Binary files /dev/null and b/backend/system/log_operation/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/log_operation/__pycache__/model.cpython-310.pyc b/backend/system/log_operation/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..359449b5cfc9c9e520e0a25520a72b83ed9e7575 Binary files /dev/null and b/backend/system/log_operation/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/log_operation/__pycache__/schema.cpython-310.pyc b/backend/system/log_operation/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..655c2da1651f16f35e74b01f8494bb2d720992b0 Binary files /dev/null and b/backend/system/log_operation/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/login/__pycache__/__init__.cpython-310.pyc b/backend/system/login/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..468e39f650401deaf9fd171f53a16fc069e9ca82 Binary files /dev/null and b/backend/system/login/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/login/__pycache__/api.cpython-310.pyc b/backend/system/login/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ace4184923b67730d7b1e65448aa8d63eb03c57e Binary files /dev/null and b/backend/system/login/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/login/__pycache__/schema.cpython-310.pyc b/backend/system/login/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0a1860ab4fd51b72ea24ada5832cb935e40c90c Binary files /dev/null and b/backend/system/login/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/menu/__pycache__/__init__.cpython-310.pyc b/backend/system/menu/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16c22ecc237ad9a9eb72be45ac6552df41e9378b Binary files /dev/null and b/backend/system/menu/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/menu/__pycache__/api.cpython-310.pyc b/backend/system/menu/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92f95ee6cb527584917c5601e959055ad2badd82 Binary files /dev/null and b/backend/system/menu/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/menu/__pycache__/model.cpython-310.pyc b/backend/system/menu/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..feff5acc0376582f114e2ed513000ae9210c4f1e Binary files /dev/null and b/backend/system/menu/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/menu/__pycache__/schema.cpython-310.pyc b/backend/system/menu/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..80693441d3b9601da993435a07514c8629e5687b Binary files /dev/null and b/backend/system/menu/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/monitor/__pycache__/__init__.cpython-310.pyc b/backend/system/monitor/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..10c84c13ae13314c2394bcfe32f7f5a6bc68da0f Binary files /dev/null and b/backend/system/monitor/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/monitor/__pycache__/api.cpython-310.pyc b/backend/system/monitor/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..165ba7e16dc069707bee19ff57fe4f8f75eee46c Binary files /dev/null and b/backend/system/monitor/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/post/__pycache__/__init__.cpython-310.pyc b/backend/system/post/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9866a2eb2a8c37ac1e653eaebabd5bdd202c6180 Binary files /dev/null and b/backend/system/post/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/post/__pycache__/api.cpython-310.pyc b/backend/system/post/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..624aeeb9b8a12c526fec898e984fd3ab8f078554 Binary files /dev/null and b/backend/system/post/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/post/__pycache__/model.cpython-310.pyc b/backend/system/post/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c702400e10df5656959166a8442ea2a249f517d Binary files /dev/null and b/backend/system/post/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/post/__pycache__/schema.cpython-310.pyc b/backend/system/post/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..453c549d416e9d9b82f15e85d09ee2a9ba9cf401 Binary files /dev/null and b/backend/system/post/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/role/__pycache__/__init__.cpython-310.pyc b/backend/system/role/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..874dea52890bcf9fc337c026618c0edc1fb4b2a1 Binary files /dev/null and b/backend/system/role/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/role/__pycache__/api.cpython-310.pyc b/backend/system/role/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d79d7dfeea6e361d34af76b17cfeb4cce2fb00c7 Binary files /dev/null and b/backend/system/role/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/role/__pycache__/model.cpython-310.pyc b/backend/system/role/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6e37b385d3e01f9cda71b4f39bbb7c5acd8ed25 Binary files /dev/null and b/backend/system/role/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/role/__pycache__/schema.cpython-310.pyc b/backend/system/role/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7d2a281619f4e56d8d4ed4d98e0271008341ba50 Binary files /dev/null and b/backend/system/role/__pycache__/schema.cpython-310.pyc differ diff --git a/backend/system/user/__pycache__/__init__.cpython-310.pyc b/backend/system/user/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..21d45c58026910ae80132081daeeb50e0e07f034 Binary files /dev/null and b/backend/system/user/__pycache__/__init__.cpython-310.pyc differ diff --git a/backend/system/user/__pycache__/api.cpython-310.pyc b/backend/system/user/__pycache__/api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b647bb9ac0aafaf9933795bca14e70bfa4c770c Binary files /dev/null and b/backend/system/user/__pycache__/api.cpython-310.pyc differ diff --git a/backend/system/user/__pycache__/model.cpython-310.pyc b/backend/system/user/__pycache__/model.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b20e619df5cebe6a926a581a9167320709f4d1f6 Binary files /dev/null and b/backend/system/user/__pycache__/model.cpython-310.pyc differ diff --git a/backend/system/user/__pycache__/schema.cpython-310.pyc b/backend/system/user/__pycache__/schema.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ab3d58239df89b39a756edbe0e5103fd6c2b11c Binary files /dev/null and b/backend/system/user/__pycache__/schema.cpython-310.pyc differ diff --git a/web/.env b/web/.env index 88c89ce6d2dd7af9dcc1421a0d5e1fc5413a2e1d..8edf4c0502c969c3520b22a1e0755f5a327e19ab 100644 --- a/web/.env +++ b/web/.env @@ -1,2 +1,2 @@ # spa-title -VITE_GLOB_APP_TITLE = Fu Fast Api Vue +VITE_GLOB_APP_TITLE = Ben Fast Api Vue diff --git a/web/.env.development b/web/.env.development index cb54f03ccaf1b65c5e526b6851633419c87af7b9..e90b6607b5871e81694486607df338991ea4c111 100644 --- a/web/.env.development +++ b/web/.env.development @@ -5,7 +5,8 @@ VITE_USE_MOCK = false VITE_PUBLIC_PATH = / # Basic interface address SPA -VITE_GLOB_API_URL=/basic-api +# VITE_GLOB_API_URL=/basic-api +VITE_GLOB_API_URL=http://localhost:8000 # File upload address, optional VITE_GLOB_UPLOAD_URL=/upload diff --git a/web/src/router/constant.ts b/web/src/router/constant.ts index fb967d8d00ef51ab4595176a475c9d519ef7c95b..473541568bf15c8e38e55a744d0e909818b57e34 100644 --- a/web/src/router/constant.ts +++ b/web/src/router/constant.ts @@ -3,6 +3,7 @@ export const REDIRECT_NAME = 'Redirect'; export const PARENT_LAYOUT_NAME = 'ParentLayout'; export const PAGE_NOT_FOUND_NAME = 'PageNotFound'; +export const PAGE_NOT_FOUND_NAME2 = 'PageNotFound2'; export const EXCEPTION_COMPONENT = () => import('/@/views/sys/exception/Exception.vue'); diff --git a/web/src/router/routes/basic.ts b/web/src/router/routes/basic.ts index 573ce2b84ce2d40bb37a8203218744395f7e3154..e455bee2827e2f4b0fd26dec90090f6e89e3f063 100644 --- a/web/src/router/routes/basic.ts +++ b/web/src/router/routes/basic.ts @@ -5,6 +5,7 @@ import { LAYOUT, EXCEPTION_COMPONENT, PAGE_NOT_FOUND_NAME, + PAGE_NOT_FOUND_NAME2, } from '/@/router/constant'; // 404 on a page @@ -20,7 +21,7 @@ export const PAGE_NOT_FOUND_ROUTE: AppRouteRecordRaw = { children: [ { path: '/:path(.*)*', - name: PAGE_NOT_FOUND_NAME, + name: PAGE_NOT_FOUND_NAME2, component: EXCEPTION_COMPONENT, meta: { title: 'ErrorPage',