/**分类书籍的box容器 横大*/

import { Text, View, Image, Navigator } from "@tarojs/components";
import React from 'react'
import './index.less'
export interface BookboxColumnSmallProps {
    bookId: number,//书ID
    authorName: string,//作者
    bookName: string,//书名称
    bookDesc: string,//描述
    picUrl: string,//封面
    bookStatus: number,//完本|连载状态
    wordCount: number,//字数
    labelInfoList: { name: string }[],//标签
    vipFree:boolean
}
function BookboxColumnSmall(props: BookboxColumnSmallProps) {
    const { picUrl, bookName, bookId ,vipFree} = props
    const click = () => {
        // BookStore.setData({ openBookData: props })
    }
    return <View className='book_box_column_small' onClick={click}>
        <Navigator url={'/pages/book/bookDetails/index?bookId=' + bookId} hoverClass="none">
            <Image src={picUrl || ''}  className={`img ${vipFree ? "isVip" : ""}`}></Image>
            <View className='bottom'>
                <Text className='title'>{bookName}</Text>
            </View>
        </Navigator>
    </View>
}

export default React.memo(BookboxColumnSmall)