import React, { Suspense, useState, lazy } from 'react' import { View, Text } from '@tarojs/components' import CustomNav from '@/components/CustomNav' import logo from '@/assets/icons/comm/logo_small.png' import tabList from './tabbar' import './index.less' const Recommend = lazy(() => import('./tabs/Recommend')) const Guide = lazy(() => import('./tabs/Guide')) const Strategy = lazy(() => import('./tabs/Strategy')) const Mine = lazy(() => import('./tabs/Mine')) export default (props) => { const [currentTab, setCurrentTab] = useState(0) const handleTabChange = (e) => { const { index } = e.detail setCurrentTab(index) } return ( {currentTab === 0 && } {currentTab === 1 && } {currentTab === 2 && } {currentTab === 3 && } ) }