feat: enhance Druid integration and improve user management features
This commit is contained in:
@@ -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。
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user