feat: enhance Druid integration and improve user management features

This commit is contained in:
2026-07-16 09:59:27 +08:00
parent 2e88885a27
commit f9f5ceac9d
10 changed files with 253 additions and 72 deletions

View File

@@ -12,6 +12,17 @@ export function getProductionApiBaseUrl(origin = getBrowserOrigin()) {
return `${normalizedOrigin || ''}/api/shihezi/`;
}
/**
* 返回已经建立登录态后的 Druid 首页地址。
*/
export function getDruidIndexUrl(origin = getBrowserOrigin()) {
const druidIndexPath = 'druid/index.html';
if (process.env.NODE_ENV === 'development') {
return `/api/${druidIndexPath}`;
}
return `${getProductionApiBaseUrl(origin)}${druidIndexPath}`;
}
/**
* 后端可能因为反向代理配置返回内网 H5 地址,前端展示和打开二维码时使用当前公开 origin。
*/