export interface ElementType { elementType: 'TOP_IMAGE' | 'TOP_SLIDER' | 'TOP_VIDEO' | 'IMAGE' | 'SLIDER' | 'VIDEO' | 'TEXT' | 'APP_DOWNLOAD' | 'WEAPP' | 'GH' | 'ENTERPRISE_WX' | 'FLOAT_BUTTON' | 'IMAGE_TEXT', comptActive?: boolean } /**边距 */ export interface Padding { paddingTop: number,//边距 顶部轮播不存在 paddingBottom: number,//边距 顶部轮播不存在 } /**文本 */ export interface Text extends ElementType, Padding { text: string, fontSize: 14 | 15 | 16 | 18 | 20 | 24 | 36, fontColor: string, textAlignment: 0 | 1 | 2, // 取值 0: left, 1: middle, 2: right. 默认 0 fontStyle: 0 | 1, // 0: 常规, 1: 加粗. 默认 0 } /**公众号按钮*/ export interface GhButton extends ElementType, Padding { fastFollow: 0 | 1// 是否开启一键关注,取值 0: 关闭, 1: 开启. 默认 1 btnTitle: string, // use_icon 为 0 时,长度限制 1-10 ;use_icon 为 1 时,长度限制 1-8 ; 默认:关注公众号 fontColor: string, // 按钮文案颜色 默认#FFFFFF btnBgColorTheme: string, // 按钮填充色 默认#07C160 btnBorderColorTheme: string, // 边框色,#000000-#FFFFFF,默认#FFFFFF btnFontType: 0 | 1, // 按钮文案配置 取值 0: 常规, 1: 加粗. 默认 0 useIcon: 0 | 1, // 是否使用图标 取值 0: 不使用图标, 1: 使用图标. 默认 0 } /**添加商家微信按钮*/ export interface WxAutoButton extends Padding, ElementType { cropId?: string, // 绑定的企业 id groupId?: number, // 客服组 id btnTitle: string, // 按钮文案, fontColor: string, // 按钮文案颜色,#000000-#FFFFFF,默认#FFFFFF btnBgColorTheme: string, // 按钮填充色,#000000-#FFFFFF,默认#07C160 btnBorderColorTheme: string, // 边框色,#000000-#FFFFFF,默认#FFFFFF btnFontType: 0 | 1, // 字体粗细 0常用 1加粗 useIcon: 0 | 1, // 图标开启关闭 取值 0: 不使用图标, 1: 使用图标. 默认 0 } /**img */ export interface Img extends ElementType, Padding { imageUrl: string, width: number, height: number, } /**top_img */ export interface TopImg extends ElementType { imageUrl: string, width: number, height: number, adLocation: 'sns' | 'gzh', // sns 代表朋友圈, gzh 代表公众号 outerStyle?: 0 | 1, //ad_location 为 sns 时必填. 取值 0: 常规广告, 1: 卡片广告 } /**top_Video */ export interface TopVideo extends ElementType { videoUrl: string, width: number, height: number, adLocation: 'sns' | 'gzh', outerStyle?: 0 | 1 | 2, //为 sns 时必填 0: 常规广告, 1: 基础卡片广告, 2: 全幅卡片广告 usedForOuter?: 0 | 1, //0:顶部素材用于广告外层, 1:顶部素材不用于广告外层. 默认 0. 仅微信平台账号有效. outer_style=1 时选填 } /** 悬浮组件 */ export interface Floatbutton { elementType: 'FLOAT_BUTTON', styleType: 0 | 1 | 2, // 取值 0: 图片+title+desc,1: title+desc, 2: title imageUrl?: string, // style_type=0 时必填. 悬浮组件图片 id. 图片尺寸 96x96 title: string, // 悬浮组件标题 titleColor?: string, //悬浮组件标题颜色 "#171717", desc?: string, // 描述 descColor?: string, //悬浮组件描述颜色. 默认#4C4C4C appearType?: 0 | 1, //出现方式 取值 0. 进入页面时出现, 1. 滑动页面时出现. 默认 0 如果 page_specs_list 只有一页必须为 0 disappearType?: 0 | 1, //消失方式 取值 0.不消失, 1.滑至页面底部时消失, 默认 0 如果 page_specs_list 只有一页必须为 0 forbidPageList?: number[], // 悬浮按钮不出现的页面数组. [1,2]代表第 1,2 页不出现悬浮按钮, 依次类推. componentItem: Omit | Omit } /**top_slider 顶部轮播*/ export interface TopSlider extends ElementType { imageUrlList: string[], width: number, height: number, activeIndex?: number } /** 图文复合组件New 相关 开始======= */ export interface ITItemGhSpec extends Padding { fastFollow: 0 | 1 // 是否开启一键关注,取值 0: 关闭, 1: 开启. 默认 1 btnTitle: string, // use_icon 为 0 时,长度限制 1-10 ;use_icon 为 1 时,长度限制 1-8 ; 默认:关注公众号 fontColor: string, // 按钮文案颜色 默认#FFFFFF btnBgColorTheme: string, // 按钮填充色 默认#07C160 btnBorderColorTheme: string, // 边框色,#000000-#FFFFFF,默认#FFFFFF btnFontType: 0 | 1, // 按钮文案配置 取值 0: 常规, 1: 加粗. 默认 0 useIcon: 0 | 1, // 是否使用图标 取值 0: 不使用图标, 1: 使用图标. 默认 0 } export interface ITItemEnterpriseWxSpec extends Padding { cropId?: string, // 绑定的企业 id groupId?: number, // 客服组 id btnTitle: string, // 按钮文案, fontColor: string, // 按钮文案颜色,#000000-#FFFFFF,默认#FFFFFF btnBgColorTheme: string, // 按钮填充色,#000000-#FFFFFF,默认#07C160 btnBorderColorTheme: string, // 边框色,#000000-#FFFFFF,默认#FFFFFF btnFontType: 0 | 1, // 字体粗细 0常用 1加粗 useIcon: 0 | 1, // 图标开启关闭 取值 0: 不使用图标, 1: 使用图标. 默认 0 } export interface ImageTextItem { borderColor: string, // 边框色,#000000-#FFFFFF,默认#e5e5e5 titleColor: string, // 标题颜色,#000000-#FFFFFF. 默认#353535 descColor: string, // 描述颜色,#000000-#FFFFFF. 默认#b2b2b2 bgColor: string, // 背景颜色,#000000-#FFFFFF. 默认#ffffff jumpMode: 'btn_jump' | 'total_jump', //图文复合组件跳转方式,默认为 btn_jump(按钮跳转) total_jump(全局跳转) imageUrl: string, // 图片链接 对标 material_id title: string, // 标题,长度限制 1-8 ; 字段长度最小 1 字节,长度最大 10 字节 desc: string, // 描述,长度限制 1-10 ;字段长度最小 1 字节,长度最大 10 字节 subElemType: 'GH' | 'ENTERPRISE_WX', // 图文复合组件转化类型, content: ITItemGhSpec | ITItemEnterpriseWxSpec } export interface ImageText extends ElementType, Padding { alignMode: 0 | 1, // 0 左对齐,1 居中对齐,只有选一行 2 个的时候才生效. 默认值 0 imageTextItem: ImageTextItem[] } /** 图文复合组件New 相关 结束======= */