diff --git a/backend/.env.example b/backend/.env.example index 06cd24cce..55e72c652 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -76,3 +76,7 @@ DEFAULT_TENANT_NO=shanxia2.0 # WXPAY_NOTIFY_URL=https://www.chengyantek.cn/api/payment/notify # WXPAY_REFUND_NOTIFY_URL=https://www.chengyantek.cn/api/payment/refund-notify # WXPAY_SANDBOX=false + +# 门户小程序登录(AppID 与 miniprogram/manifest.json mp-weixin.appid 一致) +# WECHAT_MP_APPID=wx7db1ddb2a90c9425 +# WECHAT_MP_SECRET= diff --git a/backend/app/core/config.py b/backend/app/core/config.py index 6112a25e3..075e26c03 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -115,6 +115,10 @@ class Settings(BaseSettings): # 微信小程序配置 WXPAY_SECRET: str = "" # 小程序Secret + # 门户微信小程序登录(与 WXPAY_* 支付凭证分离) + WECHAT_MP_APPID: str = "" # 门户小程序 AppID,须与 miniprogram manifest 一致 + WECHAT_MP_SECRET: str = "" # 门户小程序 AppSecret(仅后端) + # 微信模板消息ID配置 WX_TEMPLATE_ORDER_STATUS: str = "" # 订单状态通知模板ID WX_TEMPLATE_DELIVERY_NOTICE: str = "" # 配送通知模板ID @@ -159,6 +163,7 @@ class Settings(BaseSettings): "/openapi.json," "/api/web/auth/login-rsa-public-key," "/api/web/auth/login," + "/api/mini/auth/wechat-login," "/api/web/auth/refresh-token," "/api/web/auth/mp-webview-exchange," "/api/web/admin/attachment/upload,"