import { z } from 'zod'; /** 登录/注册页右侧客户案例配置(可后端下发覆盖) */ export interface AuthShowcaseCase { /** 角标文案,如「客户故事」 */ tag: string; /** 完整标题 */ title: string; /** 标题中需要高亮为品牌色的片段 */ highlights?: string[]; description: string; /** 案例配图 URL */ image: string; brandName: string; brandLogo?: string; /** 「查看案例」跳转链接,为空则隐藏按钮 */ caseUrl?: string; /** 目标平台, 国内站:default 国际站:intl */ targetPlatform: ("default" | "intl")[]; } const authShowcaseCaseSchema: z.ZodType = z .object({ tag: z.string(), title: z.string(), highlights: z.array(z.string()).optional(), description: z.string(), image: z.string(), brandName: z.string(), brandLogo: z.string().optional(), caseUrl: z.string().optional(), targetPlatform: z.array(z.union([z.literal("default"), z.literal("intl")])) }) .strict(); export default z .object({ autoPlayInterval: z.number().int(), cases: z.array(authShowcaseCaseSchema).optional(), }) .strict();