mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 17:49:19 +08:00
feat: 开放密钥管理也增加调用地址显示功能
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/** 开放接口 Base URL:当前站点 origin + /api(扩展、脚本等站外调用时复制) */
|
||||
export function getOpenApiBaseUrl(): string {
|
||||
if (typeof window === 'undefined') {
|
||||
return '/api';
|
||||
}
|
||||
const origin = window.location.origin.replace(/\/+$/, '');
|
||||
return `${origin}/api`;
|
||||
}
|
||||
Reference in New Issue
Block a user