|
|
@@ -17,6 +17,9 @@ import BookboxColumnBig from '@src/components/PupPetry/BookBox/BookboxColumnBig'
|
|
|
import { share } from '@src/utils';
|
|
|
import BookboxRowBig from '@src/components/PupPetry/BookBox/BookboxRowBig';
|
|
|
|
|
|
+// 导入图片资源
|
|
|
+import rightIcon from '../../icon/right.png';
|
|
|
+
|
|
|
interface Props {
|
|
|
store: Store;
|
|
|
}
|
|
|
@@ -174,7 +177,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
// 获取页面的路径和参数
|
|
|
const route = currentPage.route // 页面路径
|
|
|
if (route) {
|
|
|
- let shareInfo = await share({ pagePath: route })
|
|
|
+ let shareInfo:any = await share({ pagePath: route })
|
|
|
let { sharePicUrl, shareTitles, pageName, pagePath } = shareInfo
|
|
|
return {
|
|
|
title: shareTitles || app.appInfo?.appName + '-' + pageName,
|
|
|
@@ -192,7 +195,6 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
const completeMessage = () => {
|
|
|
console.log('完成');
|
|
|
};
|
|
|
- console.log("bookStore?.bookList", bookStore?.bookList?.total)
|
|
|
return <ScrollViewHoc load={load} filterClassName='.searchTs' navHeight={indexStore.navHeight}>
|
|
|
<TopNavBar1 {...{
|
|
|
tab: true,
|
|
|
@@ -208,7 +210,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 今日热门 */}
|
|
|
{indexConfig['hot_books'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexHotBooks?.showRightButton} title={indexStore?.indexHotBooks?.name || "今日热书"} fitTitle="更多" imgUrl={require('../../icon/right.png')} fitOnBack={() => {
|
|
|
+ <BookHead showBtn={indexStore?.indexHotBooks?.showRightButton} title={indexStore?.indexHotBooks?.name || "今日热书"} fitTitle="更多" imgUrl={rightIcon} fitOnBack={() => {
|
|
|
Taro.navigateTo({ url: `/pages/indexMore/index?title=今日热书&dataName=indexHotBooks` })
|
|
|
}}></BookHead>
|
|
|
<View ><BookboxRowMiddle {...indexStore?.indexHotBooks?.[app?.appInfo?.appCategory === 1 ? "longBookInfoAppVOS" : "shortBookInfoAppVOS"]?.[0]} /></View>
|
|
|
@@ -224,7 +226,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 热门分类 */}
|
|
|
{indexConfig['hot_category'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexHotCategory?.showRightButton} title={indexStore?.indexHotCategory?.name || "热门分类"} fitTitle="全部分类" imgUrl={require('../../icon/right.png')} fitOnBack={() => { Taro.switchTab({ url: '/pages/classify/index' }) }} />
|
|
|
+ <BookHead showBtn={indexStore?.indexHotCategory?.showRightButton} title={indexStore?.indexHotCategory?.name || "热门分类"} fitTitle="全部分类" imgUrl={rightIcon} fitOnBack={() => { Taro.switchTab({ url: '/pages/classify/index' }) }} />
|
|
|
<BookHotTabs hotValue={indexStore?.indexHotCategory?.bookCategoryList || []} onBack={(value) => {
|
|
|
getHotBooks(value)
|
|
|
}} />
|
|
|
@@ -238,7 +240,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 重磅新书 new_books*/}
|
|
|
{indexConfig['new_books'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexNewBooks?.showRightButton} title={indexStore?.indexNewBooks?.name || "重磅新书"} fitTitle="更多" imgUrl={require('../../icon/right.png')} fitOnBack={() => {
|
|
|
+ <BookHead showBtn={indexStore?.indexNewBooks?.showRightButton} title={indexStore?.indexNewBooks?.name || "重磅新书"} fitTitle="更多" imgUrl={rightIcon} fitOnBack={() => {
|
|
|
Taro.navigateTo({ url: `/pages/indexMore/index?title=重磅新书&dataName=indexNewBooks` })
|
|
|
}} />
|
|
|
<View className='w row'>
|
|
|
@@ -253,7 +255,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 热门推荐 hot_rec*/}
|
|
|
{indexConfig['hot_rec'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexHotRec?.showRightButton} title={indexStore?.indexHotRec?.name || "热门推荐"} fitTitle="更多" imgUrl={require('../../icon/right.png')} fitOnBack={() => {
|
|
|
+ <BookHead showBtn={indexStore?.indexHotRec?.showRightButton} title={indexStore?.indexHotRec?.name || "热门推荐"} fitTitle="更多" imgUrl={rightIcon} fitOnBack={() => {
|
|
|
Taro.navigateTo({ url: `/pages/indexMore/index?title=热门推荐&dataName=indexHotRec` })
|
|
|
}} />
|
|
|
<View className='w row for_top'>
|
|
|
@@ -268,7 +270,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 口碑佳作 best_reviews*/}
|
|
|
{indexConfig['best_reviews'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexBestReviews?.showRightButton} title={indexStore?.indexBestReviews?.name || "口碑佳作"} fitTitle="更多" imgUrl={require('../../icon/right.png')} fitOnBack={() => {
|
|
|
+ <BookHead showBtn={indexStore?.indexBestReviews?.showRightButton} title={indexStore?.indexBestReviews?.name || "口碑佳作"} fitTitle="更多" imgUrl={rightIcon} fitOnBack={() => {
|
|
|
Taro.navigateTo({ url: `/pages/indexMore/index?title=口碑佳作&dataName=indexBestReviews` })
|
|
|
}} />
|
|
|
<View className='w row'>
|
|
|
@@ -283,7 +285,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 经典热书 classic_books*/}
|
|
|
{indexConfig['classic_books'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexClassicBooks?.showRightButton} title={indexStore?.indexClassicBooks?.name || "经典热书"} fitTitle="更多" imgUrl={require('../../icon/right.png')} fitOnBack={() => {
|
|
|
+ <BookHead showBtn={indexStore?.indexClassicBooks?.showRightButton} title={indexStore?.indexClassicBooks?.name || "经典热书"} fitTitle="更多" imgUrl={rightIcon} fitOnBack={() => {
|
|
|
Taro.navigateTo({ url: `/pages/indexMore/index?title=经典热书&dataName=indexClassicBooks` })
|
|
|
}} />
|
|
|
<View className='w row'>
|
|
|
@@ -298,7 +300,7 @@ const Index: React.FC<Props> = ({ store }) => {
|
|
|
</View>}
|
|
|
{/* 必看好书 best_books*/}
|
|
|
{indexConfig['best_books'] && <View style={{ order: indexConfig['banners'].eq }}>
|
|
|
- <BookHead showBtn={indexStore?.indexBestBooks?.showRightButton} title={indexStore?.indexBestBooks?.name || "必看好书"} fitTitle="更多" imgUrl={require('../../icon/right.png')} fitOnBack={() => {
|
|
|
+ <BookHead showBtn={indexStore?.indexBestBooks?.showRightButton} title={indexStore?.indexBestBooks?.name || "必看好书"} fitTitle="更多" imgUrl={rightIcon} fitOnBack={() => {
|
|
|
Taro.navigateTo({ url: `/pages/indexMore/index?title=必看好书&dataName=indexBestBooks` })
|
|
|
}} />
|
|
|
<View className='w row for_top'>
|