shenwu 6 meses atrás
pai
commit
9147a7e673
2 arquivos alterados com 4 adições e 4 exclusões
  1. 2 2
      src/pages/indexMore/index.tsx
  2. 2 2
      src/store/index.ts

+ 2 - 2
src/pages/indexMore/index.tsx

@@ -24,9 +24,10 @@ class indexMore extends Component<Props> {
     onLoad(opt: { title: string, dataName: string }) {
         let { indexStore } = this.props.store
         let { title, dataName } = opt
+        console.log(indexStore[dataName])
         this.setState({
             title,
-            data: indexStore[dataName]
+            data: indexStore[dataName]?.longBookInfoAppVOS ||  indexStore[dataName]?.shortBookInfoAppVOS
         })
     }
 
@@ -45,7 +46,6 @@ class indexMore extends Component<Props> {
                 </View>
             </View>
         }, { title, isToBack: true })
-        console.log(Page)
         return <Page />
     }
 }

+ 2 - 2
src/store/index.ts

@@ -42,8 +42,8 @@ const Index = observable({
         name: "今日热书",//名称
         showRightButton: true,//右侧按钮是否展示
         workDirection: 0,//频道
-        shortBookInfoAppVOS:[],//短篇
-        longBookInfoAppVOS:[],//长篇
+        shortBookInfoAppVOS:null,//短篇
+        longBookInfoAppVOS:null,//长篇
     },//首页热门数据
     indexHotCategory: {
         bookCategoryList: [],//分类