微信小程序页面迁移校验之前 P5任务处理之前

This commit is contained in:
Neo
2026-03-09 01:19:21 +08:00
parent 263bf96035
commit 6e20987d2f
1112 changed files with 153824 additions and 219694 deletions

View File

@@ -12,7 +12,7 @@ import logging
import httpx
from app.config import get
from app.config import WX_APPID, WX_SECRET
logger = logging.getLogger(__name__)
@@ -59,8 +59,8 @@ async def code2session(code: str) -> dict:
WeChatAuthError: 微信接口返回非零 errcode 时抛出
RuntimeError: WX_APPID / WX_SECRET 环境变量缺失时抛出
"""
appid = get("WX_APPID", "")
secret = get("WX_SECRET", "")
appid = WX_APPID
secret = WX_SECRET
if not appid or not secret:
raise RuntimeError("微信配置缺失WX_APPID 或 WX_SECRET 未设置")