|
@@ -10,6 +10,7 @@ import {
|
|
|
promisefiyPostMessage,
|
|
|
removeListenerMessage
|
|
|
} from '@/helpers/native-message'
|
|
|
+import OEmpty from '@/components/o-empty'
|
|
|
import iconLook from './image/look.svg'
|
|
|
import iconCourse from '@/views/courseList/image/icon-course.png'
|
|
|
import { browser } from '@/helpers/utils'
|
|
@@ -65,37 +66,39 @@ export default defineComponent({
|
|
|
|
|
|
return () => (
|
|
|
<div style={{ paddingTop: '14px' }}>
|
|
|
- <Grid gutter={14} columnNum={3} class={styles.grid}>
|
|
|
- {data.list.map((item: any) => {
|
|
|
- return (
|
|
|
- <GridItem>
|
|
|
- <div class={styles.gridItem} onClick={() => handleClick(item)}>
|
|
|
- <img src={iconCourse} class={styles.cover} />
|
|
|
- <div class={styles.title}>
|
|
|
- <div class={styles.coreTitle}>{item.name}</div>
|
|
|
- {route.query.code !== 'select' && <div>已使用 {item.useNum} 次</div>}
|
|
|
- </div>
|
|
|
- {route.query.code !== 'select' ? (
|
|
|
- <>
|
|
|
- <div class={styles.num}>
|
|
|
- 查看
|
|
|
- <Icon name="play-circle-o" class={styles.playIcon} />
|
|
|
- </div>
|
|
|
- </>
|
|
|
- ) : null}
|
|
|
-
|
|
|
- {route.query.code == 'select' && !item.unlock && (
|
|
|
- <div class={styles.look} onClick={(e: Event) => e.stopPropagation()}>
|
|
|
- <Icon name={iconLook} /> 未解锁
|
|
|
+ {data.list.length > 0 ? (
|
|
|
+ <Grid gutter={14} columnNum={3} class={styles.grid}>
|
|
|
+ {data.list.map((item: any) => {
|
|
|
+ return (
|
|
|
+ <GridItem>
|
|
|
+ <div class={styles.gridItem} onClick={() => handleClick(item)}>
|
|
|
+ <img src={iconCourse} class={styles.cover} />
|
|
|
+ <div class={styles.title}>
|
|
|
+ <div class={styles.coreTitle}>{item.name}</div>
|
|
|
+ {route.query.code !== 'select' && <div>已使用 {item.useNum} 次</div>}
|
|
|
</div>
|
|
|
- )}
|
|
|
- </div>
|
|
|
- </GridItem>
|
|
|
- )
|
|
|
- })}
|
|
|
- </Grid>
|
|
|
+ {route.query.code !== 'select' ? (
|
|
|
+ <>
|
|
|
+ <div class={styles.num}>
|
|
|
+ 查看
|
|
|
+ <Icon name="play-circle-o" class={styles.playIcon} />
|
|
|
+ </div>
|
|
|
+ </>
|
|
|
+ ) : null}
|
|
|
|
|
|
- {!data.loading && !data.list.length && <Empty description="空空如也" />}
|
|
|
+ {route.query.code == 'select' && !item.unlock && (
|
|
|
+ <div class={styles.look} onClick={(e: Event) => e.stopPropagation()}>
|
|
|
+ <Icon name={iconLook} /> 未解锁
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </GridItem>
|
|
|
+ )
|
|
|
+ })}
|
|
|
+ </Grid>
|
|
|
+ ) : (
|
|
|
+ <OEmpty></OEmpty>
|
|
|
+ )}
|
|
|
</div>
|
|
|
)
|
|
|
}
|