调整学习页面

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

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

@ -77,14 +77,14 @@ export const VideoList: FC<Props> = ({categoryKey, setCategoryKey}) => {
}
// eventsIndex.on(({id}) => {
// if (id == null) return;
// for (const [index, notFinished] of data.is_not_finished.entries()) {
// if (notFinished.id === id) {
// data.is_finished.push(notFinished)
// data.is_not_finished.splice(index, 1)
// return
// }
// }
// if (id == null) return;
// for (const [index, notFinished] of data.is_not_finished.entries()) {
// if (notFinished.id === id) {
// data.is_finished.push(notFinished)
// data.is_not_finished.splice(index, 1)
// return
// }
// }
// })
useDidShow(() => {
@ -123,17 +123,19 @@ export const VideoList: FC<Props> = ({categoryKey, setCategoryKey}) => {
&& key === 'is_required'
? <LoginView/> : value?.length ?
<>
{value?.map(c =>
<VideoCover
thumb={c.thumb}
title={c.title}
id={c.id}
depId={c.id}
key={c.id}
time={formatMinute(c.course_duration)}
content={rateOfLearning(c.id, c.class_hour)}
/>)}
<View className='text-center text-muted'></View>
{
value?.map(c =>
<VideoCover
thumb={c.thumb}
title={c.title}
id={c.id}
depId={c.id}
key={c.id}
time={formatMinute(c.course_duration)}
content={rateOfLearning(c.id, c.class_hour)}
/>)
}
<View className='text-center text-muted flex-1'></View>
</>
: <Empty name='暂无课程'/>
}

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

@ -47,6 +47,10 @@ const Time: FC = () => {
})
function jump(type?: number) {
if (!token) {
Taro.navigateTo({url: '/pages/login/login'})
return;
}
if (!type) return;
Taro.navigateTo({url: "/pages/business/courType/courType?type=" + type})
}
@ -61,7 +65,7 @@ const Time: FC = () => {
<View className={styles.timeBoxFlex}>
<View>
<View className='mb-2'>{d.title}</View>
{ token && <View className='text-muted font-26'>{d.time}</View>}
{token && <View className='text-muted font-26'>{d.time}</View>}
</View>
<Image src={d.src} mode='aspectFit' className={styles.timeImag}/>
</View>

Loading…
Cancel
Save