docs: add pagewise ui test checklist

This commit is contained in:
2026-02-03 12:37:24 +08:00
parent 1b10315170
commit 5a125c0f51
6 changed files with 273 additions and 90 deletions

View File

@@ -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