feat: 添加微信授权登录和修改昵称功能

This commit is contained in:
wangwuww111
2026-03-11 12:10:19 +08:00
parent 906b5649f7
commit eac6b2fd1f
20 changed files with 1021 additions and 67 deletions

View File

@@ -36,6 +36,13 @@ class Settings(BaseSettings):
wx_appid: str = ""
wx_secret: str = ""
# JWT 配置
jwt_secret_key: str = "your-super-secret-key-change-in-production"
jwt_expire_hours: int = 168 # 7天
# 文件上传配置
upload_path: str = "./uploads"
@property
def database_url(self) -> str:
return f"mysql+aiomysql://{self.db_user}:{self.db_password}@{self.db_host}:{self.db_port}/{self.db_name}"