import { BasicProps, BasicState, EditSetting } from '../type' export class Props extends BasicProps { public editSetting: EditSetting = { key: 'gaea-avatar-box', name: 'lofter头像框领取', isContainer: false, // isAutoHeight: true, defaultPosition: { top: '0', left: '0' }, type: ['common', 'lofter'], editors: [ '关注模块', { field: 'blogName', text: '博客名称(无需关注则不填)', type: 'string' }, { field: 'blogAvatar', text: '用户头像(可覆盖自动获取的头像)', type: 'image' }, { field: 'blogNickName', text: '用户昵称(可覆盖自动获取的昵称)', type: 'string' }, { field: 'blogDesc', text: '用户简介(可覆盖自动获取的简介)', type: 'string' }, '头像框模块', { field: 'avatarBoxId', text: '头像框ID', type: 'string' }, ] }; public style: React.CSSProperties = { display: 'block', width: '10rem', height: '6rem', zIndex: 2, }; blogName: string = ''; blogAvatar: { url: string, } = null; blogNickName: string = ''; blogDesc: string = ''; avatarBoxId: string = '' } export class State extends BasicState { blogFollowData: BlogFollowData = null avatarData: AvatarBoxData = null } export interface BlogInfo { blogId: number, blogName: string, blogNickName: string, bigAvaImg: string, selfIntro: string, isAuth: boolean, isVerify: boolean, signAuth: boolean } export interface BlogFollowData { blogInfo: BlogInfo follow: boolean } export interface AvatarBoxInfo { name: string, image: string, description: string, id: number, } export interface AvatarBoxData { avatarBoxInfo: AvatarBoxInfo /** * 0-未领取; 1-已经领取; -1-已过期;-2-已经删除 */ status: 0 | 1 | -1 | -2 }