From 6e6ef7fc9fb23bad8fe457d540db241ba43e90fa Mon Sep 17 00:00:00 2001 From: aaron <> Date: Thu, 23 Jan 2025 21:09:48 +0800 Subject: [PATCH] update --- app/core/config.py | 2 +- app/core/wechat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/config.py b/app/core/config.py index bd5f67c..44328bd 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -6,7 +6,7 @@ class Settings(BaseSettings): API_V1_STR: str = "/api/v1" PROJECT_NAME: str = "FastAPI 项目" - API_BASE_URL: str = "https://api.beefast.co" + API_BASE_URL: str = "https://api-dev.beefast.co" # 订单价格配置 ORDER_BASE_PRICE: float = 3.0 # 基础费用 diff --git a/app/core/wechat.py b/app/core/wechat.py index 8d4cdb6..dce92b4 100644 --- a/app/core/wechat.py +++ b/app/core/wechat.py @@ -1,4 +1,5 @@ import aiohttp +from fastapi import Request from app.core.config import settings import requests from cryptography.hazmat.primitives.asymmetric import padding @@ -94,7 +95,6 @@ class WeChatClient: "country_code": phone_info.get("countryCode"), } - async def code2session(self, code: str) -> dict: """通过 code 获取用户 openid""" url = f"https://api.weixin.qq.com/sns/jscode2session"