import { BasicProps, BasicState, EditSetting } from '../type' export interface BookType { bookId: string, imageUrl: string, title: string, authorNames: string, description: string, } export class Props extends BasicProps { public editSetting: EditSetting = { key: 'gaea-snailBook', name: '蜗牛书籍模块', help: { title: '跳转链接从蜗牛管理后台获取', link: 'https://du.hz.netease.com/tools#/schemeUrl' }, isContainer: false, isAutoHeight: true, defaultPosition: { top: '0', left: '0' }, type: ['common', 'snail'], editors: [ { field: 'title', text: '模块标题', type: 'string', }, { field: 'linkText', text: '右上角跳转文案', type: 'string', }, { field: 'linkUrl', text: '右上角跳转链接', type: 'string', placeholder: '点击上方链接前往获取' }, { field: 'type', text: '模块类型', type: 'select', data: [{ text: '单本', value: 1 }, { text: '1+3', value: 2 }, { text: '宫格', value: 3 }] }, { field: 'desc', text: '推荐语', type: 'string', placeholder: '仅限单本和1+3类型' }, { field: 'discount', text: '是否显示蜗牛壳特价(仅限单本)', type: 'boolean' }, { field: 'pos', text: '模块标识', type: 'string', placeholder: '用于统计上报中的pos字段' }, { field: 'books', type: 'bookSearch' }, 'Style', { field: 'divider', text: '底部分割线', type: 'boolean' }, { field: 'backgroundColor', text: '背景色', type: 'color' }, { field: 'titleColor', text: '标题字体颜色', type: 'color' }, { field: 'descColor', text: '描述字体颜色', type: 'color' }, ] }; title: string linkText: string linkUrl: string type: number = 1 desc: string discount: boolean pos: string books: BookType[] backgroundColor: string = '#fff' titleColor: string = '#444' descColor: string = '#b3b3b3' divider: boolean = true } export class State extends BasicState { costCoins: number finalCostCoins: number }