docs: add pagewise ui test checklist
This commit is contained in:
@@ -4,7 +4,11 @@ import { getTenantCode } from "./tenant";
|
||||
export async function request(endpoint, options = {}) {
|
||||
const tenantCode = getTenantCode();
|
||||
const isAuthRequest = endpoint.startsWith("/auth/");
|
||||
const baseUrl = isAuthRequest ? "/v1" : tenantCode ? `/v1/t/${tenantCode}` : "/v1";
|
||||
const baseUrl = isAuthRequest
|
||||
? "/v1"
|
||||
: tenantCode
|
||||
? `/v1/t/${tenantCode}`
|
||||
: "/v1";
|
||||
|
||||
if (!tenantCode && !isAuthRequest && !endpoint.startsWith("/tenants")) {
|
||||
// 无租户时仍允许访问公共入口,避免全局页面 404
|
||||
|
||||
Reference in New Issue
Block a user