|
|
@ -5,9 +5,6 @@ import {VideoList} from "@/pages/index/components/videoList"; |
|
|
|
import Tabs, {OnChangOpt, TabList} from "@/components/tabs/tabs"; |
|
|
|
import Tabs, {OnChangOpt, TabList} from "@/components/tabs/tabs"; |
|
|
|
import {CoursesKey} from "@/api/public"; |
|
|
|
import {CoursesKey} from "@/api/public"; |
|
|
|
import Taro from '@tarojs/taro' |
|
|
|
import Taro from '@tarojs/taro' |
|
|
|
import {Profile} from '@/store' |
|
|
|
|
|
|
|
// import {Search} from "./components/search";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Index: FC = () => { |
|
|
|
const Index: FC = () => { |
|
|
|
const globalData = Taro.getApp().globalData |
|
|
|
const globalData = Taro.getApp().globalData |
|
|
@ -18,7 +15,6 @@ const Index: FC = () => { |
|
|
|
{title: "未完成", value: 'is_not_finished'}, |
|
|
|
{title: "未完成", value: 'is_not_finished'}, |
|
|
|
] |
|
|
|
] |
|
|
|
const [categoryKey, setCategoryKey] = useState<CoursesKey>('is_required') |
|
|
|
const [categoryKey, setCategoryKey] = useState<CoursesKey>('is_required') |
|
|
|
const {token} = Profile.useContainer() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function tabChange(data: OnChangOpt) { |
|
|
|
function tabChange(data: OnChangOpt) { |
|
|
|
setCategoryKey(data.tab?.value as CoursesKey) |
|
|
|
setCategoryKey(data.tab?.value as CoursesKey) |
|
|
@ -28,9 +24,8 @@ const Index: FC = () => { |
|
|
|
<> |
|
|
|
<> |
|
|
|
<View className={styles.content} style={`paddingTop:${globalData.statusBarHeight}px`}> |
|
|
|
<View className={styles.content} style={`paddingTop:${globalData.statusBarHeight}px`}> |
|
|
|
{process.env.TARO_ENV !== "h5" && <View className='text-center font-weight font-34 mt-3'>医学道</View>} |
|
|
|
{process.env.TARO_ENV !== "h5" && <View className='text-center font-weight font-34 mt-3'>医学道</View>} |
|
|
|
{/*<Search/>*/} |
|
|
|
|
|
|
|
<Tabs tabList={category} onChange={tabChange} current={categoryKey}/> |
|
|
|
<Tabs tabList={category} onChange={tabChange} current={categoryKey}/> |
|
|
|
<VideoList categoryKey={categoryKey} ready={!!token}/> |
|
|
|
<VideoList categoryKey={categoryKey}/> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</> |
|
|
|
</> |
|
|
|
) |
|
|
|
) |
|
|
|