调整学习页面

v2
king 1 year ago
parent e437e131cd
commit c99493e9de
  1. 4
      .env
  2. 8
      src/pages/index/components/videoList.tsx
  3. 2
      src/pages/my/components/header/header.tsx
  4. 4
      src/pages/my/components/header/time.tsx

@ -1,5 +1,5 @@
TARO_APP_API=https://yjx.dev.yaojiankang.top #TARO_APP_API=https://yjx.dev.yaojiankang.top
#TARO_APP_API=https://mooc.yaojiankang.top TARO_APP_API=https://mooc.yaojiankang.top
#TARO_APP_API=https://shopfix.yaojiankang.top #TARO_APP_API=https://shopfix.yaojiankang.top
#TARO_APP_API=https://playedu.yaojiankang.top #TARO_APP_API=https://playedu.yaojiankang.top
TARO_APP_LGOIN=true TARO_APP_LGOIN=true

@ -123,7 +123,8 @@ export const VideoList: FC<Props> = ({categoryKey, setCategoryKey}) => {
&& key === 'is_required' && key === 'is_required'
? <LoginView/> : value?.length ? ? <LoginView/> : value?.length ?
<> <>
{value?.map(c => {
value?.map(c =>
<VideoCover <VideoCover
thumb={c.thumb} thumb={c.thumb}
title={c.title} title={c.title}
@ -132,8 +133,9 @@ export const VideoList: FC<Props> = ({categoryKey, setCategoryKey}) => {
key={c.id} key={c.id}
time={formatMinute(c.course_duration)} time={formatMinute(c.course_duration)}
content={rateOfLearning(c.id, c.class_hour)} content={rateOfLearning(c.id, c.class_hour)}
/>)} />)
<View className='text-center text-muted'></View> }
<View className='text-center text-muted flex-1'></View>
</> </>
: <Empty name='暂无课程'/> : <Empty name='暂无课程'/>
} }

@ -29,7 +29,7 @@ const Header = ({showCompany}:{showCompany:()=> void}) => {
<View className='flex-1'> <View className='flex-1'>
<View className='font-32 mt-2' onClick={()=>{ <View className='font-32 mt-2' onClick={()=>{
empty() empty()
}}>/</View> }}></View>
</View> </View>
} }

@ -47,6 +47,10 @@ const Time: FC = () => {
}) })
function jump(type?: number) { function jump(type?: number) {
if (!token) {
Taro.navigateTo({url: '/pages/login/login'})
return;
}
if (!type) return; if (!type) return;
Taro.navigateTo({url: "/pages/business/courType/courType?type=" + type}) Taro.navigateTo({url: "/pages/business/courType/courType?type=" + type})
} }

Loading…
Cancel
Save