index.tsx 423 B

1234567891011
  1. import { useModel } from '@umijs/max'
  2. import LongPage from './Long'
  3. import ShortPage from './Short'
  4. function Index() {
  5. let { selectApp }: any = useModel("@@initialState", (model) => ({
  6. selectApp: model.initialState?.selectApp
  7. }))
  8. // 临时条件后期从selectApp中获取参数判断小程序是长篇还是短篇
  9. return selectApp?.id % 2 !== 0 ? <LongPage /> : <ShortPage />
  10. }
  11. export default Index