import { Image, Text,Navigator } from '@tarojs/components'
import styles from './index.module.less'
import { View } from "@tarojs/components";
/**
 * 继续阅读弹窗
 */
interface Props {
    imgName?: string,//展示图片名称 booksNull.png 放在icon目录下
    readInfo:{
        chapter_name:string,//章节名称
        chapter_id:string,//章节ID
        book_name:string,//小说名称
        book_id:string,//小说id


    },//阅读信息
}
 function KeepReadPop(props: Props) {
    let { imgName = 'booksNull.png', readInfo } = props
    let {book_name,book_id,chapter_name,chapter_id} = readInfo
    return <View className={styles.lastRead}>
        <View className={styles.left}>
            <Image src={require('@src/icon/'+imgName)} onClick={() => { this.props.store.indexStore.SET_ISLASTREAD(false) }} />
            <Text>上次阅读{book_name}{chapter_name}</Text>
        </View>
        <Navigator className={styles.right} url={`/pages/book/bookArticle/index?book_id=${book_id}&chapter_id=${chapter_id || ''}`} hoverClass="none">继续</Navigator>
    </View>
}
export default KeepReadPop