feat(h5): unify WeChat OAuth under m.runxian.top path routing
Serve user/shop/partner H5 under /user/, /shop/, /partner/ on a single authorized domain; update nginx, SSL script, and router base paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -26,13 +26,15 @@ MOCK_WECHAT=true
|
||||
WX_AUTHORIZE=false
|
||||
|
||||
# C 端 H5 落地页(推广码二维码链接前缀)
|
||||
USER_H5_URL=http://localhost:5173
|
||||
# 本地开发:http://localhost:5173/user 生产统一入口:https://m.runxian.top/user
|
||||
USER_H5_URL=http://localhost:5173/user
|
||||
|
||||
# 反向代理后提取真实客户端 IP(下单 IP 定位)
|
||||
TRUST_PROXY=true
|
||||
|
||||
# 微信 SDK(生产:WECHAT_AUTH_ENABLED=true,配置 WX_APP_ID / WX_APP_SECRET)
|
||||
# OAuth 授权页由 /common/wechat/oauth-url 生成;C/合伙人/总部 H5 均须在微信内置浏览器内授权。
|
||||
# OAuth 授权页由 /common/wechat/oauth-url 生成;三端统一入口 m.runxian.top/{user,shop,partner}。
|
||||
# 微信服务号「网页授权域名」「JS 接口安全域名」均配置 m.runxian.top(仅 1 个名额)。
|
||||
WX_APP_ID=
|
||||
WX_APP_SECRET=
|
||||
WECHAT_AUTH_ENABLED=false
|
||||
|
||||
@@ -22,6 +22,9 @@ AUTO_APPROVE_STORE=false
|
||||
|
||||
TRUST_PROXY=true
|
||||
|
||||
# C 端 H5 落地页(推广码二维码;生产统一入口)
|
||||
USER_H5_URL=https://m.runxian.top/user
|
||||
|
||||
WECHAT_AUTH_ENABLED=true
|
||||
WECHAT_PAY_ENABLED=true
|
||||
# 登录后走微信 SDK OAuth 授权(生产/预发建议 true)
|
||||
|
||||
@@ -9,7 +9,7 @@ import { CreatePromoCodeDto } from './dto/admin-mutate.dto';
|
||||
import { AdminPromoCodesQueryDto } from './dto/admin-query.dto';
|
||||
|
||||
function userH5Base(): string {
|
||||
return (process.env.USER_H5_URL || 'http://localhost:5173').replace(/\/$/, '');
|
||||
return (process.env.USER_H5_URL || 'http://localhost:5173/user').replace(/\/$/, '');
|
||||
}
|
||||
|
||||
function buildLandingUrl(code: string): string {
|
||||
|
||||
Reference in New Issue
Block a user