/**分类书籍的box容器 横大*/ import { Text, View, Image, Navigator } from "@tarojs/components"; import React from 'react' import './index.less' export interface BookboxRowBigProps { bookId: number,//书ID authorName:string,//作者 bookName: string,//书名称 bookDesc:string,//描述 picUrl: string,//封面 bookStatus: number,//完本|连载状态 wordCount: number,//字数 labelInfoList:{name:string}[],//标签 } function BookboxRowBig(props: BookboxRowBigProps) { const { bookName, picUrl, bookDesc, labelInfoList, authorName, bookId, wordCount, bookStatus } = props let describe = "" if(wordCount && bookStatus) { describe = `${bookName}·${(wordCount/10000).toFixed(0)}万字·${bookStatus === 0 ? '连载' : '完本'}` } const click = () => { // BookStore.setData({ openBookData: props }) } return {bookName} {bookDesc.replace(/\s/ig,'')} {describe || authorName} { labelInfoList.length > 0 && {labelInfoList[0].name} } } export default React.memo(BookboxRowBig)